JorikJooken / longestCycles

Code related to counting the number of pairwise distinct longest cycles of a graph
0 stars 1 forks source link

Can the program list (all) pairwise distinct longest cycles ? #1

Closed lichengzhang1 closed 10 months ago

lichengzhang1 commented 10 months ago

This program is excellent, but sometimes we not only need counting but also want to list some or all longest cycles. Can this program provide such an output? By the way, there's a sentence in the README.md that confuses me: This indicates that the graph is non-hamiltonian and has 4 pairwise distinct hamiltonian cycles.

JorikJooken commented 10 months ago

Thank you for your message! I corrected the sentence in the README file (I meant "longest cycles" instead of "hamiltonian cycles").

Moreover, the algorithm described in ""Improved asymptotic upper bounds for the minimum number of pairwise distinct longest cycles in regular graphs" can also be used to list all longest cycles. For your convenience, I have just added a program "enumerateLongestCycles.cpp" that supports this function and I have updated the README to indicate how to use the program.

lichengzhang1 commented 10 months ago

Thank you. May I ask which version of GCC you are using? After compiling with my GCC 13, I encountered a Segmentation Fault error when running the executable file.

lichengzhang1 commented 10 months ago

I know. I just need to remove the -O3 flag.