The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Implementation Challenges Next: Combinatorial Search and Heuristic Up: Graph Algorithms Previous: Exercises Implementation Challenges 1. Airline flight schedules define a natural graph, where the vertices are the airports and there is an edge between any two airports with direct flights between them whose weight is proportional to the distance between them. An extensive airplane data set due to Roberto Tammasia is available from the Algorithm Repository WWW/CD-ROM. Write a program that explicitly constructs the airport graph from this data set. 2. This problem is a follow-up to the exercise above. Changing planes repeatedly on connecting flights can be a hassle. Develop and implement an algorithm that finds the fewest flights needed to get from airport A to B, regardless of waiting time. 3. (*) This problem is a follow-up to the exercise above. Develop and implement an algorithm that finds the flight plan from airport A to B that minimizes the total distance traveled. 4. (*) This problem is a follow-up to the exercise above. Suppose that we must arrive at airport B at time T for an important scheduled meeting. Develop and implement an algorithm that finds the latest time one can leave airport A in time to make the meeting. 5. (*) This problem is a follow-up to the exercise above. In order to take advantage of a frequent flyer program, we might want to fly only on a particular airline. How can we modify the above solutions so as to accommodate such queries? 6. (**) This problem is a follow-up to the exercise above. A really devout frequent flyer might want to find the longest flight plan between airports A and B, so as to maximize the number of miles they get credit for. Develop and implement an algorithm to find the longest such route. Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK2/NODE82.HTM [19/1/2003 1:37:10]
Implementation Challenges Next: Intractable Problems and Approximations Up: Combinatorial Search and Heuristic Previous: Exercises Implementation Challenges 1. (*) Anagrams are rearrangements of the letters of a word or phrase into a different word or phrase. Sometimes the results are quite striking. For example, ``MANY VOTED BUSH RETIRED'' is an anagram of ``TUESDAY NOVEMBER THIRD,'' which correctly predicted the outcome of the 1992 U.S. presidential election. Design and implement an algorithm for finding anagrams using combinatorial search and a dictionary. 2. (*) For any of the exercises above, design and implement a simulated annealing heuristic to get reasonable solutions. How well does your program perform in practice? 3. (**) Design and implement a parallel sorting algorithm that distributes data across several processors. An appropriate variation of mergesort is a likely candidate. Measure the speedup of this algorithm as the number of processors increases. Later, compare the execution time to that of a purely sequential mergesort implementation. What are your experiences? Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK3/NODE103.HTM [19/1/2003 1:37:11]
- Page 1139 and 1140: 1.2.6 Linear Programming ● Knapsa
- Page 1141 and 1142: 1.2.7 Random Number Generation ●
- Page 1143 and 1144: 1.3.10 Satisfiability ● Constrain
- Page 1145 and 1146: Qhull - higher dimensional convex h
- Page 1147 and 1148: 1.6.5 Nearest Neighbor Search 1.6.5
- Page 1149 and 1150: 1.6.7 Point Location 1.6.7 Point Lo
- Page 1151 and 1152: 1.6.10 Medial-Axis Transformation 1
- Page 1153 and 1154: 1.6.3 Triangulation 1.6.3 Triangula
- Page 1155 and 1156: Nijenhuis and Wilf: Combinatorial A
- Page 1157 and 1158: 1.5.5 Hamiltonian Cycle 1.5.5 Hamil
- Page 1159 and 1160: 1.4.6 Matching 1.4.6 Matching INPUT
- Page 1161 and 1162: A compendium of NP optimization pro
- Page 1163 and 1164: 1.6.9 Bin Packing 1.6.9 Bin Packing
- Page 1165 and 1166: 1.6.12 Simplifying Polygons 1.6.12
- Page 1167 and 1168: 1.6.13 Shape Similarity 1.6.13 Shap
- Page 1169 and 1170: 1.6.11 Polygon Partitioning 1.6.11
- Page 1171 and 1172: 1.4.3 Minimum Spanning Tree 1.4.3 M
- Page 1173 and 1174: 1.6.15 Maintaining Line Arrangement
- Page 1175 and 1176: 1.3.7 Generating Graphs 1.3.7 Gener
- Page 1177 and 1178: 1.2.11 Discrete Fourier Transform 1
- Page 1179 and 1180: 1.5.8 Edge Coloring 1.5.8 Edge Colo
- Page 1181 and 1182: 1.3.3 Median and Selection 1.3.3 Me
- Page 1183 and 1184: 1.3.1 Sorting 1.3.1 Sorting INPUT O
- Page 1185 and 1186: Plugins for use with the CDROM Plug
- Page 1187 and 1188: Implementation Challenges Next: Dat
- Page 1189: Implementation Challenges Next: Gra
- Page 1193 and 1194: Caveats Next: Data Structures Up: A
- Page 1195 and 1196: 1.1.1 Dictionaries ● Priority Que
- Page 1197 and 1198: 1.1.4 Graph Data Structures ● Gra
- Page 1199 and 1200: 1.1.5 Set Data Structures ● Gener
- Page 1201 and 1202: 1.2.1 Solving Linear Equations ●
- Page 1203 and 1204: 1.2.2 Bandwidth Reduction ● Topol
- Page 1205 and 1206: 1.2.4 Determinants and Permanents
- Page 1207 and 1208: 1.2.8 Factoring and Primality Testi
- Page 1209 and 1210: 1.2.9 Arbitrary Precision Arithmeti
- Page 1211 and 1212: 1.2.10 Knapsack Problem ● Linear
- Page 1213 and 1214: 1.3.2 Searching ● Sorting Go to t
- Page 1215 and 1216: 1.3.4 Generating Permutations ● C
- Page 1217 and 1218: 1.3.5 Generating Subsets ● Genera
- Page 1219 and 1220: 1.3.6 Generating Partitions ● Gen
- Page 1221 and 1222: 1.3.8 Calendrical Calculations Go t
- Page 1223 and 1224: 1.3.9 Job Scheduling ● Feedback E
- Page 1225 and 1226: 1.4.2 Topological Sorting Related P
- Page 1227 and 1228: 1.4.8 Edge and Vertex Connectivity
- Page 1229 and 1230: 1.4.10 Drawing Graphs Nicely ● Pl
- Page 1231 and 1232: 1.4.11 Drawing Trees ● Planarity
- Page 1233 and 1234: 1.4.12 Planarity Detection and Embe
- Page 1235 and 1236: 1.5.2 Independent Set ● Vertex Co
- Page 1237 and 1238: 1.5.3 Vertex Cover ● Independent
- Page 1239 and 1240: 1.5.4 Traveling Salesman Problem
Implementation Challenges<br />
Next: Intractable Problems and Approximations Up: Combinatorial Search and Heuristic Previous:<br />
Exercises<br />
Implementation Challenges<br />
1. (*) Anagrams are rearrangements of the letters of a word or phrase into a different word or phrase.<br />
Sometimes the results are quite striking. For example, ``MANY VOTED BUSH RETIRED'' is an<br />
anagram of ``TUESDAY NOVEMBER THIRD,'' which correctly predicted the outcome of the<br />
1992 U.S. presidential election. <strong>Design</strong> and implement an algorithm for finding anagrams using<br />
combinatorial search and a dictionary.<br />
2. (*) For any of the exercises above, design and implement a simulated annealing heuristic to get<br />
reasonable solutions. How well does your program perform in practice?<br />
3. (**) <strong>Design</strong> and implement a parallel sorting algorithm that distributes data across several<br />
processors. An appropriate variation of mergesort is a likely candidate. Measure the speedup of<br />
this algorithm as the number of processors increases. Later, compare the execution time to that of<br />
a purely sequential mergesort implementation. What are your experiences?<br />
<strong>Algorithm</strong>s<br />
Mon Jun 2 23:33:50 EDT 1997<br />
file:///E|/BOOK/BOOK3/NODE103.HTM [19/1/2003 1:37:11]