Vertex and edge metric dimensions of cacti
Abstract
In a graph a vertex (resp. an edge) metric generator is a set of vertices such that any pair of vertices (resp. edges) from is distinguished by at least one vertex from The cardinality of a smallest vertex (resp. edge) metric generator is the vertex (resp. edge) metric dimension of In [19] we determined the vertex (resp. edge) metric dimension of unicyclic graphs and that it takes its value from two consecutive integers. Therein, several cycle configurations were introduced and the vertex (resp. edge) metric dimension takes the greater of the two consecutive values only if any of these configurations is present in the graph. In this paper we extend the result to cactus graphs i.e. graphs in which all cycles are pairwise edge disjoint. We do so by defining a unicyclic subgraph of for every cycle of and applying the already introduced approach for unicyclic graphs which involves the configurations. The obtained results enable us to prove the cycle rank conjecture for cacti. They also yield a simple upper bound on metric dimensions of cactus graphs and we conclude the paper by conjecturing that the same upper bound holds in general.
Keywords: vertex metric dimension; edge metric dimension; cactus graphs, zero forcing number, cycle rank conjecture.
AMS Subject Classification numbers: 05C12; 05C76
1 Introduction
The concept of metric dimension was first studied in the context of navigation system in various graphical networks [7]. There the robot moves from one vertex of the network to another, and some of the vertices are considered to be a landmark which helps a robot to establish its position in a network. Then the problem of establishing the smallest set of landmarks in a network becomes a problem of determining a smallest metric generator in a graph [12].
Another interesting application is in chemistry where the structure of a chemical compound is frequently viewed as a set of functional groups arrayed on a substructure. This can be modeled as a labeled graph where the vertex and edge labels specify the atom and bond types, respectively, and the functional groups and substructure are simply subgraphs of the labeled graph representation. Determining the pharmacological activities related to the feature of compounds relies on the investigation of the same functional groups for two different compounds at the same point [3]. Various other aspects of the notion were studied [1, 5, 13, 15] and a lot of research was dedicated to the behaviour of metric dimension with respect to various graph operations [2, 3, 17, 23].
In this paper, we consider only simple and connected graphs. By we denote the distance between a pair of vertices and in a graph . A vertex from distinguishes or resolves a pair of vertices and from if We say that a set of vertices is a vertex metric generator, if every pair of vertices in is distinguished by at least one vertex from The vertex metric dimension of denoted by is the cardinality of a smallest vertex generator in . This variant of metric dimension, as it was introduced first, is sometimes called only metric dimension and the prefix ”vertex” is omitted.
In [11] it was noticed that there are graphs in which none of the smallest metric generators distinguishes all pairs of edges, so this was the motivation to introduce the notion of the edge metric generator and dimension, particularly to study the relation between and
The distance between a vertex and an edge in a graph is defined by Recently, two more variants of metric dimension were introduced, namely the edge metric dimension and the mixed metric dimension of a graph Similarly as above, a vertex distinguishes two edges if So, a set is an edge metric generator if every pair of vertices is distinguished by at least one vertex from and the cardinality of a smallest such set is called the edge metric dimension and denoted by Finally, a set is a mixed metric generator if it distinguishes all pairs from and the mixed metric dimension, denoted by , is defined as the cardinality of a smallest such set in .
This new variant also attracted a lot of attention [6, 8, 16, 24, 25, 26], with one particular direction of research being the study of unicyclic graphs and the relation of the two dimensions on them [14, 18, 19]. The mixed metric dimension is then a natural next step, as it unifies these two concepts. It was introduced in [10] and further studied in [21, 20]. A wider and systematic introduction to these three variants of metric dimension can be found in [9].
In this paper we establish the vertex and the edge metric dimension of cactus graph, using the approach from [19] where the two dimensions were established for unicyclic graphs. The extension is not straightforward, as in cactus graphs a problem with indistinguishable pairs of edges and vertices may arise from connecting two cycles, so additional condition will have to be introduced.
2 Preliminaries
A cactus graph is any graph in which all cycles are pairwise edge disjoint. Let be a cactus graph with cycles and let denote the length of a cycle in For a vertex of a cycle denote by the connected component of which contains If is a unicyclic graph, then is a tree, otherwise may contain a cycle. When no confusion arises from that, we will use the abbreviated notation A thread hanging at a vertex of degree is any path such that is a leaf, are of degree and is connected to by an edge. The number of threads hanging at is denoted by
We say that a vertex is branch-active if or contains a vertex of degree distinct from . We denote the number of branch-active vertices on by If a vertex from a cycle is branch-active, then contains both a pair of vertices and a pair of edges which are not distinguished by any vertex outside , see Figure 1.

