DOI QR코드

DOI QR Code

An Efficient Implementation of Kruskal's Algorithm for A Minimum Spanning Tree

최소신장트리를 위한 크루스칼 알고리즘의 효율적인 구현

  • Lee, Ju-Young (School of Information and Media, Duksung Women's University)
  • 이주영 (덕성여자대학교 컴퓨터학과)
  • Received : 2014.06.24
  • Accepted : 2014.07.23
  • Published : 2014.07.31

Abstract

In this paper, we present an efficient implementation of Kruskal's algorithm to obtain a minimum spanning tree. The proposed method utilizes the union-find data structure, reducing the depth of the tree of the node set by making the nodes in the path to root be the child node of the root of combined tree. This method can reduce the depth of the tree by shortening the path to the root and lowering the level of the node. This is an efficient method because if the tree's depth reduces, it could shorten the time of finding the root of the tree to which the node belongs. The performance of the proposed method is evaluated through the graphs generated randomly. The results showed that the proposed method outperformed the conventional method in terms of the depth of the tree.

본 논문에서는 최소신장트리를 구하는 크루스칼 알고리즘의 효율적인 구현 방법을 제시한다. 제시하는 방법은 union-find 자료구조를 이용하며, 노드 집합을 나타내는 각 트리의 깊이를 줄이기 위해 union 연산시 루트까지의 경로에 있는 노드들의 위치를 최종 루트의 자식노드로 직접 이동하여 깊이를 줄이도록 하는 방법이다. 이 방법은 루트까지의 경로를 축소하고 노드의 레벨을 축소시킴으로써 트리의 깊이도 줄일 수 있다. 트리의 깊이가 줄어든다면 노드가 속하는 트리의 루트를 찾는 시간을 줄일 수 있게 되어 효율적인 방법이라 할 수 있다. 본 장에서 제안하는 방법을 그래프로 평가해보고 분석해 본 결과, 기존의 union() 방법이나 경로축소방법인 union2() 보다 트리의 깊이를 작게 유지함을 알 수 있다.

Keywords

References

  1. Wikipedia, "Minimum Spanning Tree," http://en.wikipedia.org/wiki/Minimum_spanning_tree, Wikimedia Foundation, Inc., 2010.
  2. B. Chun and Y. Kim, "A Method for Character Segm entation using MST," Journal of the Korea Society of Computer and Information, Vol.11, No.3, pp.73-78, July 2006.
  3. P. Amat, W. Puech, S. Druon, and J. P. Pedeboy, "Lossless 3D Steganography Based on MST and Connectivity Modification," Image Communication, Vol.25, No.6, pp.400-412, July 2010.
  4. R. C. Prim, "Shortest Connection Networks and Some Generalisations," Bell System Technical Journal, vol. 36, pp. 1389-1401, Nov. 1957. https://doi.org/10.1002/j.1538-7305.1957.tb01515.x
  5. Wikipedia, "Prim's Algorithm," http://en.wikipedia.org/wiki/Prims_algorithm, Wikimedia Foundation, Inc., 2010.
  6. J. B. Kruskal, "On the Shortest Spanning Subtree and The Traveling Salesman Problem, " Proceedings of the American Mathematical Society, Vol 7, No. 1, pp. 48-50, Feb, 1956. https://doi.org/10.1090/S0002-9939-1956-0078686-7
  7. Wikipedia, "Kruskal's Algorithm," http://en.wikipedia.org/wiki/Kruskal_algorithm, Wikimedia Foundation, Inc., 2010.
  8. D. R. Karger, P. N. Klein, and R. E. Tarjan, "A randomized linear-time algorithm to find minimum spanning trees," Journal of the ACM (JACM) Vol 42, Issue 2, pp. 321-328, March 1995. https://doi.org/10.1145/201019.201022
  9. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and Clifford Stein, "Introduction To Algorithms," Second Edition, The MIT Press, McGraw-Hill, 2002.
  10. Michael T. Goodrich and Roberto Tamassia, "Data Structures and Algorithms in Java," Fourth Edition, John Wiley & Sons, Inc., 2006.
  11. R. Sedgewick and K. Wayne, "Algorithms, " Fourth Edition, Addison-Wesley, 2011.
  12. E. Horowitz, and S. Sahni, "Fundamentals of Data Structures in C," Anderson-Freed, 2008.
  13. Jongman Goo, "Strategy of Algorithm Problem Solving," insight, 2012.

Cited by

  1. Abnormal Functional Brain Networks in Mild Cognitive Impairment and Alzheimer’s Disease: A Minimum Spanning Tree Analysis vol.65, pp.4, 2014, https://doi.org/10.3233/jad-180603