+ All Categories
Home > Documents > TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton...

TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton...

Date post: 17-Jan-2016
Category:
Upload: benjamin-montgomery
View: 221 times
Download: 0 times
Share this document with a friend
18
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough, Hartlepool and Yarm and return to Stockton. What is the minimum distance he needs to travel?
Transcript
Page 1: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

Initial problem : Upper Bound

A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough, Hartlepool and Yarm and return to Stockton.What is the minimum distance he needs to travel?

Page 2: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

The model

The distances between the towns is given below:

  S M D H Y B

S - 5 13 12 6 4

M 5 - 16 10 9 6

D 13 16 - 25 13 -

H 12 10 25 - - 8

Y 6 9 13 - - -

B 4 6 - 8 - -

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012

Page 3: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

Nearest neighbour algorithm

1. Choose any vertex as the starting point.

2. From the vertices not already selected find the nearest vertex to the last one.

3. Repeat step 2 until all vertices have been selected.

4. Join the last vertex to the first vertex.

5. Repeat for different starting vertices.

6. Choose the smallest upper bound.

Page 4: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

1. Choose a starting vertex

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012S is chosen as a starting vertex.

S

Page 5: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

2. Find the nearest vertex

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012B is the nearest vertex to S (the last one).S

B4

Page 6: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

3. Repeat 2 ‘til all vertices selected

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012

M is the nearest vertex to B.

S

B4

M

6

Y is the nearest vertex to M (not already selected).

Y

9D is the nearest vertex to Y (not already selected).

D

13

H is the nearest vertex to D (not already selected).

H

25

Page 7: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

4. Join the last vertex to the first

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012

H is joined to S.

S

B4

M

6

Y

9D

13

H

2512 The resulting tour has

length:4+6+9+13+25+12 = 69

Page 8: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

5. Repeat for a different start vertex

Upper bound found starting at S:

Upper bound found starting at D:

Upper bound found starting at B:

Upper bound found starting at H:

Upper bound found starting at M:

Upper bound found starting at Y:

69

64*

64

64

64

64

*Choosing DY as first edge

Page 9: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

6. Choose the least upper bound

The shortest tour (least upper bound) has length 64.

D M

S

B

Y

H

25 4

613

16

139

5

812

S

B4

M

6

Y

6D

13

H

2510

D-Y-S-B-M-H-D has been chosen, but we could have had B-S-M-Y-D-H-B

Page 10: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

Initial problem: Lower Bound

A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough, Hartlepool and Yarm and return to Stockton.What is the minimum distance he needs to travel?

Page 11: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

The model

The distances between the towns is given below:

  S M D H Y B

S - 5 13 12 6 4

M 5 - 16 10 9 6

D 13 16 - 25 13 -

H 12 10 25 - - 8

Y 6 9 13 - - -

B 4 6 - 8 - -

D M

S

B

Y

H

25 4

613

6

16

139

5

8 1012

Page 12: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

An algorithm – Nearest Neighbour

1. Choose a vertex and delete it and all its edges from the network.

2. Find a minimum connector for the remaining network using Kruskal’s or Prim’s.

3. Add in the weights of the two least weight deleted edges.

4. Repeat deleting a different vertex.

5. Choose the greatest lower bound.

Page 13: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

1. Choose a vertex and delete it

S

B

Y

H

25 4

613

6

16

139

5

8 1012

D M

D is chosen (arbitrarily) and deleted along with all of the edges from D.

Page 14: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

2. Find a minimum connector

S

B

Y

H

25 4

613

6

16

139

5

8 1012

D M

A minimum connector is found (in this case using Kruskal’s algorithm)

4

5

6

8

Page 15: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

3. Add in 2 least deleted edges

S

B

Y

H

25 4

613

6

16

139

5

8 1012

D M

The two deleted edges of least weight are added back in.

4

5

6

8

13

13

The Lower Bound found by deleting D has weight :4+5+6+8+13+13 = 49

Page 16: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

4. Repeat using a different vertex

Lower bound found by removing D:

Lower bound found by removing S:

Lower bound found by removing B:

Lower bound found by removing H:

Lower bound found by removing M:

Lower bound found by removing Y:

49

45

44

46

42

45

Page 17: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower Bounds

5. Choose greatest lower bound

The greatest lower bound found is 49

S

B

Y

H

25 4

613

6

16

139

5

8 1012

D M

4

5

6

8

13

13

Page 18: TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,

TSP – Upper Bounds and Lower BoundsInterpreting the Upper and Lower Bound Values

The greatest lower bound found is 49

The shortest tour (least upper bound) has length 64.

So the actual route lies between 49 and 64. It is definitely possible to do it in 64 but a shorter route may be possible. This can only be found by trial and error

If the UB and the LB are the same then that is the answer.

49 64The smaller the gap the better


Recommended