Next Article in Journal
Proinov-Type Fixed-Point Results in Non-Archimedean Fuzzy Metric Spaces
Next Article in Special Issue
A Restart Local Search for Solving Diversified Top-k Weight Clique Search Problem
Previous Article in Journal
Can Mathematics Achievement Be Predicted? The Role of Cognitive–Behavioral–Emotional Variables
Previous Article in Special Issue
Computing Open Locating-Dominating Number of Some Rotationally-Symmetric Graphs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Maximal Shortest Paths Cover Number

by
Iztok Peterin
1,* and
Gabriel Semanišin
2
1
Institute of Mathematics and Physics, Faculty of Electrical Engineering and Computer Science, University of Maribor, 2000 Maribor, Slovenia
2
Institute of Computer Science, Faculty of Science, Pavol Jozef Šafárik University, 041 54 Košice, Slovakia
*
Author to whom correspondence should be addressed.
Mathematics 2021, 9(14), 1592; https://doi.org/10.3390/math9141592
Submission received: 7 May 2021 / Revised: 2 July 2021 / Accepted: 4 July 2021 / Published: 7 July 2021
(This article belongs to the Special Issue Graphs, Metrics and Models)

Abstract

:
A shortest path P of a graph G is maximal if P is not contained as a subpath in any other shortest path. A set S V ( G ) is a maximal shortest paths cover if every maximal shortest path of G contains a vertex of S. The minimum cardinality of a maximal shortest paths cover is called the maximal shortest paths cover number and is denoted by ξ ( G ) . We show that it is NP-hard to determine ξ ( G ) . We establish a connection between ξ ( G ) and several other graph parameters. We present a linear time algorithm that computes exact value for ξ ( T ) of a tree T.
MSC:
05C69; 05C12

1. Introduction and Preliminaries

Distance is one of essential terms in mathematics and has inspired many important results in different areas of mathematics. As the concept comes from real life, this gives rise to several applications. A theoretical model for a possible scenario of such an application is presented also in this work. Consider a complex system that can be modeled by a graph. When it is not possible to control every part of a system, usually due to technical or economical reasons, one would like to position the control points to strategic places of the underlying graph. We propose here to put these controls into the particular elements of the system, represented by vertices of a graph, in such a way that all the maximal shortest paths of the graph can be monitored and controlled from these elements.
In this work we consider finite simple graphs. Let G be a graph and u , v be vertices of G. The distance between two vertices u , v V ( G ) is the minimum number of edges on a path that starts at u and ends at v and is denoted by d G ( u , v ) or for short d ( u , v ) . A vertex x V ( G ) strongly distinguishes vertices u and v of G if u is on a shortest path between x and v or v is on a shortest path between x and u. Set S is a strong metric generator if for any pair u , v of different vertices of G there exists x S such that x strongly distinguishes u and v. The minimum cardinality of a strong metric generator is called the strong metric dimension of G and is denoted by sdim ( G ) . The strong metric dimension was introduced in [1], but later, in [2], Oellermann and Peters-Fransen connected strong metric dimension with so-called mutually maximal distant pairs of vertices. Vertices u and v form such a pair if the distance between v and every neighbor w of u does not exceed d ( u , v ) and symmetrically if the distance between u and every neighbor w of v does not exceed d ( u , v ) . But this simply means that a shortest path P between u and v is a maximal shortest path, meaning that P is not included in any other longer shortest path as a subpath.
In [2] the authors also showed that sdim ( G ) is the minimum number of vertices that cover every mutually maximal distant pair of vertices. This approach was later more developed in several other papers (see, e.g., [3,4,5,6,7] for a flavor). Here we relax the conditions mentioned above and we only require that all maximal shortest paths in a graph are covered. One can wonder whether this requirement really leads to a relaxation. Indeed, there could be many shortest paths between the same pair of vertices. However, we can always take one vertex of a considered pair of vertices and it obviously lies on all maximal shortest paths between them in G. Hence, in this way we can cover all maximal shortest paths with a set of cardinality sdim ( G ) . Therefore, our approach actually yields to a relaxation of maximal distant pair cover.
Such an approach is also a generalization of another well-known concept, namely the vertex cover number of a graph G that belongs to the essential 21 NP-complete problems described by Karp in [8]. We recall that the vertex cover number β ( G ) is the minimum number of vertices that cover all edges of a graph G. Here we need to limit ourselves to graphs without isolated vertices, because every isolated vertex forms a maximal shortest path of length zero, but it does not contribute to β ( G ) . On the other hand, every other maximal shortest path contains at least one edge e E ( G ) and at least one end-vertex of e must be contained in a vertex cover of G. The other generalization of the minimum vertex cover was introduced in [9]. The k-path vertex cover number ψ k ( G ) denotes the minimum cardinality of a minimal set of vertices of G that have a non-empty intersection with a vertex set of every path of order k. One can easily see that ψ 1 ( G ) and ψ 2 ( G ) coincide with the order of G and β ( G ) , respectively. For results concerning k-path vertex cover for product of graphs see, e.g., [10,11,12] and relationships to other invariants can be found in [13].
The same topic as it is considered in this paper was recently studied in [14] under the name The geodesic-transversal problem. Some results from the mentioned paper overlap with the results from this work; however, the used methods are different. The other results on maximal shortest paths cover can be found in [15], where the maximal shortest paths cover number is investigated for the joins and lexicographic products of two graphs.
A wheel graph W n , n 4 , is a graph obtained from a cycle C n 1 = v 1 v n 1 v 1 by adding a new vertex u and edges v i u for every i { 1 , , n 1 } . The vertex u of W n is universal and is called the central vertex of W n . A star S k , k 2 , is a special kind of complete bipartite graph, namely K 1 , k 1 . For some positive integers k , t 1 , , t k a generalized star is a graph S t 1 , , t k with the central vertex v of degree k and with S t 1 , , t k v isomorphic to k paths P k 1 , , P k t . It is easy to see that if t 1 = = t k = 1 , then S t 1 , , t k S k .
A grid graph or a Cartesian product of two paths P q P r has vertices v i , j where i { 1 , , q } and j { 1 , , r } . Two vertices v i , j and v k , of P q P r are adjacent if either | i k | = 1 and j = or i = k and | j | = 1 . In [7] (see Proposition 30) among other results, also the strong metric dimension of grids was determined as
sdim ( P q P r ) = 2 .