Now, we will introduce a property called ”branch-resolving” which a set of vertices must possess in order to avoid this problem of non distinguished vertices (resp. edges) due to branching. First, a thread hanging at a vertex of degree is -free if it does not contain a vertex from Now, a set of vertices is branch-resolving if at most one -free thread is hanging at every vertex of degree . Therefore, for every branch-resolving set it holds that where
It is known in literature [11, 12] that for a tree it holds that
Also, given a set of vertices we say that a vertex is -active if contains a vertex from The number of -active vertices on a cycle is denoted by If for every cycle in then we say the set is biactive. For a biactive branch-resolving set the following holds: if a vertex from a cycle is branch-active, then contains a vertex with two threads hanging at it or contains a cycle, either way contains a vertex from so is -active. Therefore, for a biactive branch-resolving set we have for every .
Lemma 1
Let be a cactus graph and let be a set of vertices in If is a vertex (resp. an edge) metric generator, then is a biactive branch-resolving set.
Proof. Suppose to the contrary that a vertex (resp. an edge) metric generator is not a biactive branch-resolving set. If is not branch-resolving, then there exists a vertex of degree and two threads hanging at which do not contain a vertex from Let and be two neighbors of each belonging to one of these two threads. Then and (resp. and ) are not distinguished by a contradiction.
Assume now that is not biactive. We may assume that has at least one cycle, otherwise is a tree and there is nothing to prove. Notice that an empty set cannot be either a vertex or an edge metric generator in a cactus graph unless but then it is a tree. Therefore, if is not biactive, there must exist a cycle with precisely one -active vertex and let and be the two neighbors of on Then and (resp. and ) are not distinguished by a contradiction.
The above lemma gives us a necessary condition for to be a vertex (resp. an edge) metric generator in a cactus graph. In [19], a more elaborate condition for unicyclic graphs was established, which is both necessary and sufficient. In this paper we will extend that condition to cactus graphs, but to do so we first need to introduce the following definitions from [19]. Let be a cycle in a cactus graph and let and be three vertices of we say that and are a geodesic triple on if
It was shown in [18] that a biactive branch-resolving set with a geodesic triple of -active vertices on every cycle is both a vertex and an edge metric generator. This result is useful for bounding the dimensions from above. Also, we need the definition of the five graph configurations from [19].
Definition 2
Let be a cactus graph, a cycle in of the length , and a biactive branch-resolving set in . We say that is canonically labeled with respect to if is -active and is -active is as small as possible.
Let us now introduce five configurations which a cactus graph can contain with respect to a biactive branch-resolving set All these configurations are illustrated by Figure 2.
Definition 3
Let be a cactus graph, a canonically labeled cycle in of the length , and a biactive branch-resolving set in . We say that the cycle with respect to contains configurations:
-
. If , is even, and ;
-
. If and there is an -free thread hanging at a vertex for some ;
-
. If , is even, and there is an -free thread of the length hanging at a vertex for some ;
-
. If and there is an -free thread hanging at a vertex for some ;
-
. If and there is an -free thread of the length hanging at a vertex with Moreover, if is even, an -free thread must be hanging at the vertex with .

Notice that only an even cycle can contain configuration or . Also, configurations and are almost the same, they differ only if is odd where the index can take two more values in than in Finally, for configurations , , and it holds that so there are only two -active vertices on the cycle and hence no geodesic triple of -active vertices. On the other hand, for configurations and there might be more than two -active vertices on the cycle but the bounds and again imply there is no geodesic triple of -active vertices on Therefore, we can state the following observation which is useful for constructing metric generators.
Observation 4
If there is a geodesic triple of -active vertices on a cycle of a cactus graph then does not contain any of the configurations , , , , and with respect to
The following result regarding configurations , , , , and was established for unicyclic graphs (see Lemmas 6, 7, 13 and 14 from [19]).
Theorem 5
Let be a unicyclic graph with the cycle and let be a biactive branch-resolving set in . The set is a vertex (resp. an edge) metric generator if and only if does not contain any of configurations , , and (resp. , , and ) with respect to
In this paper we will extend this result to cactus graphs and then use it to determine the exact value of the vertex and the edge metric dimensions of such graphs. We first give an example how this approach with configurations can be extended to cactus graphs.
Example 1
Let be the cactus graph from Figure 3. The graph contains six cycles and the set is a smallest biactive branch-resolving set in . In the figure the set of -active vertices on each cycle is marked by a dashed circle. The cycle (resp. , , , ) with respect to contains configuration (resp. and also , , on odd cycle, on even cycle), so in each of these cycles there is a pair of vertices and/or edges and which is not distinguished by The cycle does not contain any of the five configurations as there is a geodesic triple of -active vertices on so all pairs of vertices and all pair of edges in are distinguished by .

