class+April22+extra

# class+April22+extra - So the repetitive nearest neighbor...

This preview shows pages 1–5. Sign up to view the full content.

Math 103, Section 11, Friday, April 22, 2011 Willy’s Traveling Salesman Problem solved using brute-force, the repetitive nearest- neighbor algorithm, and the cheapest-link algorithm: Figure 6-10, in a table A B C D E A 185 119 152 133 B 185 121 150 200 C 119 121 174 120 D 152 150 174 199 E 133 200 120 199 Here is the solution to Willy’s optimal tour using the brute-force algorithm :

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
From Table 6-5, you can find the 2 cheapest tours for \$676.: Tour 11 has the sequence; A,D,C,B,E,A and its mirror image A,E,C,B,D,A Using the Repetitive Nearest-Neighbor Algorithm , we redo the nearest neighbor algorithm starting at vertices: B,C,D and E. We then rewrite the circuit so it starts at A in each case. Starting vertex Route Route starting with A Cost of route A A,C,E,D,B,A A,C,E,D,B,A \$773 B B,C,A,E,D,B A,E,D,B,C,A \$722 C C,A,E,D,B,C A,E,D,B,C,A \$722 D D,B,C,A,E,D A,E,D,B,C,A \$722 E E,C,A,D,B,E A,D,B,E,C,A \$741 Note that trips starting at vertices B,C, and D are the same trip . You can see this when you rewrite the trip so that the Route starts at vertex A.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: So the repetitive nearest neighbor algorithm gives the tour A,E,D,B,C,A with \$722 as the cheapest. The Cheapest-Link Algorithm We then consider CD, AB, and DE which do not close the circuit. BE does close the circuit. Add BE to your graph. The total cost of this tour is : 119+120+150+152+200= \$741 The cheapest-link algorithm gives the tour: A,C,E,B,D.A and costs 119+120+150+152+200= \$741 Willy’s optimal tour using the brute-force algorithm is A,D,C,B,E,A and costs \$676. The repetitive nearest neighbor algorithm gives the tour A,E,D,B,C,A and costs \$722. Relative error of a tour (e) e=(cost of tour-cost of optimal tour)/cost of optimal tour relative error for the repetitive nearest neighbor algorithm=(722-676)/676= 0.068047=6.80% relative error for the cheapest-link algorithm=(741-676)/676= 0.096154=9.62% Method Optimal? Efficient? Brute-force Yes No Repetitive nearest-No Yes neighbor Cheapest link No Yes...
View Full Document

## This note was uploaded on 01/20/2012 for the course MATH 103 taught by Professor Berkowitz during the Spring '07 term at Rutgers.

### Page1 / 5

class+April22+extra - So the repetitive nearest neighbor...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online