The Fault-Tolerant Metric Dimension of Cographs
Duygu Vietz, Egon Wanke

TL;DR
This paper proves that the weighted fault-tolerant metric dimension problem can be efficiently solved in linear time specifically for cographs, advancing understanding of resolving sets in graph theory.
Contribution
It introduces a linear-time algorithm for computing the weighted fault-tolerant metric dimension of cographs, a class of graphs, which was previously unexplored.
Findings
Linear-time algorithm for cographs
Efficient computation of fault-tolerant resolving sets
Extension of metric dimension theory to weighted fault-tolerant cases
Abstract
A vertex set of an undirected graph is a \textit{resolving set} for if for every two distinct vertices there is a vertex such that the distance between and and the distance between and are different. A resolving set is {\em fault-tolerant} if for every vertex set is still a resolving set. {The \em (fault-tolerant) Metric Dimension} of is the size of a smallest (fault-tolerant) resolving set for . The {\em weighted (fault-tolerant) Metric Dimension} for a given cost function is the minimum weight of all (fault-tolerant) resolving sets. Deciding whether a given graph has (fault-tolerant) Metric Dimension at most for some integer is known to be NP-complete. The weighted fault-tolerant Metric Dimension problem has not been studied…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
11institutetext: Heinrich-Heine-University Duesseldorf, Universitaetsstr. 1, 40225 Duesseldorf, Germany
The Fault-Tolerant Metric Dimension of Cographs
Duygu Vietz 11 0000-0001-6881-7832
Egon Wanke 11
Abstract
A vertex set of an undirected graph is a resolving set for if for every two distinct vertices there is a vertex such that the distance between and and the distance between and are different. A resolving set is fault-tolerant if for every vertex set is still a resolving set. The (fault-tolerant) Metric Dimension of is the size of a smallest (fault-tolerant) resolving set for . The weighted (fault-tolerant) Metric Dimension for a given cost function is the minimum weight of all (fault-tolerant) resolving sets. Deciding whether a given graph has (fault-tolerant) Metric Dimension at most for some integer is known to be NP-complete. The weighted fault-tolerant Metric Dimension problem has not been studied extensively so far. In this paper we show that the weighted fault-tolerant metric dimension problem can be solved in linear time on cographs.
Keywords:
Graph algorithm, Complexity, Metric Dimension, Fault-tolerant Metric Dimension, Resolving Set, Cograph
1 Introduction
An undirected graph has metric dimension at most if there is a vertex set such that and , , there is a vertex such that , where is the distance (the length of a shortest path in an unweighted graph) between and . We call a resolving set. Graph has fault-tolerant metric dimension at most if for a resolving set with it holds that for every set is a resolving set for . The metric dimension of is the smallest integer such that has metric dimension at most and the fault-tolerant metric dimension of is the smallest integer such that has fault-tolerant metric dimension at most . The metric dimension was independently introduced by Harary, Melter [12] and Slater [25].
If for three vertices , , we have , then we say that and are resolved by vertex . The metric dimension of is the size of a minimum resolving set and the fault-tolerant metric dimension is the size of a minimum fault-tolerant resolving set. In certain applications, the vertices of a (fault-tolerant) resolving set are also called resolving vertices, landmark nodes or anchor nodes. This is a common naming particularly in the theory of sensor networks.
Determining the metric dimension of a graph is a problem that has an impact on multiple research fields such as chemistry [3], robotics [20], combinatorial optimization [24] and sensor networks [17]. Deciding whether a given graph has metric dimension at most for a given integer is known to be NP-complete for general graphs [11], planar graphs [5], even for those with maximum degree 6 and Gabriel unit disk graphs [17]. Epstein et al. showed the NP-completeness for split graphs, bipartite graphs, co-bipartite graphs and line graphs of bipartite graphs [6] and Foucaud et al. for permutation and interval graphs [9][10].
There are several algorithms for computing the metric dimension in polynomial time for special classes of graphs, as for example for trees [3, 20], wheels [16], grid graphs [21], -regular bipartite graphs [23], amalgamation of cycles [19], outerplanar graphs [5], cactus block graphs [18], chain graphs [8], graphs with a bounded number of resolving vertices in every EBC [26]. The approximability of the metric dimension has been studied for bounded degree, dense, and general graphs in [14]. Upper and lower bounds on the metric dimension are considered in [2, 4] for further classes of graphs.
There are many variants of the Metric Dimension problem. The weighted version was introduced by Epstein et al. in [6], where they gave a polynomial-time algorithms on paths, trees and cographs. Hernando et al. investigated the fault-tolerant Metric Dimension in [15], Estrada-Moreno et al. the -metric Dimension in [7] and Oellermann et al. the strong metric Dimension in [22].
The parameterized complexity was investigated by Hartung and Nichterlein. They showed that for the standard parameter the problem is -complete on general graphs, even for those with maximum degree at most three [13]. Foucaud et al. showed that for interval graphs the problem is FPT for the standard parameter [9][10]. Afterwards Belmonte et al. extended this result to the class of graphs with bounded treelength, which is a superclass of interval graphs and also includes chordal, permutation and AT-free graphs [1].
In this paper we show that the weighted fault-tolerant metric dimension problem can be solved in linear time on cographs and give an algorithm that computes a minimum weight fault-tolerant resolving set.
2 Definitions and Basic Terminology
We consider graphs , where is the set of vertices and is the set of edges. We distinguish between undirected graphs with edge sets and directed graphs with edge sets Graph is a subgraph of , if and . It is an induced subgraph of , denoted by , if or , respectively. Vertex is called a neighbour of vertex , if in an undirected graph or () in a directed graph. With we denote the open neighbourhood of a vertex in an undirected graph and with we denote the closed neighbourhood of a vertex .
A sequence of vertices , , for , is an undirected path of length , if for . The vertices and are the end vertices of undirected path . The sequence is a directed path of length , if for . Vertex is the start vertex and vertex is the end vertex of the directed path . A path is a simple path if all vertices are mutually distinct.
An undirected graph is connected if there is a path between every pair of vertices. An undirected graph is disconnected if it is not connected. A connected component of an undirected graph is a connected induced subgraph of such that there is no connected induced subgraph of with and . A vertex is a separation vertex of an undirected graph if (the subgraph of induced by ) has more connected components than . Two paths and are vertex-disjoint if . A graph with at least three vertices is biconnected, if for every vertex pair , , there are at least two vertex-disjoint paths between and . A biconnected component of is an induced biconnected subgraph of such that there is no biconnected induced subgraph of with and . The distance between two vertices in a connected undirected graph is the smallest integer such that there is a path of length between and . The distance between two vertices such that there is no path between and in is . The complement of an undirected graph is the graph .
Definition 1 (Cograph)
An undirected Graph is a cograph, if
- •
or
- •
for two cographs and or
- •
for a cograph .
A cograph contains no induced , therefore the diameter of a connected cograph is at most 2. That is, the distance between two arbitrary verices in is either 0 or 1 or 2.
Definition 2 (Resolving set, metric dimension)
Let be an undirected graph and let be a function that assigns to every vertex a non-negative weight. A vertex set is a resolving set for if for every vertex pair , there is a vertex such that . A resolving set has weight , if . The set is a minimum resolving set for , if there is no resolving set for with . The set is a minimum weight resolving set for , if there is no resolving set for with . An undirected graph has metric dimension , if is the smallest positive integer such that there is a resolving set for of size . An undirected graph has weighted metric dimension if is the smallest positive integer such that there is a resolving set for of weight .
Definition 3 (Fault-tolerant resolving set, fault-tolerant metric dimension)
Let be an undirected graph and let be a function that assigns to every vertex a non-negative weight. A vertex set is a fault-tolerant resolving set for if for an arbitrary vertex set is a resolving set. A fault-tolerant resolving set has weight , if . The set is a minimum fault-tolerant resolving set for , if there is no fault-tolerant resolving set for with . The set is a minimum weight fault-tolerant resolving set for , if there is no fault-tolerant resolving set for with . An undirected graph has fault-tolerant metric dimension , if is the smallest positive integer such that there is a fault-tolerant resolving set for of size . An undirected graph has weighted fault-tolerant metric dimension , if is the smallest positive integer such that there is a fault-tolerant resolving set for of weight .
Equivalent to this definition one can say that a vertex set is a fault-tolerant resolving set if for every vertex pair there are two resolving vertices. Obviously every fault-tolerant resolving set is also a resolving set.
The concept of fault-tolerance can be extended easily on an arbitrary number of vertices, what is called the -metric dimension in [7], . The -metric dimension is the size of a smallest -resolving set. A -resolving set resolves every pair of vertices at least times. For a -resolving set is a resolving set and for a -resolving set is a fault-tolerant resolving set. One should note that for all there are graphs that does not have a -resolving set (for example graphs with twin vertices), whereas for the entire vertex set is a -resolving set.
Definition 4
Let be an undirected graph and , . For two vertices we call the symmetric difference of and . For a set , we define the function
[TABLE]
is the number of vertices in that are or or a neighbour of , but not of or a neighbour of , but not of .
Definition 5 (neighbourhood-resolving)
Let be an undirected graph and , , and . Set is called neighbourhood-resolving for , if for every pair , , we have .
A set is neighbourhood-resolving for , if for every two vertices there is a vertex that is neighbour of exactly one of the vertices and . If or the value is always at least 1. Obviously, every set that is neighbourhood-resolving for is also a resolving set for .
Definition 6 (2-neighbourhood-resolving)
Let be an undirected graph and , , and . Set is called 2-neighbourhood-resolving for if for every pair , , we have .
A set is 2-neighbourhood-resolving for if
- •
for two vertices there are at least two vertices in that are neighbour of exactly one of the vertices and and
- •
for two vertices such that and there is at least one vertex in that is neighbour of exactly one of the vertices and .
For the value is always at least two. Obviously, every set that is 2-neighbourhood-resolving for is also a fault-tolerant resolving set for .
Lemma 1
Let be a connected cograph and . Vertex set is a fault-tolerant resolving set for if and only if is 2-neighbourhood-resolving for .
Proof
””: Assume that is a fault-tolerant resolving set for . We have to show that is 2-neighbourhood-resolving for , so let and be the vertices that resolve and .
If , then obviously . 2. 2.
If and , then either or . Without loss of generality let . Vertex , so . Since vertex resolves and is a connected cograph (and therefore the diameter is at most 2), has to be adjacent to exactly one of the vertices . Thus, and and therefore . 3. 3.
If , then the distance between and any vertex in and the distance between and any vertex in is not 0. Since and resolve and both are adjacent to exactly one of the vertices and . Thus and therefore .
””: Assume that is 2-neighbourhood-resolving for . We have to show that is a fault-tolerant resolving set for . We do this by giving two resolving vertices for every vertex pair .
If , there are obviously two vertices in , which resolve and . 2. 2.
If and , then resolves . Since and , we have . Thus, there is a vertex , that is adjacent to exactly one of the vertices , so resolves . 3. 3.
If , then . Since , it follows . Thus, there are two vertices , that are both adjacent to exactly one of the vertices and so resolve .
Note that this equivalence does not apply to disconnected cographs, see Figure 1.
Thus, we state that 2-neighbourhood-resolving implies fault-tolerance in a cograph, fault-tolerance implies 2-neighbourhood-resolving in a connected cograph, but not in a disconnected cograph.
Lemma 2
Let be a cograph and . If is 2-neighbourhood-resolving for , then is also 2-neighbourhood-resolving for .
Proof
Let be 2-neighbourhood-resolving for , i.e. for we have . We distinguish between the following cases:
: Obviously, in graph and so in . 2. 2.
and : Since there has to be a vertex , what implies that is neighbour of either or . Without loss of generality let be a neighbour of . In graph vertex is not a neighbour of , but a neighbour of . So, we still have two vertices in graph . 3. 3.
: Since there has to be two vertices , what implies that both are neighbour of exactly one of the vertices . Therefore in graph they are also neighbour of exactly one of the vertices . So, we still have two vertices in graph .
Since 2-neighbourhood-resolving is equivalent to fault-tolerance in connected cographs, we get the following observation:
Observation 2.1
Let be a connected cograph and . If is a fault-tolerant resolving set for , then is also a fault-tolerant resolving set for the disconnected cograph .
Note that a fault-tolerant resolving set for a disconnected cograph is not necessarily a fault-tolerant resolving set for , see Figure 1.
Lemma 3
Let and be two connected cographs and with and be the disjoint union of and . Let be a fault-tolerant resolving set for and be a fault-tolerant resolving set for . Then is a fault-tolerant resolving set for .
Proof
We show that every pair is resolved by two vertices in . If or the pair is obviously resolved twice by vertices in or . If and the pair is resolved by any two resolving vertices , since either or will have distance to and .
Note that is not necessarily 2-neighbourhood-resolving for (see Figure 1).
Definition 7
Let be a cograph and a fault-tolerant resolving set for . A vertex is called a -vertex with respect to , , if .
A vertex is a -vertex, if it has vertices in its closed neighbourhood that are in .
Lemma 4
Let and be two connected cographs and with and be the disjoint union of and . Let be 2-neighbourhood-resolving for and be 2-neighbourhood-resolving for . Vertex set is 2-neighbourhood-resolving for if and only if
there is at most one [math]-vertex with respect to , i.e. there is no [math]-vertex with respect to or there is no [math]-vertex with respect to and 2. 2.
there is no [math]-vertex with respect to , if there is a -vertex in with respect to and 3. 3.
there is no -vertex in with respect to , if there is a [math]-vertex in with respect to .
Proof
””: Assume that is 2-neighbourhood-resolving for .
We show that there is at most one 0-vertex in with respect to . Assume there are two 0-vertices with respect to , i.e. and . Then we have , what contradicts the assumption that is 2-neighbourhood-resolving. 2. 2.
We show that there is no 0-vertex in with respect to if there is a -vertex in with respect to . Assume that there is a 0-vertex in with respect to and a -vertex in with respect to . Then we have , what contradicts the assumption that is 2-neighbourhood-resolving. 3. 3.
analogous to 2.
””: Assume that the conditions 1., 2. and 3. hold. We show that is 2-neighbourhood-resolving for , i.e. for we have . For we have and therefore also . The same holds for . Now let and . if and only if , i.e. if
and or 2. 2.
and or 3. 3.
and
Conditions 1. - 3. guarantee that none of these three cases appear.
Theorem 2.2
Let be a cograph. The weighted fault-tolerant metric dimension of can be computed in linear time.
Proof
We describe a linear time algorithm for computing the weighted fault-tolerant metric dimension of a connected cograph. For disconnected cographs we apply the algorithm for every connected component with at least two vertices. If there are isolated vertices, then each of them has to be in every weighted fault-tolerant resolving set, except for the case that there is exactly one isolated vertex. To get the weighted fault-tolerant metric dimension of the disconnected input graph, we build the sum of the weights of all isolated vertices if there are at least two, and the weighted fault-tolerant metric dimension for each connected component with at least two vertices.
To compute the weighted fault-tolerant metric dimension of a connected cograph it suffices to compute a set that is 2-neighbourhood-resolving for and has minimal costs, since fault-tolerant resolving and 2-neighbourhood-resolving sets are equivalent in connected cographs (Lemma 1). To compute a 2-neighbourhood-resolving set of minimum weight we use dynamic programming along the cotree . The cotree of is a tree that describes the union and complementation of cographs. The inner nodes are either complementation-nodes or union-nodes. Every complementation-node has exactly one child and every union-node has exactly two children. The leafs of are the vertices of .
For every inner node of we compute bottom up different types of minimum weight 2-neighbourhood-resolving sets for the corresponding subgraph of . First we compute the 2-neighbourhood-resolving sets for the fathers of the leafs. For every other inner node we compute the 2-neighbourhood-resolving sets from the 2-neighbourhood-resolving sets of all children of . Finally the minimum weight of all 2-neighbourhood-resolving sets at root of will be the minimum weight fault-tolerant metric dimension of . From Lemma 2 we know that, if a set is 2-neighbourhood-resolving for a cograph then it is also 2-neighbourhood-resolving for . The union of two fault-tolerant resolving sets is also a fault-tolerant resolving set (Lemma 3), but the union of two 2-neighbourhood-resolving sets is not necessarily a 2-neighbourhood-resolving set. We have to guarantee that the union of two 2-neighbourhood-resolving sets is also 2-neighbourhood-resolving, according to Lemma 4. For this, we have to keep track of the existance of [math]- and -vertices in the 2-neighbourhood-resolving sets that we compute. Since a [math]- or -vertex with respect to a set becomes an or -vertex when complementing, we also have to keep track of - and -vertices.
For a cograph we define 16 types of minimum weight 2-neighbourhood-resolving sets , .
For
- •
we compute a minimum weight 2-neighbourhood-resolving set for such that there is a 0-vertex in with respect to and for we compute a minimum weight 2-neighbourhood-resolving set for such that there is no 0-vertex in with respect to .
- •
we compute a minimum weight 2-neighbourhood-resolving set for such that there is a 1-vertex in with respect to and for we compute a minimum weight 2-neighbourhood-resolving set for such that there is no 1-vertex in with respect to .
- •
we compute a minimum weight 2-neighbourhood-resolving set for such that there is a -vertex in with respect to and for we compute a minimum weight 2-neighbourhood-resolving set for such that there is no -vertex in with respect to .
- •
we compute a minimum weight 2-neighbourhood-resolving set for such that there is a -vertex in with respect to and for we compute a minimum weight 2-neighbourhood-resolving set for such that there is no -vertex in with respect to .
Let be the weight of the corresponding minimum weight 2-neighbourhood-resolving sets , i.e. the sum of the weights of all vertices in . If there is no such 2-neighbourhood-resolving set for a certain , we set and .
Now we will analyze the 16 2-neighbourhood-resolving sets more detailed and describe, how they can be computed efficiently bottom up along the cotree. First one should note that , , and , since it is not possible to have a [math]- and -vertex with respect to in a 2-neighbourhood-resolving set (their symmetric difference would contain less than two resolving vertices), so it suffices to focus on the remaining 12 sets.
When complementing a graph , the role of a [math]-vertex and -vertex with respect to and the role of a -vertex and a -vertex with respect to changes, that is for is for . When unifying two cographs and we distinguish between the follwing three cases:
and both consist of a single vertex 2. 2.
consists of a single vertex and of at least two vertices 3. 3.
and both consist of at least 2 vertices
We will describe now how to compute for the three cases.
Let and . Then there is exactly one valid 2-neighbourhood-resolving set for , namely . In we have no [math]-vertex, two - and two -vertices and no -vertex with respect to . Therefore , and all other sets are infeasible, that is and for . 2. 2.
Let and with . For some let be the minimum weight 2-neighbourhood-resolving sets for and be their weights. Let . and , because vertex is either a [math]-vertex (if it is not in the 2-neighbourhood-resolving set) or a -vertex (if it is in the 2-neighbourhood-resolving set) with respect to , . and , because it is crucial to put in the 2-neighbourhood-resolving set, if there should be no [math]-vertex in with respect to , . If is in the 2-neighbourhood-resolving set, it is not possible to have a vertex that is neighbour of all resolving vertices, because has no neighbours. For and we have to put in the 2-neighbourhood-resolving set, so that there is no [math]-vertex with respect to or , what makes become a -vertex in with respect to or . We get and thus , whereas is the set with smallest weight out of . For there has to be an -vertex in with respect to , so we get and thus , whereas is the set with smallest weight out of . For it is not possible to put in the 2-neighbourhood-resolving set, because it would become a -vertex with respect to , . Therefore we get and thus , and thus , and thus , and thus . 3. 3.
Let and with and and . For some let be the minimum weight 2-neighbourhood-resolving sets for and be the minimum weight 2-neighbourhood-resolving sets for and and be their weights. and and thus and , , because and contain at least two resolving vertices in every 2-neighbourhood-resolving set. Therefore it is not possible to have a vertex that is neighbour of all or of all except one of them. The three remaining sets are . We get and thus , whereas is the set with smallest weight out of and is the set with smallest weight out of . We get and thus , whereas is the set with smallest weight out of , is the set with smallest weight out of , is the set with smallest weight out of and is the set with smallest weight out of . We get and thus , whereas is the set with smallest weight out of , is the set with smallest weight out of , is the set with smallest weight out of and is the set with smallest weight out of .
For every node of the cotree the computation of the 12 minimum weight 2-neighbourhood-resolving sets for the corresponding subgraph of can be done in a constant number of steps. Since has nodes, the overall runtime of our algorithm is linear to the size of the cotree.
3 Conclusion
We showed that the weighted fault-tolerant metric dimension problem can be solved in linear time on cographs. Our algorithm computes the costs of a fault-tolerant resolving set with minimum weight as well as the set itself.
The complexity of computing the (weighted) fault-tolerant metric dimension is still unknown even for graph classes like wheels and sun graphs. This is something that we will investigate in further work.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Belmonte, R., Fomin, F.V., Golovach, P.A., Ramanujan, M.: Metric dimension of bounded tree-length graphs. SIAM Journal on Discrete Mathematics 31 (2), 1217–1243 (2017)
- 2[2] Chappell, G., Gimbel, J., Hartman, C.: Bounds on the metric and partition dimensions of a graph. Ars Combinatoria 88 (2008)
- 3[3] Chartrand, G., Eroh, L., Johnson, M., Oellermann, O.: Resolvability in graphs and the metric dimension of a graph. Discrete Applied Mathematics 105 (1-3), 99–113 (2000)
- 4[4] Chartrand, G., Poisson, C., Zhang, P.: Resolvability and the upper dimension of graphs. Computers and Mathematics with Applications 39 (12), 19–28 (2000)
- 5[5] Díaz, J., Pottonen, O., Serna, M., van Leeuwen, E.: On the complexity of metric dimension. In: Epstein, L., Ferragina, P. (eds.) ESA. Lecture Notes in Computer Science, vol. 7501, pp. 419–430. Springer (2012)
- 6[6] Epstein, L., Levin, A., Woeginger, G.J.: The (weighted) metric dimension of graphs: hard and easy cases. Algorithmica 72 (4), 1130–1171 (2015)
- 7[7] Estrada-Moreno, A., Rodríguez-Velázquez, J.A., Yero, I.G.: The k-metric dimension of a graph. ar Xiv preprint ar Xiv:1312.6840 (2013)
- 8[8] Fernau, H., Heggernes, P., van’t Hof, P., Meister, D., Saei, R.: Computing the metric dimension for chain graphs. Information Processing Letters 115 (9), 671–676 (2015)