Besides this configuration approach, in cactus graphs an additional condition will have to be introduced for the situation when a pair of cycles share a vertex.
3 Metric generators in cacti
Let be a cactus graph with cycles We say that a vertex gravitates to a cycle in if there is a path from to a vertex from which does not share any edge nor any internal vertex with any cycle of A unicyclic region of the cycle from is the subgraph of induced by all vertices that gravitate to in The notion of unicyclic region of a cactus graph is illustrated by Figure 4.
Notice that each unicyclic region is a unicyclic graph with its cycle being Also, considering the example from Figure 4, one can easily notice that two distinct unicyclic regions may not be vertex disjoint, as the path connecting vertex and the cycle belongs both to and But, it does hold that all unicyclic regions cover the whole We say that a subgraph of a graph is an isometric subgraph if for every pair of vertices The following observation is obvious.
Observation 6
The unicyclic region of a cycle is an isometric subgraph of
Finally, we say that a vertex from a unicyclic region is a boundary vertex if for In the example from Figure 4, the boundary vertices of the region are and .
Let be a biactive branch-resolving set in and let be a unicyclic region in For the set we define the regional set as the set obtained from by introducing all boundary vertices from to . For example, in Figure 4 the set is the regional set in the region of the cycle .
Lemma 7
Let be a cactus graph with cycles and let . If is a vertex (resp. edge) metric generator in then the regional set is a vertex (resp. edge) metric generator in the unicyclic region for every .
Proof. Suppose first that there is a cycle in such that the regional set is not a vertex (resp. an edge) metric generator in the unicyclic region This implies that there exists a pair of vertices (resp. edges) and in which are not distinguished by We will show that and are not distinguished by in either. Suppose the contrary, i.e. there is a vertex which distinguishes and in If then Since is an isometric subgraph of then and would be distinguished by in a contradiction. Assume therefore that Notice that the shortest path from every vertex (resp. edge) in to leads through a same boundary vertex in The definition of implies so and are not distinguished by Therefore, we obtain
so and are not distinguished by in a contradiction.
Notice that the condition from Lemma 7 is necessary for to be a metric generator, but it is not sufficient as is illustrated by the graph shown in Figure 5 in which every regional set is a vertex (resp. an edge) metric generator in the corresponding region , but there still exists a pair of vertices (resp. edges) which is not distinguished by so is not a vertex (resp. an edge) metric generator in .

