Skip to main content
Log in

The (Weighted) Metric Dimension of Graphs: Hard and Easy Cases

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Given an input undirected graph \(G=(V,E)\), we say that a vertex \(\ell \) separates \(u\) from \(v\) (where \(u,v\in V\)) if the distance between \(u\) and \(\ell \) differs from the distance from \(v\) to \(\ell \). A set of vertices \(L\subseteq V\) is a feasible solution if for every pair of vertices, \(u,v\in V\) (\(u\ne v\)), there is a vertex \(\ell \in L\) that separates \(u\) from \(v\). Such a feasible solution is called a landmark set, and the metric dimension of a graph is the minimum cardinality of a landmark set. Here, we extend this well-studied problem to the case where each vertex \(v\) has a non-negative cost, and the goal is to find a feasible solution with a minimum total cost. This weighted version is NP-hard since the unweighted variant is known to be NP-hard. We show polynomial time algorithms for the cases where \(G\) is a path, a tree, a cycle, a cograph, a \(k\)-edge-augmented tree (that is, a tree with additional \(k\) edges) for a constant value of \(k\), and a (not necessarily complete) wheel. The results for paths, trees, cycles, and complete wheels extend known polynomial time algorithms for the unweighted version, whereas the other results are the first known polynomial time algorithms for these classes of graphs even for the unweighted version. Next, we extend the set of graph classes for which computing the unweighted metric dimension of a graph is known to be NP-hard. We show that for split graphs, bipartite graphs, co-bipartite graphs, and line graphs of bipartite graphs, the problem of computing the unweighted metric dimension of the graph is NP-hard.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Notes

  1. In [19], a hairy cycle is defined to be a cycle such that each of its vertices has a leg of one vertex. Here we allow an arbitrary number of vertices in each leg (for each cycle vertex) including the option of zero vertices (in such a case, the considered cycle vertex does not have a leg).

References

  1. Babai, L.: On the order of uniprimitive permutation groups. Ann. Math. 113(3), 553–568 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  2. Beerliova, Z., Eberhard, F., Erlebach, T., Hall, A., Hoffmann, M., Mihalák, M., Ram, L.S.: Network discovery and verification. IEEE J. Sel. Areas Commun. 24(12), 2168–2181 (2006)

    Article  Google Scholar 

  3. Cáceres, J., Hernando, M.C., Mora, M., Pelayo, I.M., Puertas, M.L., Seara, C., Wood, D.R.: On the metric dimension of cartesian products of graphs. SIAM J. Discr. Math. 21(2), 423–441 (2007)

    Article  MATH  Google Scholar 

  4. Chartrand, G., Eroh, L., Johnson, M.A., Oellermann, O.R.: Resolvability in graphs and the metric dimension of a graph. Discr. Appl. Math. 105(1–3), 99–113 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  5. Chartrand, G., Zhang, P.: The theory and applications of resolvability in graphs: A survey. Congressus Numerantium 160, 47–68 (2003)

    MATH  MathSciNet  Google Scholar 

  6. Chvátal, V.: Mastermind. Combinatorica 3(3), 325–329 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  7. Corneil, D., Perl, Y., Stewart, L.: A linear recognition algorithm for cographs. SIAM J. Comput. 14(4), 926–934 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  8. Díaz, J., Pottonen, O., Serna, M.J., van Leeuwen, E.J.: On the complexity of metric dimension. In: Epstein, L., Ferragina, P. (eds.) ESA, Lecture Notes in Computer Science, vol. 7501, pp. 419–430. Springer, Berlin (2012)

    Google Scholar 

  9. Harary, F., Melter, R.: The metric dimension of a graph. Ars Combinatoria 2, 191–195 (1976)

    MATH  MathSciNet  Google Scholar 

  10. Hartung, S., Nichterlein, A.: On the parameterized and approximation hardness of metric dimension. In: Umans, C. (ed.) Proceedings of IEEE Conference on Computational Complexity (CCC), pp. 266–276 (2013)

  11. Hauptmann, M., Schmied, R., Viehmann, C.: Approximation complexity of metric dimension problem. J. Discr. Algorithms 14, 214–222 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  12. Hoffmann, S., Wanke, E.: Metric dimension for Gabriel unit disk graphs is NP-complete. In: Bar-Noy, A., Halldórsson, Magnús, M. (eds.) ALGOSENSORS: Lecture Notes in Computer Science, vol. 7718, pp. 90–92. Springer, Berlin (2013). Also in CoRR, abs/1306.2187 (2013)

    Google Scholar 

  13. Johnson, D.: The NP-completeness column: an ongoing guide. J. Algorithms 6(3), 434–451 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  14. Khuller, S., Raghavachari, B., Rosenfeld, A.: Landmarks in graphs. Discr. Appl. Math. 70(3), 217–229 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  15. Melter, R.A., Tomescu, I.: Metric bases in digital geometry. Comput. Vis. Graph. Image Process. 25, 113–121 (1984)

    Article  MATH  Google Scholar 

  16. Sebö, A., Tannier, E.: On metric generators of graphs. Math. Oper. Res. 29(2), 383–393 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  17. Shanmukha, B., Sooryanarayana, B., Harinath, K.S.: Metric dimension of wheels. Far East J. Appl. Math. 8(3), 217–229 (2002)

    MATH  MathSciNet  Google Scholar 

  18. Slater, P.J.: Leaves of trees. Congressus Numerantium 14, 549–559 (1975)

    MathSciNet  Google Scholar 

  19. Wojciechowski, J.: Minimal equitability of hairy cycles. J. Combin. Math. Combin. Comput. 57, 129–150 (2006)

    MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Leah Epstein.

Additional information

An extended abstract of this paper appears in Proc. WG2012, pages 114–125.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Epstein, L., Levin, A. & Woeginger, G.J. The (Weighted) Metric Dimension of Graphs: Hard and Easy Cases. Algorithmica 72, 1130–1171 (2015). https://doi.org/10.1007/s00453-014-9896-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-014-9896-2

Keywords

Navigation