2. Definition and Complexity

A path between u and v of length d ( u , v ) is called a u , v -shortest path or a u , v -geodesic. The diameter of G is denoted by diam ( G ) and is the length of a longest geodesic in G. A u , v -geodesic P is said to be extendible if there exist vertices x , y in G such that { u , v } { x , y } and P is a subpath of a x , y -geodesic. If a path P is not extendible, then P is not contained in any other shortest path and is therefore a maximal shortest path. If there exists a maximal shortest path between u and v, then all u , v -geodesics are maximal shortest paths. The path y x t at Figure 1 is extendible because it is a proper subpath of the path y x t v —a shortest path between y and v. The path z x t is not extendible because it is not a proper subpath of any shortest path of the graph.
A subset S of the set of vertices of a graph G is called a maximal shortest paths cover if it has non-empty intersection with vertex set of every maximal shortest path of G. The vertex set { z , t } at Figure 1 is the maximal shortest paths cover of the given graph since the paths y x t v and y z u v and z x t are maximal shortest paths (i.e., the cardinality of the cover must be at least 2) and the paths y x and u v are extendible.
The cardinality of a smallest maximal shortest paths cover in a graph G is denoted by ξ ( G ) and is called the maximal shortest paths cover number of G. Every maximal shortest paths cover of G of cardinality ξ ( G ) is called a ξ ( G ) set.
Let G and H be two graphs. The disjoint union of G and H is the graph G H that is obtained from one copy of G and one copy of H. The following observation ensures that it is enough to handle connected graphs. It holds because every maximal shortest path of G H is contained either in G or in H.
Proposition 1.
If G and H are arbitrary disjoint graphs, then ξ ( G H ) = ξ ( G ) + ξ ( H ) .
We start with determining ξ ( G ) for some classic families of graphs to get a better grip on the problem.
Proposition 2.
If k is a positive integer, then
(i) 
ξ ( P k ) = 1 , k 1 ;
(ii) 
ξ ( C k ) = 2 , k 3 ;
(iii) 
ξ ( S k ) = 1 , k 2 ;
(iv) 
ξ ( K k ) = k 1 , k 2 , and ξ ( K 1 ) = 1;
(v) 
ξ ( W 4 ) = 3 , ξ ( W 5 ) = 2 and ξ ( W k ) = k 1 3 + 1 , k 6 .
Proof. 
(i)
A path P k contains exactly one maximal shortest path and any vertex of P n is its maximal shortest paths cover. Therefore, ξ ( P k ) = 1 .
(ii)
Let C k = v 1 v k v 1 . A path P is a maximal shortest path of C k if and only if P is of the length t = k 2 . Suppose that ξ ( C k ) = 1 and that, with the possible change of notation, { v 1 } is a maximal shortest paths cover. Path v 2 v 3 v t + 2 is of length t and does not contain v 1 , a contradiction. Hence, ξ ( C k ) 2 . On the other hand, set { v 1 , v t + 1 } is a maximal shortest paths cover and ξ ( C k ) = 2 follows.
(iii)
Every maximal path of S k contains the central vertex v of S k and { v } is the maximal shortest paths cover of S k . Therefore, ξ ( S k ) = 1 .
(iv)
Clearly, ξ ( K 1 ) = 1 . In K k , k 2 , every edge is a maximal shortest path. Therefore, ξ ( K k ) β ( K k ) = k 1 for k 2 . Conversely, any path of order 1 is extendible and therefore any set of cardinality k 1 is a maximal shortest paths cover set of K k when k 2 . This yields ξ ( K k ) = k 1 for k 2 .
(v)
For k = 4 we have W 4 = K 4 . For k = 5 it is easy to check that two consecutive vertices of cycle C 4 form a maximal shortest paths cover of W 5 and that one vertex is not sufficient to cover all maximal shortest paths of W 5 .
Let C k 1 = v 1 v k 1 v 1 and let u be the central vertex of W k , k 6 . Notice that every path of length two on C k 1 is a maximal shortest path of W k . This means that at least one vertex among three consecutive vertices of C k 1 must be in every maximal shortest paths cover of W k . Hence, ξ ( W k ) k 1 3 . Moreover, u is on a maximal shortest path between any two non-consecutive vertices of C k 1 . As k 6 there always exist two non-consecutive vertices of C k 1 that are not in a subset of V ( C k 1 ) of cardinality k 1 3 . Therefore, ξ ( W k ) k 1 3 + 1 . To show the equality ξ ( W k ) = k 1 3 + 1 one needs to show that { u , v 1 , v 4 , , v 3 k 1 3 2 } is a maximal shortest paths cover, which is clear from the previous analysis of all maximal shortest paths of W k .  □
Next we deal with the complexity of the Maximal Shortest Paths Cover Problem (or MSPC problem for short) that is defined as follows.
Maximal   Shortest   Paths   Cover   Problem   ( MSPC   problem ) INSTANCE : A   graph   G   of   order   n 3   and   an   integer 1 r n 1 . QUESTION :   Is   ξ ( G ) r ?
Since the maximal shortest paths cover is a generalization of some well known problems that are NP-complete, it is not very surprising that MSPC problem is NP-complete as well.
Theorem 1.
MSPC problem is NP-complete.
Proof. 
Let us reduce the well-known Vertex Cover Problem to MSPC problem. Let G be an instance of the Vertex Cover Problem without isolated vertices. We construct G * by attaching a pending edge to every vertex of G.
Let S be a minimum vertex cover of G. Evidently it covers all shortest paths of the original graph G. Moreover, if a shortest path of G * is not extendible, then it must contain at least one edge from G. Therefore, it is covered by S.
On the other hand, for every edge e of the original graph G there is a maximal shortest path between new vertices of G * of length three containing e and no other edge belonging to G. Therefore, any maximal shortest paths cover must contain at least one vertex from such a path and evidently we can choose an end-vertex of e. In such a manner we obtain a maximal shortest paths cover of G * that is simultaneously a minimum vertex cover of G.  □