Next, we will introduce notions which are necessary to state a condition which will be both necessary and sufficient for a biactive branch-resolving set to be a vertex (resp. an edge) metric generator in a cactus graph An -path of the cycle is any subpath of which contains all -active vertices on and is of minimum possible length. We denote an -path of the cycle by . Notice that the end-vertices of an -path are always -active, otherwise it would not be shortest. For example, on the cycle in Figure 5 there are two different paths connecting -active vertices and one is of the length and the other of length so the shorter one is an -path. Also, an -path of a cycle may not be unique, as there may exist several shortest subpaths of containing all -active vertices on but if the length of satisfies then is certainly unique and its end-vertices are and in the canonical labelling of
Definition 8
Let be a cactus graph with cycles and let be a biactive branch-resolving set in We say that a vertex is vertex-critical (resp. edge-critical) on with respect to if is an end-vertex of and (resp. ).
Notice that the notion of a vertex-critical and an edge-critical vertex differs only on odd cycles. We say that two distinct cycles and of a cactus graph are vertex-critically incident (resp. edge-critically incident) with respect to if and share a vertex which is vertex-critical (resp. edge-critical) with respect to on both and . Notice that on odd cycles the required length of an -path for to be vertex-critical differs from the one required for to be edge-critical, while on even cycles the required length is the same.
To illustrate this notion, let us consider the cycle in the graph from Figure 5. Vertices and are both vertex-critical and edge-critical on with respect to from the figure. Vertex belongs also to and it is also both vertex- and edge-critical on Therefore, cycles and are both vertex- and edge-critically incident, the consequence of which is that a pair of vertices and which are neighbors of and a pair of edges and which are incident to are not distinguished by On the other hand, vertex belongs also to on which it is edge-critical, but it is not vertex-critical since is not short enough. So, and are edge-critically incident, but not vertex-critically incident. Consequently, a pair of edges and is not distinguished by but a pair of vertices and is distinguished by We will show in the following lemma that this holds in general.
Lemma 9
Let be a cactus graph with cycles and let be a biactive branch-resolving set in . If is a vertex (resp. an edge) metric generator in then there is no pair of cycles in which are vertex-critically (resp. edge critically) incident with respect to .
Proof. Let be a vertex (resp. an edge) metric generator in Suppose the contrary, i.e. there are two distinct cycles and in which are vertex-critically (resp. edge-critically) incident with respect to . This implies that and share a vertex which is vertex-critical (resp. edge-critical) on both and . Let and be a pair of vertices (resp. edges) which are neighbors (resp. incident) to on cycles and respectively, but which are not contained on paths and The length of paths and which is required by the definition of a vertex-critical (resp. edge-critical) vertex implies that a shortest path from both and to all vertices from and leads through Since and contain all -active vertices on and this further implies that a shortest path from both and to all vertices from leads through Since , it follows that and are not distinguished by a contradiction.
Each of Lemmas 7 and 9 gives a necessary condition for a biactive branch-resolving set to be a vertex (resp. an edge) metric generator in a cactus graph . Let us now show that these two necessary conditions taken together form a sufficient condition for to be a vertex (resp. an edge) metric generator.
Lemma 10
Let be a cactus graph with cycles and let be a biactive branch-resolving set in . If a regional set is a vertex (resp. an edge) metric generator in the unicyclic region for every and there are no vertex-critically (resp. edge-critically) incident cycles in then is a vertex (resp. an edge) metric generator in
Proof. Let and be a pair of vertices (resp. edges) from We want to show that distinguishes and In order to do so, we distinguish the following two cases.
Case 1: and belong to a same unicyclic region of Since the regional set is a vertex (resp. an edge) metric generator in there is a vertex which distinguishes and in If then the fact that is an isometric subgraph of implies that the pair and is distinguished by the same in as well. Assume therefore that so the definition of the regional set implies that is a boundary vertex of Let be a vertex in such that the shortest path from to both and leads through the boundary vertex Recall that such a vertex must exist since is biactive. The fact that distinguishes and in , implies which further implies
so the pair and is distinguished by in .
Case 2: and do not belong to a same unicyclic region of Let us assume that belongs to and does not belong to and say it belongs to for . If and are distinguished by a vertex then the claim is proven, so let us assume that and are not distinguished by any Since and do not belong to a same unicyclic region, there exists a boundary vertex of the unicyclic region such that the shortest path from to leads through Let be a vertex from such that the shortest path from to also leads through which must exist since is biactive. We want to prove that and are distinguished by Let us suppose the contrary, i.e. Then we have the following
from which we obtain
(1) |
Now, we distinguish the following two subcases.
Subcase 2.a: does not belong to Notice that by the definition of the unicyclic region, any acyclic structure hanging at in is not included in , as is illustrated by from Figure 4, which implies is a leaf in Let be the only neighbor of in The inequality (1) further implies since belongs to and does not. Let be the vertex from closest to which implies is -active on Let be an -active vertex on distinct from such a vertex must exist on because we assumed is biactive. So, we have
Let be a vertex from which belongs to the connected component of containing Then we have
Therefore, distinguishes and so is a vertex (resp. an edge) metric generator in
Subcase 2.b: belongs to Since is a boundary vertex of the unicyclic region this implies there is a cycle for such that . Therefore, cycles and share the vertex Notice that any acyclic structure hanging at belongs to both and , as is illustrated by from Figure 4. If belongs to then neither nor can belong to an acyclic structure hanging at as we assumed that and do not belong to a same component. On the other hand, if does not belong to and belongs to an acyclic structure hanging at then we switch by and assume that belongs to This way we assure that neither not belong to an acyclic structure hanging at
If let be an -active vertex on distinct from which must exist as is biactive. From (1) we obtain
so similarly as in previous subcase and are distinguished by a vertex which belongs to the connected component of which contains
Therefore, assume that If a shortest path from to all -active vertices on and a shortest path from to all -active vertices on leads through then belongs to i.e. , and the pair of cycles and are vertex-critically (resp. edge-critically) incident, a contradiction. So, we may assume there is an -active vertex , say on , such that a shortest path from to does not lead through Therefore,
But now, similarly as in previous cases we have that and are distinguished by a vertex which is contained in the connected component of containing
Let us now relate these results with configurations , , and .
Lemma 11
Let be a cactus graph and let be a biactive branch-resolving set in A cycle of the graph contains configuration (or or or or ) with respect to in if and only if contains the respective configuration with respect to in
Proof. Let be a cactus graph with cycles and let be a biactive branch-resolving set in Since is a biactive set, for every boundary vertex in a unicyclic region there is a vertex such that the shortest path from to leads through as it is shown in Figure 4. This implies that the set of -active vertices on in is the same as the set of -active vertices on in Since the presence of configurations , , , and on a cycle , with respect to a set by definition depends on the position of -active vertices on the claim follows.
Notice that Lemmas 7, 9 and 10 give us a condition for to be a vertex (resp. an edge) metric generator in a cactus graph, which is both necessary and sufficient. In the light of Lemma 11, we can further apply Theorem 5 to obtain the following result which unifies all our results.
Theorem 12
Let be a cactus graph with cycles and let be a biactive branch-resolving set in . The set is a vertex (resp. an edge) metric generator if and only if each cycle does not contain any of the configurations , , and (resp. , , and ) and there are no vertex-critically (resp. edge-critically) incident cycles in with respect to .
Proof. Let be a vertex (resp. an edge) metric generator in . Then Lemma 7 implies that is a vertex (resp. edge) metric generator in the unicyclic region and the Theorem 5 further implies that every cycle does not contain any of the configurations , , and (resp. , , and ) with respect to Also, Lemma 9 implies that there are no vertex-critically (resp. edge-critically) incident cycles in with respect to .
4 Metric dimensions in cacti

