[Math] Length of longest cycle in this graph

graph theory

enter image description here

In the above graph, the blue line shows a cycle of length $84$, the remaining edges are
higlihtged in red. In total, the graph has $100$ vertices and $143$ edges.

  • Is this the longest cycle in this graph ?

The graph has no hamilton cycle because deleting the vertices $8$ and $20$ splits the
graph into $3$ components. Deleting the vertices $1,5,8,13,20,22,25,37$ splits the
graph into $10$ components, so it contains not even a hamiltonian path.

  • How can I get the length of the longest cycle ?

Best Answer

The comments gave many resources for finding the longest cycle in such a graph.

This is (not) the longest cycle in a graph. I will give a counterexample of length 85.

1 > 12 > 13 > 14 > 5 > 6 > 7 > 8 > 18 > 19 > 20 > 30 > 40 > 50 > 60 > 70 > 80 > 90 > 100 > 99 > 98 > 97 > 96 > 95 > 94 > 93 > 84 > 85 > 86 > 87 > 88 > 89 > 79 > 69 > 68 > 78 > 67 > 77 > 76 > 75 > 74 > 64 > 65 > 66 > 56 > 57 > 58 > 48 > 39 > 38 > 37 > 28 > 27 > 17 > 16 > 15 > 25 > 36 > 46 > 35 > 45 > 55 > 54 > 44 > 33 > 32 > 42 > 43 > 53 > 52 > 62 > 72 > 73 > 83 > 82 > 92 > 91 > 81 > 71 > 61 > 51 > 41 > 31 > 21 > 11 > 1

After running the longest cycle algorithm on Mathematica for quite some time, a longest cycle (of length 89) in the graph is as below:

1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 18 > 19 > 20 > 30 > 40 > 50 > 60 > 70 > 80 > 90 > 100 > 99 > 98 > 97 > 96 > 95 > 94 > 93 > 84 > 85 > 86 > 87 > 88 > 89 > 79 > 69 > 68 > 78 > 67 > 77 > 76 > 75 > 74 > 64 > 65 > 66 > 56 > 57 > 58 > 48 > 39 > 38 > 37 > 28 > 27 > 17 > 16 > 15 > 25 > 36 > 46 > 35 > 45 > 55 > 54 > 44 > 33 > 24 > 13 > 23 > 22 > 32 > 42 > 43 > 53 > 52 > 62 > 72 > 73 > 83 > 82 > 92 > 91 > 81 > 71 > 61 > 51 > 41 > 31 > 21 > 11 > 1

To answer your second question, the length of the longest cycle is also known as the graph circumference. That should give you a keyword to start exploring how one might get such a length. There are many ways to find the longest cycle, one of the simplest is a simple modification from the Hamiltonian cycle algorithm.

This is however an NP-complete problem.

Here is the graph in the adjlist format should anyone wants to verify the above solution.

Related Question