3. General Bounds

First we present relationships of ξ ( G ) to the both invariants which we used for a motivation in Introduction. We remind that these two invariants are strong metric dimension sdim ( G ) and vertex cover number β ( G ) . We start with the latter one.
Proposition 3.
If G is a graph without isolated vertices, then
ξ ( G ) β ( G ) .
Proof. 
Evidently, every shortest path in G must be of order at least two and therefore it contains at least one vertex from the vertex cover.  □
The previous bound is sharp and it is obtained for stars and for complete graphs. On the other hand, β ( G ) can exceed ξ ( G ) with an arbitrary big difference. Such a difference can be achieved even for paths and cycles.
The next proposition provides another bound for ξ ( G ) .
Proposition 4.
If G is a graph without isolated vertices, then
ξ ( G ) sdim ( G ) .
Proof. 
Let P be any maximal shortest path of G and let S be an sdim ( G ) set. As it was mentioned in the first section, S must contain at least one end-vertex of P. Since P was chosen arbitrary, this means that S is also a maximal shortest paths cover of G and the result follows.  □
The above bound is sharp for paths and complete graphs. The difference between sdim ( G ) and ξ ( G ) can be arbitrary large as we can see it on even cycles where sdim ( C 2 k ) ξ ( C 2 k ) = k 2 . Stars present another example with big difference between sdim ( G ) and ξ ( G ) .
Next we provide a classification for all graphs with ξ ( G ) = 1 .
Theorem 2.
Graph G has ξ ( G ) = 1 if and only if G is isomorphic to S t 1 , t 2 , , t k for some positive integers k , t 1 , t 2 , , t k .
Proof. 
It is easy to verify that ξ ( S t 1 , t 2 , , t k ) = 1 .
On the other hand, let ξ ( G ) = 1 and suppose that { v } covers all maximal shortest paths.
If G is not connected, then at least one component does not contain v and obviously any maximal shortest path from this component is not covered by v. Therefore, G is connected.
Assume first that G is a tree. Moreover, suppose that G has more than one vertex of degree at least three. If x and y are two such vertices with maximum possible distance in G, then G x contains at least two components that are isomorphic to paths and end with leaves 1 and 2 , respectively. Similarly, G y contains at least two components that are isomorphic to paths and end with leaves 3 and 4 , respectively. The choice of x and y implies that 1 , 2 , 3 , 4 are pairwise different. The unique 1 , 2 -geodesic and 3 , 4 -geodesic are disjoint and they are maximal shortest paths of G. Hence, v cannot belong to both, a contradiction. Therefore, either G is a path or contains exactly one vertex w of degree at least three. In both cases G is isomorphic to some S t 1 , t 2 , , t k .
Assume now that G contains a cycle. Let us denote by C t = x 1 x 2 x t x 1 , t 3 a shortest cycle of G. Firstly suppose that v belongs to C t . Without loss of generality we can assume that v = x 1 . Let i = 1 + t 4 and j = 1 + t 4 + t 2 . There exists the shortest path P on C t between x i and x j that does not contain x 1 . Since C t is a shortest cycle, P is also a shortest x i x j -path in G. If P is a maximum shortest path, then we have an immediate contradiction as v V ( P ) . Hence, let P be a maximal shortest path that contains P. Since { x 1 } is the maximum shortest paths cover we know that x 1 V ( P ) . If x j is between x i and x 1 on P , then d P ( x 1 , x i ) > t 2 t 4 = d G ( x 1 , x i ) , a contradiction with the existence of P . Symmetrically we obtain a contradiction when x i is between x j and x 1 on P . Therefore, v is not a vertex of C t .
Let Q be a shortest path between v and C t . With a possible suitable modification of notation, we may assume that x 1 is the other end-vertex of Q. Let now P be the shortest path on C t between x 2 and x t . If t = 3 , then P is the edge x 2 x t . When t = 4 we have two shortest paths between x 2 and x t on C t and let P be the one that contains x 1 . Moreover, if t > 4 , then P contains x 1 . Now, P is not a maximal shortest path because v is not on P. Let P be a maximal shortest path through v that contains P as a subpath. Without loss of generality we may assume that x 2 is closer to v than x t on P . If t 4 , then d Q ( v , x 1 ) d P ( v , x 2 ) and with this d G ( v , x t ) d Q ( v , x 1 ) + 1 < d P ( v , x t ) = d P ( v , x 2 ) + 2 , a contradiction with P being a shortest path. Hence, t = 3 . If d Q ( v , x 1 ) < d P ( v , x 2 ) , then d G ( v , x t ) d Q ( v , x 1 ) + 1 < d P ( v , x t ) + 1 , which provides the same contradiction as before. Therefore, we have d Q ( v , x 1 ) = d P ( v , x 2 ) . Now the edge x 1 x 2 is a maximal shortest path itself or it is properly contained in some maximal shortest path R that does not contain v. However, this is not possible since { v } is a maximal shortest paths cover of G. This means, that G with ξ ( G ) = 1 does not contain any cycle and we are done.  □
Proposition 4, together with (1) and Theorem 2 directly imply the following result on grid graphs.
Corollary 1.
For positive integers q , r 2 , ξ ( P q P r ) = 2 .
The following proposition provides us another useful bound on ξ ( G ) .
Proposition 5.
For every graph G the following is true:
ξ ( G ) | V ( G ) | diam ( G ) .
Proof. 
Let P be a diametrical path of G. Set S contains all the vertices outside P and one vertex of P. Clearly P is covered by S. Every maximal shortest path different than P contains a vertex outside of P that belongs to S. Hence, S is a maximal shortest paths cover of cardinality | V ( G ) | diam ( G ) and the result follows.  □
From Theorem 2 we also deduce the following connection.
Corollary 2.
If a graph G is 2-connected, then ξ ( G ) 2 .
In the light of the previous corollary one can ask whether similar relationship is valid also for higher degrees of connectivity. However, one can easily see that such an extension is not true. Indeed, by Proposition 2 we have ξ ( W 5 ) = 2 and evidently W 5 is 3-connected.