Let be a cactus graph and a smallest biactive branch-resolving set in Then
where If , then the set of -active vertices on is the same for all smallest biactive branch-resolving sets . The set of -active vertices may differ only on cycles with Therefore, such a cycle may contain one of the configurations with respect to one smallest biactive branch-resolving set, but not with respect to another. This is illustrated by Figure 6.
Definition 13
We say that a cycle from a cactus graph is -negative (resp. -negative), if there exists a smallest biactive branch-resolving set in such that does not contain any of the configurations and (resp. and ) with respect to Otherwise, we say that is -positive (resp. -positive). The number of -positive (resp. -positive) cycles in is denoted by (resp. ).
For two distinct smallest biactive branch-resolving sets , the set of -active vertices may differ only on cycles with Let and be two such cycles in and notice that the choice of the vertices included in from the region of is independent of the choice from Therefore, there exists at least one smallest biactive branch-resolving set such that every -negative (resp. -negative) avoids the three configurations with respect to Notice that there may exist more than one such set and in that case they all have the same size, so among them we may choose the one with the smallest number of vertex-critical (resp. edge-critical) incidencies. Therefore, we say that a smallest biactive branch-resolving set is nice if every -negative (resp. -negative) cycle does not contain the three configurations with respect to and the number of vertex-critically (resp. edge-critically) incident pairs of cycles with respect to is the smallest possible. The niceness of a smallest biactive branch-resolving set is illustrated by Figure 7.

