Abstract

A heuristic search algorithm is given that determines and resolves the Hamiltonian circuit problem in directed graphs. The heuristic information of each vertex is a set composed of its possible path length values from the starting vertex, which is obtained by the path length extension algorithm. A detailed analysis of algorithm examples shows that the heuristic algorithm can greatly reduce the number of processing nodes compared to the backtracking algorithm without information; meanwhile, the algorithm’s time complexity is related to the number of loops in the directed graph. If a directed graph G(V, E) only contains loops that contain the starting point, then the Hamiltonian problem of G can be determined in polynomial time. The algorithm is implemented using C++ and Python programming, and all of the test graphs are generated by the random graph algorithm. The experiments show that the heuristic algorithm can reduce the number of extended nodes by at least 10% in directed random graphs with no or only a few loops. This heuristic algorithm can save time in applications that perform tasks while extending nodes because it reduce the number of extended nodes.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call