Skip to main content
Log in

A new algorithm for the minimum spanning tree verification problem

  • Published:
Computational Optimization and Applications Aims and scope Submit manuscript

Abstract

This paper proposes a new algorithm for the minimum spanning tree verification (MSTV) problem in undirected graphs. The MSTV problem is distinct from the minimum spanning tree construction problem. The above problems have been studied extensively, and there exist several papers in the literature devoted to them. Our algorithm for the MSTV problem combines the insights of Borůvka’s algorithm for constructing a minimum spanning tree with a bucketing scheme. The principal idea underlying this combination is the efficient identification of edges that cannot be part of any minimum spanning tree. Although the proposed algorithm imposes no restrictions on the input graph, it was designed to exploit the case in which the number of distinct edge weights is small. On a graph with \(n\) vertices, \(m\) edges, and \(K\) distinct edge weights, our algorithm runs in \(O(m+n\cdot K)\) time. It follows that our algorithm runs in linear time if \(K\) is a fixed constant. Although there exist several linear time MSTV algorithms in the literature, our algorithm improves on the state of the art in two ways, viz., it is conceptually simpler, and it is easy to implement. We contrast the performance of our algorithm vis-à-vis Hagerup’s linear time MSTV algorithm, which is one of the more practical linear-time MSTV algorithms. Our experiments indicate that the proposed algorithm is superior to Hagerup’s algorithm when \(K \le 24\). One surprising observation is that our algorithm is substantially faster than Hagerup’s algorithm on “No” instances, i.e., on instances in which the input spanning tree is not the minimum spanning tree.

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

References

  1. Booth, H., Westbrook, J.: A linear algorithm for analysis of minimum spanning and shortest path trees of planar graphs. Algorithmica 11, 341–352 (1992)

    Article  MathSciNet  Google Scholar 

  2. Borůvka, O.: Borůvka. O jistém problému minimálním. Práce Moravské Pr̆trodovĕdecké Spolec̆nosti v Brnĕ 3, 37–58 (1926)

  3. Bright, W.: D Programming Language, 2001. http://www.dlang.org

  4. Buchsbaum, A.L., Kaplan, H., Rogers, A., Westbrook, J.R.: Linear-time pointer-machine algorithms for least common ancestors, mst verification, and dominators. In: Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, STOC’98, pp. 279–288. ACM: New York, NY (1998)

  5. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  6. Demetrescu, C., Goldberg, A.V., Johnson, D.: 9th DIMACS implementation challenge-Shortest Paths (2005). http://www.dis.uniroma1.it/~challenge9/

  7. Dixon, B., Rauch, M., Tarjan, R.E.: Verification and sensitivity analysis of minimum spanning trees in linear time. SIAM J. Comput. 21(6), 1184–1192 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  8. Hagerup, T.: An even simpler linear-time algorithm for verifying minimum spanning trees. In WG, pp. 178–189 (2009)

  9. Hopcroft, J., Tarjan, R.: Algorithm 447: efficient algorithms for graph manipulation. Commun. ACM 16, 372–378 (1973)

    Article  Google Scholar 

  10. Karger, D.R., Klein, P.N., Tarjan, R.E.: A randomized linear-time algorithm to find minimum spanning trees. J. ACM 42(2), 321–328 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  11. King, V.: A simpler minimum spanning tree verification algorithm. Algorithmica 18(2), 263–270 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  12. Komlos, J.: Linear verification for spanning trees. In SFCS’84: Proceedings of the 25th Annual Symposium on Foundations of Computer Science, pp. 201–206. IEEE Computer Society: Washington, DC (1984)

  13. Korman, A., Kutten, S.: Distributed verification of minimum spanning trees. In: Proceedings of the twenty-fifth annual ACM symposium on Principles of distributed computing, PODC’06, pp. 26–34. ACM: New York, NY (2006)

  14. Orlin, J.B., Madduri, K., Subramani, K., Williamson, M.: A faster algorthm for the single source shortest path problems with few distinct postive lengths. J. Discret. Algorithm 8(2), 189–198 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  15. Pettie, S.: An inverse-Ackermann type lower bound for online minimum spanning tree verification. Combinatorica 26(2), 207–230 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  16. Tarjan, R.E.: Applications of path compression on balanced trees. Technical report, Stanford (1975)

  17. Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22, 215–225 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  18. Tarjan, Robert Endre: Applications of path compression on balanced trees. J. ACM 26(4), 690–715 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  19. Tarjan, R.E.: Sensitivity analysis of minimum spanning trees and shortest path trees. Inf. Process. Lett. 14(1), 30–33 (1982)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgments

The first author was supported by a Grant from NASA WV Space Grant Consortium (Grant #NNX10AK62H), and the second author was supported by the National Science Foundation through Award CCF-1305054 and through the Air-Force Office of Scientific Research through Contract FA9550-12-1-0199. We would like to thank Torben Hagerup for his assistance with implementing his MSTV algorithm.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to K. Subramani.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Williamson, M., Subramani, K. A new algorithm for the minimum spanning tree verification problem. Comput Optim Appl 61, 189–204 (2015). https://doi.org/10.1007/s10589-014-9702-8

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10589-014-9702-8

Keywords

Navigation