A set is a vertex cover if it contains a least one end-vertex of every edge in The cardinality of a smallest vertex cover in is the vertex cover number denoted by Now, let be a cactus graph and let be a nice smallest biactive branch-resolving set in We define the vertex-incident graph (resp. edge-incident graph ) as a graph containing a vertex for every cycle in where two vertices are adjacent if the corresponding cycles in are -negative and vertex-critically incident (resp. -negative and edge-critically incident) with respect to . For example, if we consider the cactus graph from Figure 8, then where and
We are now in a position to establish the following theorem which gives us the value of the vertex and the edge metric dimensions in a cactus graph.
Theorem 14
Let be a cactus graph. Then
and
Proof. If there is a cycle in with then is a unicyclic graph. For unicyclic graphs with we have and if the three configurations , , (resp. , , ) cannot be avoided by choosing two vertices into then (resp. ) and also the third vertex must be introduced to so the claim holds. In all other situations equals the number of cycles in with
Let be a smallest vertex (resp. edge) metric generator in . Due to Lemma 1 the set must be branch-resolving. Let be a smallest branch-resolving set contained in so Since according to Lemma 1 the set must also be biactive, let be a smallest set such that is biactive. Obviously, and
Since is a smallest biactive branch-resolving set in it follows that every -positive (resp. -positive) cycle in contains at least one of the three configurations with respect to so according to Theorem 12 the set is not a vertex (resp. an edge) metric generator in Therefore, each -positive (resp. -positive) cycle must contain a vertex where we may assume that is chosen so that it forms a geodesic triple on with vertices from so according to Observation 4 the cycle will not contain any of the configurations with respect to Denote by the set of vertices from every -positive (resp. -positive) cycle in Obviously, and (resp. ).
Notice that is a biactive branch-resolving set in such that every cycle in does not contain any of the configurations (resp. ) with respect to it. Notice that still may not be a vertex (resp. an edge) metric generator, as there may exist vertex-critically (resp. edge-critically) incident cycles in with respect to Since is a smallest vertex (resp. edge) metric generator, we may assume that is chosen so that a smallest biactive branch-resolving set is nice. Therefore, the graph (resp. ) contains an edge for every pair of cycles in which are -negative and vertex-critically incident (resp. -negative and edge-critically incident) with respect to Let us denote For each edge in (resp. ) the set must contain a vertex from or chosen so that it forms a geodesic triple of -active vertices on or with other vertices from Therefore, must contain at least (resp. ) vertices in order for to be a vertex (resp. an edge) metric generator. Since is a smallest vertex (resp. edge) metric generator, it must hold (resp. ).
We have established that where so Since we also established (resp. ) and (resp. ), the proof is finished.
The formulas for the calculation of metric dimensions from the above theorem are illustrated by the following examples.
Example 2
Let us consider the cactus graph from Figure 6. The set is an optimal smallest biactive branch-resolving set in But, since is both - and -positive, the set is neither a vertex nor an edge metric generator. Let be any vertex from which forms a geodesic triple with two -active vertices on Then the set is a smallest vertex (resp. edge) metric generator, so we obtain
and