4. Trees

A vertex v of degree at least 3 in a tree T is called a support if there exists at least one path component in T v . Clearly such a path component of T v ends in a leaf and we say that corresponds to a support v. A support v is a light support if it has just one path component in T v , otherwise it is called a strong support. Notice that the term support is often used for neighbors of leafs in other publications, while we use it for the vertex that is closest to a leaf and has degree at least three. Paths have no support vertices and the star S q has one strong support vertex when q 3 . It is an easy observation that every tree is either a path or it contains a strong support vertex. We can immediately bound ξ ( T ) as it is shown next. A tree T shown in Figure 2 has two strong supports u and w and one weak support v.
Theorem 3.
Let k , , r , q be non-negative integers. Let T be a tree different from a path having k strong supports v 1 , , v k and ℓ light supports. If T { v 1 , , v k } contains r components with at least one light support of T and q components with at least two light supports of T, then
k + q ξ ( T ) k + r .
Proof. 
Every maximal shortest path in a tree is a path between two leaves. Let S and L be the sets of strong and light supports of T, respectively. Further let L be a set obtained from L by deleting one light support from every component of T S that contains a light support. Let x and y be arbitrary leaves. The x , y -geodesic P in T contains at least one support. Moreover, if the number of supports on P is exactly one then x and y correspond to the same strong support. Hence, the set S L covers P when P contains exactly one (strong) support. Similarly, P is covered by S L when P contains at least one strong support. So suppose that V ( P ) S = . Now P contains at least two light supports, which means that both light supports are in the same component of T S and at least one of them is in L . Hence, P is again covered by S L and the upper bound follows.
Let now D be a ξ ( T ) set. Let v be a strong support vertex of T. Let P 1 and P 2 be two path components of T v and let 1 and 2 be leaves of T that correspond to v and belong to P 1 and P 2 , respectively. Path P in T that starts at 1 and ends at 2 is a maximal shortest path containing exactly one vertex of degree three, namely v. As D is a ξ ( T ) set, there exists a vertex from D that belongs to P. Hence, for every strong support vertex we have at least one vertex in D. Moreover, as follows from the previous analysis and the definition of strong supports, these vertices are pairwise different. Let D be set obtained from D by deleting all vertices that correspond to strong support vertices. Now, let us consider an arbitrary component of T S that contains at least two light supports, say u and v. Let x and y be the leaves that correspond to u and v, respectively. Evidently, no vertex from D D lies on the x , y -geodesic. Hence, for every component of T S with at least two light supports we need at least one additional vertex in D . Hence, ξ ( t ) k + q and we are done.  □
Last theorem immediately implies the result for trees without light supports.
Corollary 3.
If T is a tree with k > 0 strong supports and without light supports, then ξ ( T ) = k .
Let T be a tree. By T we denote the forest of paths obtained from T by deleting all vertices of degree at least three. Let v be a strong support of T. The star neighborhood of v, denoted by S N T ( v ) , contains v and all the vertices belonging to path components of T that containins a neighbor of v in T.
Let v 1 be a leaf of T that corresponds to a strong support u. We order V ( T ) by BFS algorithm that starts at v 1 . In addition, we adjust BFS algorithm in such a way that for a vertex x it remembers also its closest ancestor (with respect to the constructed order) of degree more than two whenever such an ancestor exists and keeps it in a ( x ) . When such an ancestor does not exist, for all the vertices on the v 1 , u -geodesic we set a ( x ) = u for x u and a ( u ) = v 1 . Hence, after the completion of the run of the designed algorithm, each variable a ( ) , associated with a leaf , possesses the reference to the corresponding support of . Those vertices that appear more than once among the values a ( ) , is any leaf, are strong supports and those which appear only once are light supports.
Now, let us restrict our attention to all the vertices of T of degree at least three accompanied with v 1 . For these vertices reverse the order constructed by the enhanced BFS algorithm. We put them in list A together with information whether they are strong or light supports or no supports at all. This can be achieved with two Boolean functions s ( x ) and ( x ) where s ( x ) = 1 means that x is a strong support and ( x ) = 1 that x is a light support. If s ( x ) = 0 = ( x ) , then x is not a support vertex. Moreover, the state s ( x ) = 1 means that ( x ) = 0 and vice versa. Clearly, A ends with v 1 .
Let x be the first vertex from A and T = T S N T ( x ) . If T contains more than one vertex of degree three, then T is a tree and exactly one of the following cases occurs:
(a)
a ( x ) is a strong support of T with deg ( a ( x ) ) > 3 and it is a strong support of T as well;
(b)
a ( x ) is a light or strong support of T with deg ( a ( x ) ) = 3 and is a vertex of degree two in T — the later case occurs only when T has exactly two vertices of degree at least three;
(c)
a ( x ) is a light support of T with deg ( a ( x ) ) > 3 and is a light support of T as well;
(d)
a ( x ) is not a support of T and is not a support of T .
In particular, (b) means that the ancestor of y of degree at least three that is closest to a ( x ) in T , i.e., y = a ( a ( x ) ) if it exists, either becomes a light support (providing y was not a support vertex of T) or becomes a strong support (whenever y was a support of T). In the special case, when T has exactly two vertices of degree at least three and one of them, say u, that is closer to v 1 , has degree three, then T is a path. It is also worth to mention that in the case (d) the vertex a ( x ) has degree two in T providing deg ( a ( x ) ) = 3 in T. Therefore, in such a case one needs to delete a ( x ) from A (see the first condition in if sentence in the line 6 of Algorithm 1).
For an arbitrary tree T the value ξ ( T ) and the corresponding ξ ( T ) set D are computed in the main loop of Algorithm 1. The loop is repeated while A is not empty and, in addition, in every step we adjust the parameters s ( a ( a ( x ) ) ) , ( a ( a ( x ) ) ) and a ( x ) when needed. If the processed vertex satisfies the conditions described in the cases (a), (c) or (d), then nothing needs to be done (except, as it is explained above, for case (d) and deg ( a ( x ) ) = 3 ). If we have the case (b), then a ( x ) is a vertex of degree two in T and we change the value a ( x ) to a ( a ( x ) ) in the leaf t that corresponds to a ( x ) in T, i.e., a ( t ) = a ( a ( x ) ) after this operation. However, one can avoid this and just adopt the status of a ( a ( x ) ) directly, see if sentences in lines 9–11 and 12–14 of Algorithm 1 for this.
Algorithm 1: Computing ξ ( T ) of a tree T.
Mathematics 09 01592 i001
We need to consider also the second condition in if sentence of line 6 of Algorithm 1. If a ( x ) = v 1 , then v 1 corresponds to x and all maximal shortest paths that starts at v 1 contain x. Therefore, we delete v 1 from A. However, it is possible that v 1 corresponds to a ( x ) , where a ( x ) is a strong support of T with exactly two leaves corresponding to a ( x ) . This means that the maximal shortest path between v 1 and the other leaf that corresponds to a ( x ) is not covered yet. In such a case v 1 remains in A and it is added to D in the last step of the algorithm. Since v 1 belongs to A, Algorithm 1 works correctly also for paths.
Next we prove the correctness and estimate the time complexity of Algorithm 1.
Theorem 4.
Algorithm 1 correctly computes ξ ( T ) and ξ ( T ) set D for any tree T in O ( n ) time where n = | V ( T ) | .
Proof. 
Let T be a tree and let S = { u 1 , , u k } be all strong support vertices of T ordered by BFS algorithm starting from a leaf v 1 (the ordering is arbitrary but fixed). We prove the correctness of Algorithm 1 by induction on the number of light support vertices of T.
Let first = 0 . We prove the basis again by induction on the number k of strong supports of T. If T has also no strong supports, then T P r and the output of Algorithm 1 is z = 1 and D = { v 1 } which is correct. If T has exactly one vertex of degree at least three, then T is a generalized star and we have ξ ( T ) = 1 and D = { u 1 } by Theorem 2. The same result is obtained by Algorithm 1, because line 5 is executed exactly once and v 1 is deleted from A in line 7.
Let now k > 1 and let T = T S N T ( u k ) . As there are no light support vertices in T, we have, by (a), (b) and (d) no new supports in T . Hence, T has at most k 1 strong supports (and no light supports) and Algorithm 1 correctly computes ξ ( T ) and ξ ( T ) set D . It is not hard to see, that D = S { u k } when deg ( u 1 ) > 3 and D = ( S { u 1 , u k } ) { v 1 } when deg ( u 1 ) = 3 . By Corollary 3 we have ξ ( T ) = k 1 and ξ ( T ) = k . For T Algorithm 1 gives z = ξ ( T ) + 1 = k and D = D { u k } . So, Algorithm 1 correctly computes ξ ( T ) and ξ ( T ) set D for a tree T without light supports.
Suppose now that T has 1 light supports and let w be the last light support in the fixed BFS order of T. By the assumption on input, v 1 corresponds to a strong support which is different from w. Let u j 1 , , u j p be all descendants of w that belong to S ordered by the fixed BFS ordering. For T 0 = T we define inductively T i = T i 1 S N T i 1 ( u k i + 1 ) for i { 1 , , k j 1 + 1 } . So, we end with T k j 1 + 1 and let T = T k j 1 + 1 . At this stage k j 1 + 1 strong supports were already processed by Algorithm 1, which means that z = k j 1 + 1 and D = { u j 1 , u j 1 + 1 , , u k } . In particular, notice that in the last step a ( u j 1 ) = w , deg T k j 1 ( w ) = 3 and the case (b) occurs for w. Hence, T has one light support less than T and, by the induction hypothesis, Algorithm 1 correctly computes ξ ( T ) and ξ ( T ) set D . Therefore, at the end of the run of the algorithm we obtain z = ξ ( T ) + k j 1 + 1 and D = D { u j 1 , u j 1 + 1 , , u k } .
It remains to show that ξ ( T ) = z where D is a ξ ( T ) set as | D | = z . For this notice that the path between two leaves x and y that belongs to some T is covered by D by induction hypothesis. Otherwise, a shortest path between x and y contains a strong support u s for some s { j 1 , j 1 + 1 , , k } and is also covered by D. Hence, ξ ( T ) z . Conversely, we can show as in the proof of Theorem 3 that for every strong support u i there must be a vertex from a shortest path between two leaves corresponding to u i in every ξ ( T ) set. So, if ξ ( T ) < z , then we have | D 1 V ( T ) | < ξ ( T ) for a ξ ( T ) set D 1 . Thus D 1 V ( T ) is not a ξ ( T ) set and there exist two leaves x and y of T such that the x , y -geodesic P is not covered by D 1 V ( T ) . But then P is not covered by D 1 in T, a contradiction. Therefore, ξ ( T ) z and the equality follows.
For the time complexity notice that adjusted BFS algorithm can be computed in linear time O ( n ) . For every vertex of list A Algorithm 1 performs constant number of operations (three in line 6 and either one in line 7 or two in line 10 or one in line 13). As there are less then n vertices in A the time complexity is linear.  □
The previous theorem enable us to show that the maximal shortest paths cover number of an (induced) subgraph can exceed the maximal shortest paths cover number of the original graph, that is ξ ( G ) is not monotone with respect to taking neither subgraphs nor induced subgraphs (see [16,17]). A tree T is a caterpillar if the path P k , called the spine, remains after deleting all leaves from T. Let t 1 , , t k be non negative integers where t 1 , t k > 0 . We denote by C T P k ( t 1 , , t k ) the caterpillar with the spine P k and t i leaves attached to the i-th vertex of the spine for i { 1 , , k } . A caterpillar C T P k ( 2 , 0 , 1 , 0 , 2 ) is depicted in Figure 2.
Corollary 4.
The parameter ξ ( G ) is not monotone neither with respect to taking subgraphs nor to taking induced subgraphs.
Proof. 
We have ξ ( P q P r ) = 2 by Corollary 1. However, the caterpillar C T P q ( 2 , 2 , , 2 ) is a subgraph of the graph P q P r when r 3 and we have ξ ( C T P q ( 2 , 2 , , 2 ) ) = q by Theorem 4. Similarly, C T P q ( 2 , 0 , 2 , 0 , , 0 , 2 ) is an induced subgraph of P q P r for an odd q and, according to Theorem 4, we have ξ ( C T P q ( 2 , 0 , 2 , 0 , , 0 , 2 ) ) = q + 1 2 .  □
The result on tress allows us to describe also the relationship of ξ ( G ) to the invariant k-path vertex cover number ψ k ( G ) . By Proposition 4 we already have ξ ( G ) β ( G ) = ψ 2 ( G ) . However, this inequality cannot be extended for higher values of k.
Proposition 6.
If C is a positive constant and k 4 an integer, then
(i) 
there exists a graph G with ψ k ( G ) ξ ( G ) > C ;
(ii) 
there exists a graph G with ξ ( G ) ψ k ( G ) > C .
Proof. 
For the first statement it is sufficient to consider the path P n for sufficiently large n. We have already shown by Proposition 2 that ξ ( P n ) = 1 and by [10] we have ψ k ( P n ) = n k .
For the second statement consider the caterpillar G C T P n ( 2 , 2 , , 2 ) of order 3 n . The maximal shortest paths cover of G is formed by n vertices of spine by Theorem 4 and we have ξ ( G ) = n . On the hand ψ k ( G ) n 2 whenever k 4 . This means ξ ( G ) ψ k ( G ) n n 2 n n 2 = n 2 and for sufficiently large n we obtain the desired result.  □
Notice that the first item of the above proposition holds also for k { 2 , 3 } . The example G C T P n ( 2 , 0 , 2 , , 0 , 2 ) for an odd n shows that equality ξ ( G ) = ψ 3 ( G ) is attainable. In contrast we have ξ ( K r ) = r 1 > r 2 = ψ 3 ( K 3 ) . Clearly, the inequality ξ ( G ) > ψ 2 ( G ) is not attainable, by Proposition 3, for a connected graph G as ψ 2 ( G ) = β ( G ) .

