traveling salesman problem
DESCRIPTION
traveling salesman problem. ZIP-Method deductive approach of an optimal solution of symmetrical Traveling-salesman-problems. http://www.jochen-pleines.de. new ideas. das Rundreiseproblem bisherige Lösungen New ideas Beispiel mit 6 Knoten Beispiel mit 10 Knoten - PowerPoint PPT PresentationTRANSCRIPT
traveling salesman problem
ZIP-Methoddeductive approach of an optimal solution of symmetrical Traveling-salesman-problems
http://www.jochen-pleines.de
new ideas ...
– das Rundreiseproblem– bisherige Lösungen– New ideas– Beispiel mit 6 Knoten– Beispiel mit 10 Knoten– Beispiel mit 26 Knoten (Ergebnisse)– Schlussfolgerungen und Ausblick
new ideas ...
• but first
a task for you:
• Please note in
arbitrary order the
numbers from 1 to
6.
5
2
1
4
3
6
new ideas ...
• If you connect the nodes, then it develops:
• 1-component G• with 6 edges • with 6 nodes • each node has
the grade 2
55
2
1
4
3
6
new ideas ...
we remember:
if n = 6 then:
n! = 720
(n-1)! = 120
(n-1)! / 2 = 60
55
2
1
4
3
6
new ideas ...
now we add the values of the nodes:
as well each node accurs twice:
55
2
1
4
3
6
– at the beginning
of an edge (1-6)
– and at the end
of an edge (4-1).
and that is evil !
1
new ideas ...
If each node accursonly once, thenoriginate from a graph:
a partial-graph with
all of the 6 nodes, but only with 3 edges:
for example:edges: 1-6, 5-3, 2-4
55
2
1
4
3
6
new ideas ...
... a complement partial-
graph with the same
structure remains like
the
edges: 1-4, 2-3, 5-6
55
2
1
4
3
6
new ideas ...
• So the graph gets
together:
• from the partial-graph
with edges:1-6,5-3,2-4
• and the partial-graph
with edges :1-4,2-3,5-6
55
2
1
4
3
6
new ideas ...
we remember:
With n = 6 nodes there exist
120 graphs respectively
60 symmetric graphs
How many partial-graphs
actual exist ?
1. partial-graph 1 - 2 3 - 4 5 - 6
2. partial-graph 1 - 2 3 - 5 4 - 6
3. partial-graph 1 - 2 3 - 6 4 - 5 4. partial-graph 1 - 3 2 - 4 5 - 6
5. partial-graph 1 - 3 2 - 5 4 - 6
6. partial-graph 1 - 3 2 - 6 4 - 5
7. partial-graph 1 - 4 2 - 3 5 - 6
8. partial-graph 1 - 4 2 - 5 3 - 6
9. partial-graph 1 - 4 2 - 6 3 - 5
10. partial-graph 1 - 5 2 - 3 4 - 6
11. partial-graph 1 - 5 2 - 4 3 - 6
12. partial-graph 1 - 5 2 - 6 3 - 4
13. partial-graph 1 - 6 2 - 3 4 - 5
14. partial-graph 1 - 6 2 - 4 3 - 5
15. partial-graph 1 - 6 2 - 5 3 - 4
not more !
new ideas ...By using the the Symmetry-rule and the Sort-rule
each of the 120 Graphs
can be devorced into 2 of the 15 partial-graphs.
1. partial-graph 1 - 2 3 - 4 5 - 6
2. partial-graph 1 - 2 3 - 5 4 - 6
3. partial-graph 1 - 2 3 - 6 4 - 5
4. partial-graph 1 - 3 2 - 4 5 - 6
5. partial-graph 1 - 3 2 - 5 4 - 6
6. partial-graph 1 - 3 2 - 6 4 - 5
7. partial-graph 1 - 4 2 - 3 5 - 6
8. partial-graph 1 - 4 2 - 5 3 - 6
9. partial-graph 1 - 4 2 - 6 3 - 5
10. partial-graph 1 - 5 2 - 3 4 - 6
11. partial-graph 1 - 5 2 - 4 3 - 6
12. partial-graph 1 - 5 2 - 6 3 - 4
13. partial-graph 1 - 6 2 - 3 4 - 5
14. partial-graph 1 - 6 2 - 4 3 - 5
15. partial-graph 1 - 6 2 - 5 3 - 4
Please try it with your own example !
new ideas ...
55
2
1
4
3
6
• Symmetry-Rule:
• The begin-node of an
edge has the lower
number then the end-
node: i < j:
-> f(1-6) + f(5-3) + f(2-4)
= f(1-6) + f(3-5) + f(2-4)
new ideas ...
55
2
1
4
3
6
• Sort-Rule:
• die edges will be sorted
by the begin-node of the
edges. • 1. edge 2. edge 3. edge
-> f(1-6) + f(3-5) + f(2-4)
= f(1-6) + f(2-4) + f(3-5)
new ideas ...
• How many partial graphs „matching“ to a partial graph, i.o. do all of the graphs form one together again ?
• Example: 1-2, 3-4, 5-6
No.5, 6, 8, 9, 10, 11, 13, 14altogether 8 (= 2 x 4)
1. partial-graph 1 - 2 3 - 4 5 - 6
2. partial-graph 1 - 2 3 - 5 4 - 6
3. partial-graph 1 - 2 3 - 6 4 - 5
4. partial-graph 1 - 3 2 - 4 5 - 6
5. partial-graph 1 - 3 2 - 5 4 - 6
6. partial-graph 1 - 3 2 - 6 4 - 5
7. partial-graph 1 - 4 2 - 3 5 - 6
8. partial-graph 1 - 4 2 - 5 3 - 6
9. partial-graph 1 - 4 2 - 6 3 - 5
10. partial-graph 1 - 5 2 - 3 4 - 6
11. partial-graph 1 - 5 2 - 4 3 - 6
12. partial-graph 1 - 5 2 - 6 3 - 4
13. partial-graph 1 - 6 2 - 3 4 - 5
14. partial-graph 1 - 6 2 - 4 3 - 5
15. partial-graph 1 - 6 2 - 5 3 - 4
new ideas ...
Further considerations:
The smallest (complete-)graph gets together:
either: from the two found partial-graphs (smallest partial-graph with accompanying
smallest comp-partial-graph)
or: from two partial-graphs lying between this.
new ideas ...
• How to find out the lowest graph ?
• 1. step: on find out the lowest partial - graph
• 2. step:on find out the belonging lowest Comp-partial-graph.
1. partial-graph 1 - 2 3 - 4 5 - 6
2. partial-graph 1 - 2 3 - 5 4 - 6
3. partial-graph 1 - 2 3 - 6 4 - 5
4. partial-graph 1 - 3 2 - 4 5 - 6
5. partial-graph 1 - 3 2 - 5 4 - 6
6. partial-graph 1 - 3 2 - 6 4 - 5
7. partial-graph 1 - 4 2 - 3 5 - 6
8. partial-graph 1 - 4 2 - 5 3 - 6
9. partial-graph 1 - 4 2 - 6 3 - 5
10. partial-graph 1 - 5 2 - 3 4 - 6
11. partial-graph 1 - 5 2 - 4 3 - 6
12. partial-graph 1 - 5 2 - 6 3 - 4
13. partial-graph 1 - 6 2 - 3 4 - 5
14. partial-graph 1 - 6 2 - 4 3 - 5
15. partial-graph 1 - 6 2 - 5 3 - 4
new ideas ...
There perhaps the lowest graph is found !
But only: perhaps!
new ideas ...
example:• lowest partial-graph has a length of edge: 20• der lowest belonging Compl.-partial-graph: 40• result a graph: 60
that means,
• (a+b) < c -> a and/or b < (c/2)
and a < b or a = b -> a < (c/2)
new ideas ...
Further iteration steps:(up to half the edge length of the so far smallest found complet graph)
• starting out from the smallest partial-graph it this one is respectively greater partial-graph with his complement partial-graph checked most nearly, wether from this a smaler complete-graph can be put together.
• if yes: the new complete-graph is initial value for further iteration steps.
• if no: the smallest graph is already found
example with 6 nodes
– das Rundreiseproblem– bisherige Lösungen– neue Überlegungen– example with 6 nodes– Beispiel mit 10 Knoten– Beispiel mit 26 Knoten (Ergebnisse)– Schlussfolgerungen und Ausblick
example with 6 nodes
Given 6 nodes with the values of the edges:
• to 1 to 2 to 3 to 4 to 5 to 6
from 1 - 12 25 30 28 22
from 2 - 16 20 22 10
from 3 - 23 26 21
from 4 - 31 18
from 5 - 14
from 6 -
example with 6 nodes60 symmetric graphs
60 partial-graphs 60 partial-graphs
minimal graph
to divide
to sort
to compute
15 partial-graphs 15 partial-graphs
example with 6 nodes
Nr. 1.K. 2.K. 3.K. K.-Länge 1. 1 - 2 3 - 4 5 - 6 49 2. 1 - 2 3 - 5 4 - 6 56 3. 1 - 2 3 - 6 4 - 5 64 4. 1 - 3 2 - 4 5 - 6 59 5. 1 - 3 2 - 5 4 - 6 65 6. 1 - 3 2 - 6 4 - 5 66 7. 1 - 4 2 - 3 5 - 6 60 8. 1 - 4 2 - 5 3 - 6 73 9. 1 - 4 2 - 6 3 - 5 6610. 1 - 5 2 - 3 4 - 6 6211. 1 - 5 2 - 4 3 - 6 6912. 1 - 5 2 - 6 3 - 4 6113. 1 - 6 2 - 3 4 - 5 6914. 1 - 6 2 - 4 3 - 5 6815. 1 - 6 2 - 5 3 - 4 67
Partial-graphNr. 1.K. 2.K. 3.K. K.-Länge 1. 1 - 2 3 - 4 5 - 6 49 2. 1 - 2 3 - 5 4 - 6 56 3. 1 - 2 3 - 6 4 - 5 64 4. 1 - 3 2 - 4 5 - 6 59 5. 1 - 3 2 - 5 4 - 6 65 6. 1 - 3 2 - 6 4 - 5 66 7. 1 - 4 2 - 3 5 - 6 60 8. 1 - 4 2 - 5 3 - 6 73 9. 1 - 4 2 - 6 3 - 5 6610. 1 - 5 2 - 3 4 - 6 6211. 1 - 5 2 - 4 3 - 6 6912. 1 - 5 2 - 6 3 - 4 6113. 1 - 6 2 - 3 4 - 5 6914. 1 - 6 2 - 4 3 - 5 6815. 1 - 6 2 - 5 3 - 4 67
compl.-partial-graph
Length of the graph: 111 (49 + 62) : 2 = 55,5
example with 10 nodes
– das Rundreiseproblem - Fragestellung– Problem und bisherige Lösungen– neue Überlegungen– Beispiel mit 6 Knoten– Example with 10 nodes– Beispiel mit 26 Knoten (Ergebnisse)– Schlussfolgerungen und Ausblick
example with 10 nodes development of the ZIP-term with n = 10:
1 · 3 · 5 · 7 · 9 =
9! ————————————— = (1 · 2) · (2 · 2) · (3 · 2) · (4 · 2)
9! ————————————— = ( 1 · 2 · 3 · 4 ) · ( 2 · 2 · 2 · 2 )
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9————————————— = 2 · 4 · 6 · 8
9! ————————————— = 4! · 24
(10 – 1)! ————————————— = (5 – 1)! · 2(5-1)
example with 10 nodes
(n – 1)! —————————
( n/2 – 1 ) ! · 2 n/2 - 1
by that:
{ ( n/2 – 1 ) ! } (Sort-rule) Partial-graph: — — — — —(number of edges =n/2)
1 x 2 x 2 x 2 x 2 (Symmetry)
Begin-edge = x1
example with 10 nodesnachvon
1 2 3 4 5 6 7 8 9 10
1 - 16 44 93 1 30 30 5 78 42
2 - 68 61 42 77 41 79 22 32
3 - 39 48 21 36 28 40 80
4 - 43 8 66 46 30 35
5 - 67 69 11 84 91
6 - 97 43 63 67
7 - 85 89 18
8 - 2 85
9 - 5
cur.No. length 1. edge 2.edge 3.edge 4.edge 5.edge Notice1 76 1 - 2 3 - 7 4 - 6 5 - 8 9 -102 77 1 - 5 2 - 9 3 - 8 4 - 6 7 -103 79 1 - 5 2 -10 3 - 7 4 - 6 8 - 94 83 1 - 5 2 - 7 3 - 8 4 - 6 9 -105 92 1 - 2 3 - 5 4 - 6 7 -10 8 - 96 93 1 - 2 3 - 9 4 - 6 5 - 8 7 -107 96 1 - 2 3 - 6 4 - 9 5 - 8 7 -108 96 1 - 8 2 - 5 3 - 7 4 - 6 9 -109 97 1 - 5 2 - 3 4 - 6 7 -10 8 - 9
10 100 1 - 2 3 - 6 4 - 5 7 -10 8 - 911 100 1 - 5 2 - 7 3 - 6 4 -10 8 - 9 min.p-gkomp
12 101 1 - 8 2 - 9 3 - 5 4 - 6 7 -1013 103 1 - 3 2 - 9 4 - 6 5 - 8 7 -10
....until 945
min.p-g
min. p-g + min.p-gkomp = 176; 176 / 2 = 88Sorting of the 945 partial-graphs after edge-length
example with 10 nodes
cur.No. length 1. edge 2.edge 3.edge 4.edge 5.edge Notice1 76 1 - 2 3 - 7 4 - 6 5 - 8 9 -102 77 1 - 5 2 - 9 3 - 8 4 - 6 7 -103 79 1 - 5 2 -10 3 - 7 4 - 6 8 - 94 83 1 - 5 2 - 7 3 - 8 4 - 6 9 -105 92 1 - 2 3 - 5 4 - 6 7 -10 8 - 96 93 1 - 2 3 - 9 4 - 6 5 - 8 7 -107 96 1 - 2 3 - 6 4 - 9 5 - 8 7 -108 96 1 - 8 2 - 5 3 - 7 4 - 6 9 -109 97 1 - 5 2 - 3 4 - 6 7 -10 8 - 9
10 100 1 - 2 3 - 6 4 - 5 7 -10 8 - 911 100 1 - 5 2 - 7 3 - 6 4 -10 8 - 912 101 1 - 8 2 - 9 3 - 5 4 - 6 7 -1013 103 1 - 3 2 - 9 4 - 6 5 - 8 7 -10
....until 945
example with 10 nodes
cur.No. length 1. edge 2.edge 3.edge 4.edge 5.edge Notice1 76 1 - 2 3 - 7 4 - 6 5 - 8 9 -102 77 1 - 5 2 - 9 3 - 8 4 - 6 7 -103 79 1 - 5 2 -10 3 - 7 4 - 6 8 - 94 83 1 - 5 2 - 7 3 - 8 4 - 6 9 -105 92 1 - 2 3 - 5 4 - 6 7 -10 8 - 96 93 1 - 2 3 - 9 4 - 6 5 - 8 7 -107 96 1 - 2 3 - 6 4 - 9 5 - 8 7 -108 96 1 - 8 2 - 5 3 - 7 4 - 6 9 -109 97 1 - 5 2 - 3 4 - 6 7 -10 8 - 9
10 100 1 - 2 3 - 6 4 - 5 7 -10 8 - 911 100 1 - 5 2 - 7 3 - 6 4 -10 8 - 912 101 1 - 8 2 - 9 3 - 5 4 - 6 7 -1013 103 1 - 3 2 - 9 4 - 6 5 - 8 7 -10
....until 945
example with 10 nodes
cur.No. length 1. edge 2.edge 3.edge 4.edge 5.edge Notice1 76 1 - 2 3 - 7 4 - 6 5 - 8 9 -102 77 1 - 5 2 - 9 3 - 8 4 - 6 7 -103 79 1 - 5 2 -10 3 - 7 4 - 6 8 - 94 83 1 - 5 2 - 7 3 - 8 4 - 6 9 -105 92 1 - 2 3 - 5 4 - 6 7 -10 8 - 96 93 1 - 2 3 - 9 4 - 6 5 - 8 7 -107 96 1 - 2 3 - 6 4 - 9 5 - 8 7 -108 96 1 - 8 2 - 5 3 - 7 4 - 6 9 -109 97 1 - 5 2 - 3 4 - 6 7 -10 8 - 9
10 100 1 - 2 3 - 6 4 - 5 7 -10 8 - 911 100 1 - 5 2 - 7 3 - 6 4 -10 8 - 9
min.p-gkomp
12 101 1 - 8 2 - 9 3 - 5 4 - 6 7 -1013 103 1 - 3 2 - 9 4 - 6 5 - 8 7 -10
....until 945
min. p-g
min. p-g + min.p-gkomp = 175; 175 / 2 = 87,5
example with 10 nodes
cur.No. length 1. edge 2.edge 3.edge 4.edge 5.edge Notice1 76 1 - 2 3 - 7 4 - 6 5 - 8 9 -102 77 1 - 5 2 - 9 3 - 8 4 - 6 7 -103 79 1 - 5 2 -10 3 - 7 4 - 6 8 - 94 83 1 - 5 2 - 7 3 - 8 4 - 6 9 -105 92 1 - 2 3 - 5 4 - 6 7 -10 8 - 96 93 1 - 2 3 - 9 4 - 6 5 - 8 7 -107 96 1 - 2 3 - 6 4 - 9 5 - 8 7 -108 96 1 - 8 2 - 5 3 - 7 4 - 6 9 -109 97 1 - 5 2 - 3 4 - 6 7 -10 8 - 9
10 100 1 - 2 3 - 6 4 - 5 7 -10 8 - 911 100 1 - 5 2 - 7 3 - 6 4 -10 8 - 912 101 1 - 8 2 - 9 3 - 5 4 - 6 7 -1013 103 1 - 3 2 - 9 4 - 6 5 - 8 7 -10
....until 945
opt. p-g
opt. p-gkomp
example with 10 nodes
example with 10 nodes
0
20
40
60
80
100
120
61-80
101-120
141-160
181-200
221-240
261-280
301-320
341-360
381-400
421-440
Qua
ntity
of
part
ial-
grap
hs
Sum of the values of edges after the 1. pass through: only 11 of 945 partial-graphs of altogether 181.440 graphs
example with 10 nodes
• From altogether 945 partial-graphs will eliminate with back tracking of the limited Enumeration:
• Stop after the 5th edge: 0 edge
• Stop after the 4th edge: 1 edge
• Stop after the 3th edge: 3 edges
• Stop after the 2th edge: 15 edges
• Stop after the first edge: 105 edges
earliest stop if possible!!
example with 10 nodes
Relation between begin-node and place of the edge:
1. Edge 2. Edge 3. Edge 4. Edge 5. Edge
1-2...1-10 2-3...2-10 3-4...3-10 4-5...4-10 5-6...5-10or or or or
3-4...3-10 4-5...4-10 5-6...5-10 6-7...6-10or or or
5-6...5-10 6-7...6-10 7-8...7-10or or
7-8...7-10 8-9...8-10or
9-10.
example with 10 nodes
Anfangs-Knoten
1.Kante 2.Kante 3.Kante 4.Kante 5.KanteSumme je
KnotenNr.1 945 - - - - 945Nr.2 - 840 - - - 840Nr.3 - 105 630 - - 735Nr.4 - - 270 360 - 630Nr.5 - - 45 360 120 525Nr.6 - - - 180 240 420Nr.7 - - - 45 270 315Nr.8 - - - - 210 210Nr.9 - - - - 105 105
Nr.10 - - - - 0 0Summe
derKanten
945 945 945 945 945
example with 6 nodes
Some more ideas:
• Numbering-rule
(the greatest difference first)
• Minimal-edge-rule
(calculation of the smallest edge still outstanding for every single edge-place; no more for everyone – see page before: relation between begin-node and place of the edge)
example with 6 nodes
40
90
45
50
30
0 10 20 30 40 50 60 70 80 90
1. Kante
2. Kante
3. Kante
4. Kante
5. Kante
Example: node xi with his 5 edges
Numbering-ruleMinimal-edge-rule
traveling salesman problem
Thank you for your interest