Let us now give an example of determining the vertex and the edge metric dimensions on a cactus graph which is a bit bigger.
Example 3
Let be the cactus graph from Figure 8. The following table gives the choice and the number of vertices for every expression in the formulas for metric dimensions from Theorem 14
|
Therefore, the set is a smallest vertex metric generator, so we obtain
On the other hand, the set is a smallest edge metric generator, so we have
Notice that Also, if then The similar holds for and From this and Theorem 14 we immediately obtain the following result.
Corollary 15
Let be a cactus graph with cycles. Then and
Further, notice that in a cactus graph with at least two cycles every cycle has at least one branch-active vertex. Therefore, in such a cactus graph we have with equality holding only if for every cycle in . Since if and only if and and similarly holds for the edge version of metric dimension, Theorem 14 immediately implies the following simple upper bound on the vertex and edge metric dimensions of a cactus graph .
Corollary 16
Let be a cactus graph with cycles. Then
with equality holding if and only if every cycle in is -positive and contains precisely one branch-active vertex.
Corollary 17
Let be a cactus graph with cycles. Then
with equality holding if and only if every cycle in is -positive and contains precisely one branch-active vertex.
Notice that the upper bound from the above corollary may not hold for , i.e. for unicyclic graphs, as for the cycle of unicyclic graph it may hold that As for the tightness of these bounds, we have the following proposition.
Proposition 18
For every pair of integers and there is a cactus graph with cycles such that and
Proof. For a given pair of integers and we construct a cactus graph in a following way. Let be a graph on vertices, with one vertex of degree and all other vertices of degree , i.e. is a star graph. Let be a graph obtained from the -cycle by introducing a leaf to it and let be vertex disjoint copies of . Denote by the only vertex of degree in Let be a graph obtained from by connecting them with an edge for . Obviously, is a cactus graph with cycles and . On each of the cycles in the vertex is the only branch-active vertex. If is a smallest branch-resolving set in such that there is a cycle in with only two -active vertices, then because of the leaf pending on the cycle contains either configuration if the pair of -active vertices on is an antipodal pair or both configuration and Either way, is not a vertex nor an edge metric generator.
On the other hand, the set consisting of leaves hanging at in and a pair of vertices from each -cycle which form a geodesic triple with on the cycle is both a vertex and an edge metric generator in Since the claims hold.
5 An application to zero forcing number
The results from previous section enable us to solve for cactus graphs a conjecture posed in literature [4] which involves the vertex metric dimension, the zero forcing number and the cyclomatic number (which is sometimes called the cycle rank number and denoted by ) of a graph . Notice that in a cactus graph the cyclomatic number equals the number of cycles in Let us first define the zero forcing number of a graph.
Assuming that every vertex of a graph is assigned one of two colors, say black and white, the set of vertices which are initially black is denoted by If there is a black vertex with only one white neighbor, then the color-change rule converts the only white neighbor also to black. This is one iteration of color-change rule, it can be applied iteratively. A zero forcing set is any set such that all vertices of are colored black after applying the color-change rule finitely many times. The cardinality of the smallest zero forcing set in a graph is called the zero forcing number of and it is denoted by In [4] it was proven that for a unicyclic graph it holds that , and it was further conjectured the following.
Conjecture 19
For any graph it holds that
Moreover, they proved for cacti with even cycles the bound We will use our results to prove that for cacti the tighter bound from the above conjecture holds.
Proposition 20
Let be a cactus graph. Then and
Proof. Due to Corollary 15 it is sufficient to prove that Let be a zero forcing set in Let us first show that must be a branch-resolving set. Assume the contrary, i.e. that is not a branch-resolving set and let be a vertex of degree with at least two -free threads hanging at But then has at least two white neighbors, one on each of the -free threads hanging at it, which cannot be colored black by so is not a zero forcing set, a contradiction.
Let be a smallest branch-resolving set contained in and let Obviously, and We now wish to prove that If is a tree, then the claim obviously holds, so let us assume that contains at least one cycle. Let be a cycle in such that If then is a unicyclic graph and the only cycle in . Since we have so Since a zero forcing set in unicyclic graph must contain at least two vertices, we obtain and the claim is proven.
Assume now that for every cycle with it holds that Let be the branch-active vertex on such a cycle and notice that can turn only black on Therefore, in order for to be a zero forcing set it follows that must contain a vertex from every such cycle, i.e. Therefore,
The above proposition, besides proving for cacti the cycle rank conjecture which was posed for also gives a similar result for So, this motivates us to pose for the counterpart conjecture of Conjecture 19.
6 Concluding remarks
In [18] it was established that for a unicyclic graph both vertex and edge metric dimensions are equal to or In [19] a characterization under which both of the dimensions take one of the two possible values was further established. In this paper we extend the result to cactus graphs where a similar characterization must hold for every cycle in a graph, and also the additional characterization for the connection of two cycles must be introduced. This result enabled us to prove the cycle rank conjecture for cactus graphs.
Moreover, the results of this paper enabled us to establish a simple upper bound on the value of the vertex and the edge metric dimension of a cactus graph with cycles
Since the number of cycles can be generalized to all graphs as the cyclomatic number we conjecture that the analogous bounds hold in general.
Conjecture 21
Let be a connected graph. Then,
Conjecture 22
Let be a connected graph. Then,
In [21] it was shown that the inequality holds for -connected graphs. Since and the previous two conjectures obviously hold for -connected graphs.
Also, motivated by the bound on edge metric dimension of cacti involving zero forcing number, we state the following conjecture for general graphs, as a counterpart of Conjecture 19.
Conjecture 23
Let be a connected graph. Then,
Acknowledgments. Both authors acknowledge partial support of the Slovenian research agency ARRS program P1-0383 and ARRS projects J1-1692 and J1-8130. The first author also the support of Project KK.01.1.1.02.0027, a project co-financed by the Croatian Government and the European Union through the European Regional Development Fund - the Competitiveness and Cohesion Operational Programme.
References
- [1] P. S. Buczkowski, G. Chartrand, C. Poisson, P. Zhang, On -dimensional graphs and their bases, Period. Math. Hungar. 46(1) (2003) 9–15.
- [2] J. Caceres, C. Hernando, M. Mora, I. M. Pelayo, M. L. Puertas, C. Seara, D. R. Wood, On the metric dimension of Cartesian products of graphs, SIAM J. Discrete Math. 21(2) (2007) 423–441.
- [3] G. Chartrand, L. Eroh, M. A. Johnson, O. R. Oellermann, Resolvability in graphs and the metric dimension of a graph, Discrete Appl. Math. 105 (2000) 99–113.
- [4] L. Eroh, C.X. Kang, E. Yi, A comparison between the metric dimension and zero forcing number of trees and unicyclic graphs, Acta Math. Sin. (Engl. Ser.) 33(6) (2017) 731–747.
- [5] M. Fehr, S. Gosselin, O. R. Oellermann, The metric dimension of Cayley digraphs, Discrete Math. 306 (2006) 31–41.
- [6] J. Geneson, Metric dimension and pattern avoidance in graphs, Discrete Appl. Math. 284 (2020) 1–7.
- [7] F. Harary, R. A. Melter, On the metric dimension of a graph, Ars Combin. 2 (1976) 191–195.
- [8] Y. Huang, B. Hou, W. Liu, L. Wu, S. Rainwater, S. Gao, On approximation algorithm for the edge metric dimension problem, Theoret. Comput. Sci. (2020), doi:https://doi.org/10.1016/j.tcs.2020.05.005.
- [9] A. Kelenc, Distance-Based Invariants and Measures in Graphs, PhD thesis, University of Maribor, Faculty of Natural Sciences and Mathematics, 2020.
- [10] A. Kelenc, D. Kuziak, A. Taranenko, I. G. Yero, Mixed metric dimension of graphs, Appl. Math. Comput. 314(1) (2017) 42–438.
- [11] A. Kelenc, N. Tratnik, I. G. Yero, Uniquely identifying the edges of a graph: the edge metric dimension, Discrete Appl. Math. 251 (2018) 204–220.
- [12] S. Khuller, B. Raghavachari, A. Rosenfeld, Landmarks in graphs, Discrete Appl. Math. 70 (1996) 217–229.
- [13] D. J. Klein, E. Yi, A comparison on metric dimension of graphs, line graphs, and line graphs of the subdivision graphs, Eur. J. Pure Appl. Math. 5(3) (2012) 302–316.
- [14] M. Knor, S. Majstorović, A. T. M. Toshi, R. Škrekovski, I. G. Yero, Graphs with the edge metric dimension smaller than the metric dimension, Appl. Math. Comput. 401 (2021) 126076.
- [15] R. A. Melter, I. Tomescu, Metric bases in digital geometry, Comput. Vis. Graph. Image Process. 25 (1984) 113–121.
- [16] I. Peterin, I. G. Yero, Edge metric dimension of some graph operations, Bull. Malays. Math. Sci. Soc. 43 (2020) 2465–2477.
- [17] S. W. Saputro, R. Simanjuntak, S. Uttunggadewa, H. Assiyatun, E. T. Baskoro, A. N. M. Salman, M. Bača, The metric dimension of the lexicographic product of graphs, Discrete Math. 313 (2013) 1045–1051.
- [18] J. Sedlar, R. Škrekovski, Bounds on metric dimensions of graphs with edge disjoint cycles, Appl. Math. Comput. 396 (2021) 125908.
- [19] J. Sedlar, R. Škrekovski, Vertex and edge metric dimensions of unicyclic graphs, arXiv:2104.00577 [math.CO].
- [20] J. Sedlar, R. Škrekovski, Extremal mixed metric dimension with respect to the cyclomatic number, Appl. Math. Comput. 404 (2021) 126238.
- [21] J. Sedlar, R. Škrekovski, Mixed metric dimension of graphs with edge disjoint cycles, Discr. Appl. Math. 300 (2021) 1–8.
- [22] P. J. Slater, Leaves of trees, Congr. Numer. 14 (1975) 549–559.
- [23] I. G. Yero, D. Kuziak, J. A. Rodriguez-Velazquez, On the metric dimension of corona product graphs, Comput. Math. Appl. 61 (2011) 2793–2798.
- [24] Y. Zhang, S. Gao, On the edge metric dimension of convex polytopes and its related graphs, J. Comb. Optim. 39(2) (2020) 334–350.
- [25] E. Zhu, A. Taranenko, Z. Shao, J. Xu, On graphs with the maximum edge metric dimension, Discrete Appl. Math. 257 (2019) 317–324.
- [26] N. Zubrilina, On the edge dimension of a graph, Discrete Math. 341(7) (2018) 2083–2088.