Complete Graphs
Counting
Using a Computer to Calculate Hamiltonian Circuits
The number of Hamiltonian circuits on a complete graph with 25 vertices:
In[11]:=
Out[11]=
The number of seconds in a year:
In[12]:=
Out[12]=
The number of years it would take to find all the Hamiltonian circuits in the graph:
In[13]:=
Out[13]=
which is almost ten billion years!
Using a Much Faster Computer to Calculate Hamiltonian Circuits
Let's say we have access to the 99th fastest computer on the planet. http://www.iastate.edu/~nscentral/news/06/sep/lightning.shtml
This computer can perform 1.8 trillion calculations per second. Let's say that a "calculation" is computing the length of a Hamiltonian circuit (which in reality is far more than a single calculation). How long would it take now?
In[14]:=
Out[14]=
It still takes 5000 years to implement the brute force algorithm for a complete graph on 25 vertices! But that's a significant improvement over ten billion years, so maybe computers are the way to go after all. But we see they aren't since for a complete graph on 29 vertices we are up to 2 billion years again.
In[15]:=
Out[15]=
Created by Mathematica (January 24, 2007) |