Shortest Route Problem
Shortest Route Problem
Figure below shows the set of interstate highways Fairway trucks can travel to transport the goods. Management would like to determine the route minimum distance from Seattle to E1 Paso.
BUTTLE 2 420 BOISE 4 345 SALTLAKE CITY 6 621 577 554 5 691 CHEYENNE 497
7
LAS VEGAS BAKERFIELD 500 10
8
290
PHOENIX
TUCSON
Let x ij representing utilizatin of the highway from city I to city j. x ij Is a if a truck travels on the highway from city I to city j; it is 0 if it does not. Thus the complete linear programming model is : Min 599 X12+180X13+.+314X11,12 ST X12+X13+X14 X25+X26+X12 X34+X37-X13 X46-X14-X34 X56-X59-X25 = 1 (Seattle : Flow out =1) = 0 (Buttle : Flow out =Flow in) = 0 (Portland ,,) = 0 (Boise) = 0 (Cheyenne)
X68+X69-X26-X46-X56
X78+X7,10-X37 X89+X8,10 X68-X78 X9,12-X59-X69 X89 X10,11+X10,12-X7,10 X8,10 X11,12-X10,11 -X9,12-X10,12 X11,12
All Xijs =0 or 1
Answer : 1 (Seattle)- 4(Boise)-6(Salt Lake City)-9(Albuquerque)12(E1 Paso). The minimum distance is 1731.
Floyds Algorithm
Find the shortest route between any two points of the following 10 points 1. 2. 3. 4. 5. 6. 7. 8. 9. Rajbada n 1 Railway Station n2 The Daly College-n3 MY Hospital n4 Lalbagh Palace-n5 Hotel Sayaji-n6 Hotel Shreemaya-n7 The MP High Court-n8 Palacia Square-n9
10. Airport-n10
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N1
2.2
4.5
3.8
4.8
8.0
1.5
2.8
3.5
4.5
N2
2.2
4.0
2.7
4.5
6.5
1.5
1.0
3.8
9.0
N3
4.5
4.0
1.5
6.0
3.6
3.1
3.7
2.5
9.5
N4
3.8
2.7
1.5
4.5
3.7
0.8
1.7
1.5
8.0
N5
4.8
4.5
6.0
4.5
9.5
4.5
3.7
6.2
8.0
N6
8.0
6.5
3.6
3.7
9.5
4.8
4.4
3.5
9.5
N7
1.5
1.5
3.1
0.8
4.5
4.8
1.0
2.5
8.0
N8
2.8
1.0
3.7
1.7
3.7
4.4
1.0
1.5
7.5
N9
3.5
3.8
2.5
1.5
6.2
3.5
2.5
1.5
8.7
N10
4.5
9.0
9.5
8.0
8.0
9.5
8.0
7.5
8.7