Browse > Article
http://dx.doi.org/10.7236/JIIBC.2022.22.6.91

Algorithm for Maximum Cycle Detection of Directed and Undirected General Graphs  

Lee, Sang-Un (Dept. of Multimedia Eng., Gangneung-Wonju National University)
Publication Information
The Journal of the Institute of Internet, Broadcasting and Communication / v.22, no.6, 2022 , pp. 91-97 More about this Journal
Abstract
There is hare and tortoise racing algorithm(HTA) for single-source(SS) singly linked list(SLL) with O(n) time complexity. But the fast method is unknown for general graph with multi-source, multi-destination, and multi-branch(MSMDMB). This paper suggests linear time cycle detection algorithm for given undirected and digraph with MSMDMB. The proposed method reduced the given graph G contained with unnecessary vertices(or nodes) to cycle into reduced graph G' with only necessary vertices(or nodes) to cycle based on the condition of cycle formation. For the reduced graph G', we can be find the cycle set C and cycle length λ using linear search within linear time. As a result of experiment data, the proposed algorithm can be obtained the cycle for whole data.
Keywords
Cycle; Cycle length; Hare and Tortoise; Stack; Reduction;
Citations & Related Records
연도 인용수 순위
  • Reference
1 Codingfreak, "Datastructures: Detecting a Loop in Single Linked List-Tortoise & Hare", http://codingfreak.blogspot.com/p/data-structures.html, Sep. 2012.
2 B. Haeupler, T. Kavitha, R. Mathew, S. Sen, and R. E. Tarjan, "Incremental Cycle Detection, Topological Ordering, and Strong Component Maintenance", ACM Transactions on Algorithms, Vol. 8, No. 1, pp. 3:1-3:33, Jan. 2012, https://doi.org/10.1145/2071379.2071382   DOI
3 M. Safar, F. Mahdi, and K. Mahdi, "An Algorithm for Detecting Cycles in Undirected Graphs using CUDA Technology", International Journal of New Computer Architectures and Their Applications, Vol. 2, No. 1, pp. 193-212, Jan. 2012.
4 D. Panigrahi, "COMPSCI 330: Design and Analysis of Algorithms," pp. 1-5, Duke University Department of Computer Science, pp. 1-5, Sep. 2014.
5 R. Sedgewick, T. G. Szymanski, and A. C. C. Yao, "The Complexity of Finding Cycles in Periodic Functions," SIAM Journal on Computing, Vol. 11, No. 2, pp. 376-390, May 1982, https://doi.org/10.1137 /0211030   DOI
6 R. W. Floyd, "Non-Deterministic Algorithms", Journal of ACM, Vol. 14, No. 4, pp. 636-644, Oct. 1967, https://doi.org/10.1145/321420.321422   DOI
7 R. Liu, "A Low Complexity Topological Sorting Algorithm for Directed Acyclic Graph", International Journal of Machine Learning and Computing, Vol. 4, No. 2, pp. 194-197, Apr. 2014, https://doi.org/10.7763/IJMLC.2014.V4.411   DOI
8 L. Wu, K. Su, S. Cai, X. Zhang, C. Zhang, and S. Wang, "An I/O Efficient Approach for Detecting All Accepting Cycles", IEEE Transactions on Software Engineering, Vol. 41, No. 8, pp. 730-744, Aug. 2015, https://doi. org/10.1109/TSE.2015.2411284   DOI
9 Wikipedia, "Cycle Detection," https://en.wikipedia.org/wiki/Cycle_detection, Wikimedia Inc., Mar. 2016.
10 A. Boukerche and C. Tropper, "A Distributed Graph Algorithm for the Detection of Local Cycles an Knots", IEEE Transactions on Parallel and Distributed Systems, Vol. 9, No. 8, pp. 748-757, Aug. 1998, https://doi.org/10.1109/71.706047   DOI
11 G. Nivasch, "Cycle Detection using a Stack", Information Processing Letters, Vol. 90, No. 3, pp. 135-140, May 2004, https://doi.org/10.1016/j.ipl.2004.01.016   DOI
12 R. P. Brent, "An Improved Monte Carlo Factorization Algorithm", BIT Numerical Mathematics, Vol. 20, No. 2, pp. 176-184, Jun. 1980.   DOI
13 S. S. Skiena, "The Algorithm Design Manual" , 2ed., Springer-Verlag, 2012.
14 S. Rungta, S. Srivastava, U. S. Yadav, and R. Rastogi, "A Methodology to Find the Cycle in a Directed Graph Using Linked List", International Journal of Information Technology, Vol. 6, No. 2, pp. 743-749, Dec. 2014.
15 G. Pandy and S. Chawla, "A Simple and Efficient Algorithm for Hypercycle Detection", School of Information Technologies, University of Sydney, Technical Report No. 538, pp. 1-9, Aug. 2003.
16 R. C. Rocha and B. D. Thatte, "Distributed Cycle Detection in Large-Scale Sparse Graphs", Conference on XLVII SBPO - Simposio Brasileiro de Pesquisa Operacional, At Pernambuco, Brazil, pp. 1-11, Nov. 2015.