Author Contributions

I.P. and G.S. contributed equally to all stages of the research and paper preparation. Both authors have read and agreed to the published version of the manuscript.

Funding

The research of the first author was partially supported by the Slovenian research agency by the grants P1-0297, J1-1693 and J1-9109. The research of the second author was partially supported by the Slovak Grant Agency for Science (VEGA) under contract 1/0177/21. This work was done during the visit of the first author at the Pavol Jozef Šafárik University in Košice, Slovakia using infrastructure developed by the project UVP Technicom ITMS 313011D232.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sebo, A.; Tannier, E. On metric generators of graphs. Math. Oper. Res. 2004, 29, 383–393. [Google Scholar] [CrossRef]
  2. Oellermann, O.R.; Peters-Fransen, J. The strong metric dimension of graphs and digraphs. Discret. Appl. Math. 2007, 155, 356–364. [Google Scholar] [CrossRef] [Green Version]
  3. Kratica, J.; Kovačević-Vujčić, V.; Čangalović, M.; Stojanović, M. Minimal doubly resolving sets and the strong metric dimension of Hamming graphs. Appl. Anal. Discret. Math. 2012, 6, 63–71. [Google Scholar] [CrossRef]
  4. Kuziak, D.; Yero, I.G.; Rodríguez-Velázquez, J.A. Closed formulae for the strong metric dimension of lexicographic product graphs. Discuss. Math. Graph Theory 2016, 36, 1051–1064. [Google Scholar] [CrossRef]
  5. Kuziak, D.; Yero, I.G.; Rodríguez-Velázquez, J.A. On the strong metric dimension of the strong products of graphs. Open Math. 2015, 13, 64–74. [Google Scholar] [CrossRef]
  6. Kuziak, D.; Yero, I.G.; Rodríguez-Velázquez, J.A. On the strong metric dimension of corona product graphs and join graphs. Discret. Appl. Math. 2013, 161, 1022–1027. [Google Scholar] [CrossRef] [Green Version]
  7. Rodríguez-Velázquez, J.A.; Yero, I.G.; Kuziak, D.; Oellermann, O.R. On the strong metric dimension of Cartesian and direct products of graphs. Discret. Math. 2014, 335, 8–19. [Google Scholar] [CrossRef]
  8. Karp, R.M. Reducibility Among Combinatorial Problems. In Complexity of Computer Computations; Miller, R.E., Thatcher, J.W., Bohlinger, J.D., Eds.; The IBM Research Symposia Series; Springer: Boston, MA, USA, 1972; pp. 85–103. [Google Scholar] [CrossRef]
  9. Brešar, B.; Kardoš, F.; Katrenič, J.; Semanišin, G. Minimum k-path vertex cover. Discret. Appl. Math. 2011, 159, 1189–1195. [Google Scholar] [CrossRef] [Green Version]
  10. Brešar, B.; Jakovac, M.; Katrenič, J.; Semanišin, G.; Taranenko, A. On the vertex k-path cover. Discret. Appl. Math. 2013, 161, 1943–1949. [Google Scholar] [CrossRef]
  11. Jakovac, M.; Taranenko, A. On the k-path vertex cover of some graph products. Discret. Math. 2013, 313, 94–100. [Google Scholar] [CrossRef] [Green Version]
  12. Jakovac, M. The k-path vertex cover of rooted product graphs. Discret. Appl. Math. 2015, 187, 111–119. [Google Scholar] [CrossRef]
  13. Brešar, B.; Kos, T.; Krivoš-Belluš, R.; Semanišin, G. Hitting subgraphs in P4-tidy graphs. Appl. Math. Comput. 2019, 352, 211–219. [Google Scholar] [CrossRef]
  14. Manuel, P.; Brešar, B.; Klavžar, S. The geodesic-transversal problem. arXiv 2021, arXiv:math.CO/2101.08042. [Google Scholar]
  15. Peterin, I.; Semanišin, G. On maximal shortest paths cover number of join and lexicographic product of graphs. 2021; in preparation. [Google Scholar]
  16. Borowiecki, M.; Broere, I.; Frick, M.; Mihók, P.; Semanišin, G. A survey of hereditary properties of graphs. Discuss. Math. Graph Theory 1997, 17, 5–50. [Google Scholar] [CrossRef]
  17. Bollobás, B.; Thomason, A. Hereditary and monotone properties of graphs. In The mathematics of Paul Erdős II, Algorithms and Combinatorics 14; Graham, R., Nešetřil, J., Eds.; Springer: Berlin/Heidelberg, Germany, 1997; pp. 70–78. [Google Scholar] [CrossRef]
Figure 1. Black vertices form a maximal shortest paths cover.
Figure 1. Black vertices form a maximal shortest paths cover.
Mathematics 09 01592 g001
Figure 2. Caterpillar with one weak support v and two strong supports u and w.
Figure 2. Caterpillar with one weak support v and two strong supports u and w.
Mathematics 09 01592 g002
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Peterin, I.; Semanišin, G. On the Maximal Shortest Paths Cover Number. Mathematics 2021, 9, 1592. https://doi.org/10.3390/math9141592

AMA Style

Peterin I, Semanišin G. On the Maximal Shortest Paths Cover Number. Mathematics. 2021; 9(14):1592. https://doi.org/10.3390/math9141592

Chicago/Turabian Style

Peterin, Iztok, and Gabriel Semanišin. 2021. "On the Maximal Shortest Paths Cover Number" Mathematics 9, no. 14: 1592. https://doi.org/10.3390/math9141592

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop