You are on page 1of 4

Exercise Set 6.

2.)

4.)

6.) Transportation. For the direct air flights given in exercise 2 of of section 6.1 , find a route that visits
each city and returns to the starting city without visiting each city twice.

8.)

10.)

12.)

14
16.) Graph in exercise 12

18.) Graph in exercise 14

20.) Travel. A tourist is staying in Toronto, Canada, and would like to visit four other Canadian Cities by
Train. The visitor wants to go from one city to next and return to Toronto while minimizing the total
travel distance. The distances between cities, in kilometers, are given in the following table. Represent
the distances between the cities using weighted graphs. Use the greedy algorithm to plan a route for the
tourist.

Toronto Kingston Niagara Falls Ottawa Windsor


Toronto 259 142 423 381
Kingston 259 397 174 623
Niagara Falls 142 397 562 402
Ottawa 423 174 562 787
Windsor 381 623 402 787

22.) Travel. Use the edge-picking algorithm to design a route for the tourist in exercise 20.

24.) Travel. The prices for travelling between five cities in Colorado by bus are given in the table below.
Represent the travel costs between cities in using a weighted graph. Use the greedy algorithm to find a
low-cost route that starts and ends In Boulder and visits each city.

Colorado
Boulder Denver Grand Junction Durango
Springs
Boulder $16 $16 $25 $49 $74
Denver $22 $45 $72
Colorado
$25 $22 $ $58 $59
Springs
Grand Junction $49 $45 $58 $ $32
Durango $74 $72 $59 $32

26. Travel. Use the edge-picking algorithm to find a low cost bus route in exercise 24.

28.) Route Planning. A bike messenger needs to deliver packages to five different buildings and return to
the courier company. The estimated biking times (in minutes) between the buildings in the following
table. Use the greedy algorithm and the edge picking algorithm to find to possible routes for the
messenger that will help minimize the total travel time.
Bank of Imperial Design
Courier Prudential
America bank GE tower center
company building
building building
Courier 17
10 8 15 12
company
Prudential 8
10 10 6 9
building
Bank of 20
America 8 10 7 18
building
Imperial 16
bank 15 6 7 22
building
GE tower 12 9 18 22 5
Design
17 8 20 16 5
center

30. computer networks a small office wishes to network its six computer in one large loop (see check
your progress 6 on page 253). The lengths of cables in meters required between machines are given in
the table below. Use the edge picking algorithm to find an efficient cable configuration in which to
network the computers.

28.) Route Planning. A bike messenger needs to deliver packages to five different buildings and return to
the courier company. The estimated biking times (in minutes) between the buildings in the following
table. Use the greedy algorithm and the edge picking algorithm to find to possible routes for the
messenger that will help minimize the total travel time.

Computer
Computer A Computer B Computer C Computer D Computer E
F
Computer A 10 22 9 15 8
Computer B 10 12 14 16 5
Computer C 22 12 14 9 16
Computer D 9 14 14 7 15
Computer E 15 16 9 7 13
Computer F 8 5 16 15 13

EXTENSIONS

32. route planning. A city engineer needs to inspects the traffic signs at each street intersection of a
neighbor hood the engineer has drawn a graph to represent the neighborhood where the edges
represents the straights and the vertices correspond to street interseptions. Would the most efficient
route to drive correspond to an euler circuit, a Hamiltonian circuit or neither? (the engineer must return
to the starting location when finished). Explain your answer.

34. a. assign weights to the edges of the following complete graph so that the edge pciking algorithm
give the circuit a lower total weight than the circuit given by the greedy algorithm. For the greedy
algorithm begin at vertex A.

b. assign weights to the edges of the graphs so that the greedy algorithm gives a circuit of lower total
weight than the circuit given by the edge picking algorithm for the greedy algorithm begin at vertex a.

c. assign weights to the edges of the graph so that there is a circuit of lower total weight than the
circuits given by both the greedy algorithm (beginning at vertex a) and the edge picking algorithm.

You might also like