### Travelling Salesman

A Hamiltonian circuit is a continuous path in a graph that passes through each of the vertices exactly once and returns to the start. How many Hamiltonian circuits can you find in these graphs?

# Only Connect

##### Stage: 3 Challenge Level:

I noticed a lack of odd totals. Is this a coincidence?

Sarah and Iain of Madras College, Joshua of Blue Mountains Grammar School, Jack of Ecclesfield comprehensive, Annie of HKMA David Li Kwok Po College all came up with the route C--F--B--A--E--D as having the minimum total distance.of 44 km.

Kate Smith of Stocksbridge High School did the same journey in reverse order!

***

I liked the comments from Stephen and Mark Church Cowley St. James School:

The quickest way that the salesman can get round all the shops is by going: C-F-B-A-E-D, which has a total distance of 44km. Second closest was A-E-B-F-C-D, which totalled 46km. We originally thought that the salesman had to start at shop A, but realised that the text on the puzzle didn't say that.

***

Andrei of School 205 Bucharest offered some useful information on how to reduce the "trial and improvement/error" nature of most of your answers:

I solved the problem using successively the Nearest Neighbour Algorithm and the Cheapest Link Algorithm (A description of these two algorithms can be found in the following web page: mathforum )

First I made a table with the distances from one shop to another:

........A ...B ... C ... D ... E ... F
A ... X ... 9 ... X ... X ... 8 ... 14
B ... X ... X ... 14 .. X ... 8 ... 7
C ... X ... X ... X ... 15 .. X ... 8
D ... X ... X ... X ... X ... 12 .. 12
E ... X ... X ... X ... X ... X .... 10
F ... X ... X ... X ... X ... X ... X

I used the Nearest Neighbour Algorithm, taking each shop as starting point:

1. Starting point -- A

Shops Distance (km)
A --E - 8
E --B - 8
B --F - 7
F --C - 8
C --D - 15
Total 46

2. Starting point --B

Shops Distance (km)
B --F - 7
F --C - 8
C --D - 15
D --E - 12
E --A - 8
Total 50

3. Starting point --C

Shops Distance (km)
C --F - 7
F --B - 8
B --E - 15
E --A - 12
A --D-- Total Impossible

4. Starting point D

4.1.
Shops Distance (km)
D --E - 12
E --A - 8
A --B - 9
B --F - 7
F --C - 8
Total 44

4.2.
Shops Distance (km)
D --E - 12
E --B - 8
B --F - 7
F --C - 8
C --A-- Total Impossible

4.3.
Shops Distance (km)
D-- F - 12
F --B - 7
B --E - 8
E --A - 8
A --C -- Total Impossible

5. Starting point --E

5.1.
Shops Distance (km)
E --A - 8
A --B - 9
B --F - 7
F --C - 8
C --D - 15
Total 47

5.2. Shops Distance (km)
E --B - 8
B --F - 7
F --C - 8
C --D - 15
D --A-- Total Impossible

6. Starting point -- F

6.1.
Shops Distance (km)
F --B - 7
B --E - 8
E --A - 8
A --D -- Total Impossible

6.2.
Shops Distance (km)
F --B - 7
B --E - 8
E --A - 8
A --C -- Total Impossible

Using this algorithm, I obtain the following solution. The salesman must go by the route D -- E -- A -- B -- F -- C, travelling a total distance of 44 kilometres.