Assignment #4: Contingency Table

Description

The following contingency table centralizes data collected from a program solving the Travelling Salesman Problem using a search algorithm on 8 different problem sizes (3..10) and 3 different strategies (no prunning, non-heuristical prunning, and heuristical prunning).

Without prunning, the search algorithm generates all the permutations of cities. With non-heuristical prunning, the partial cost is used to eliminate non-promising paths. With heuristical prunning, an estimate of the remaining path, namely the closing link, is added to the partial cost; the estimate being optimistic, the heuristic is admissible.

From the data in the table we can conclude that both the basic idea of prunning and the admissible heuristic employed bring significant benefits. On the particular size-10 problem solved, non-heuristical prunning explores approximately 9.8 times less nodes than the base search algorithm, while heuristical prunning explores approximately 22.45 times less nodes than the base algorithm or 2.29 times less nodes than the non-heuristical version.

The very small number of tours generated by the heuristic algorithm is caused by the fact that, under the heuristic policy employed, no tour is fully generated unless it is better than (or as good as) the current best.

Contingency Table

Problem instance Size Optimal cost Without prunning Non-heuristical prunning Heuristical prunning
(instance table) (# of cities) (total distance) Nodes Tours Nodes Tours Nodes Tours
#1 3 17.071067811865476 5 2 5 2 52
#2 4 17.071067811865476 16 6 16 6 122
#3 5 17.886349517372675 65 24 51 11 332
#4 6 24.56147119491729 326 120 216 32 1214
#5 7 24.790966462797588 1957 720 820 56 3715
#6 8 25.61939358754378 13700 5040 3797 128 17535
#7 9 31.41628257609866 109601 40320 23527 379 109074
#8 10 31.46101284050755 986410 322880 100657 535 439365

Problem Table

Problem Map
#1 ((Washington 6 6) (Miami 6 1) (San_Diego 1 1))
#2 ((Washington 6 6) (Miami 6 1) (San_Diego 1 1) (Denver 2 2))
#3 ((Washington 6 6) (Miami 6 1) (San_Diego 1 1) (Denver 2 2) (Chicago 4 6))
#4 ((Washington 6 6) (Miami 6 1) (Denver 2 3)(San_Diego 1 1) (Chicago 4 6) (San_Francisco 1 9))
#5 ((Washington 6 6) (Miami 6 1) (Denver 2 3) (San_Diego 1 1) (Chicago 4 6) (San_Francisco 1 9) (Minneapolis 3 8))
#6 ((Washington 6 6) (Miami 6 1) (Denver 2 3) (San_Diego 1 1) (Chicago 4 6) (San_Francisco 1 9) (Minneapolis 3 8) (Detroit 5 7))
#7 ((Washington 6 6) (Miami 6 1) (Denver 2 3) (San_Diego 1 1) (Chicago 4 6) (San_Francisco 1 9) (Minneapolis 3 8) (Detroit 5 7) (Boston 8 9))
#8

((Washington 6 6) (Miami 6 1) (Denver 2 3) (San_Diego 1 1) (Chicago 4 6) (San_Francisco 1 9) (Minneapolis 3 8) (Detroit 5 7) (Boston 8 9) (New_York 7 7))