CS447/CS547/EE667 Homework 3 - due Thursday September 18, 2008 ----------------------------------------------------- For each of the following problems, you must solve it by either modifying an existing algorithm, or just showing how an existing algorithm can be applied directly to the given problem. The way you must modify an existing algorithm is to copy the algorithm directly from the book and add some new data structure or functionality to the algorithm. You must highlight the part that you have modified. 1. Chapter 3, problem 2 2. Chapter 3, problem 4 3. Chapter 3, problem 10 4. Suppose an airline only flies between certain pairs of cities, and you are given a list of the pairs of cities it flies between. You want to fly from New York to Chicago, but visting as few cities as possible. (A) Give an algorithm to give a trip from New York to Chicago with the fewest cities possible. If there is more than one trip with the fewest cities possible, then you prefer a trip that goes through Boston. (B) Give an algorithm to give a trip from New York to Chicago with the fewest cities possible. If there is more than one trip with the fewest cities possible, then you prefer a trip that goes through as many cities beginning with B as possible (Boston, Beijing, Bombay, etc.)