Hamiltonian Cycle Finder for Graphs

hcffg-1
hcffg-2
hcffg-3
hcffg-4

Project information

  • Category: Data Structures & Algorithms
  • Completion Date: April 20, 2021
  • Technologies Used: C++
  • GitHub URL: Cycle Finder Repo

The Hamiltonian Cycle Finder reads a graph from a file, validates it, and then searches for Hamiltonian cycles in each graph. It starts by prompting the user for a filename for the log file and another for the graph file. It then reads the graph data, checks for validity (e.g., duplicate edges, invalid vertices), and constructs adjacency matrices for the graphs. After constructing each graph's adjacency matrix, it searches for Hamiltonian cycles within the graph using backtracking. If a Hamiltonian cycle is found, it prints the cycle to the console and the log file. The system can handle multiple graphs within a single input file and repeats the process until all graphs have been processed. Upon completion, it generates a log indicating the completion of the program.

Designed by BootstrapMade