Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.

Similar presentations


Presentation on theme: "A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1."— Presentation transcript:

1 A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1

2 Problem For winter break George’s family is going to England to visit his grandparents. As soon as he arrives his family went on a 3 day tour with his grandparents around England. But with so little gas in the tour bus, George must find the shortest route to all of the places he wants to visit: Tower of London Hyde Park River Thames Trafalgar square London Eye Marriot London, County hall. Find the shortest route for George by using these graphs:

3 Hyde Park Trafalgar Square Mariott London County Hall Tower of London London Eye River Thames 19 minutes 16 minutes 14 minutes 18 minutes 2 minutes 25 minutes 16 minutes 21 minutes 15 minutes 12 minutes 14 minutes 7 minutes 9 minutes 17 minutes TIME GRAPH

4 MILEAGE GRAPH Hyde Park Trafalgar Square Mariott London County Hall Tower of London London Eye River Thames 3.5miles 3.1 miles 1.5miles 2.3 miles.04 miles 5 miles 3.1 miles 3.9 miles 2.7 miles 2.2 miles 1.4 miles 2.8 miles 1.1 miles 2.3 miles 1.2 miles

5 Solution ( in miles and minutes) There are three solutions for Georges problem: Kruskal,Prims, and Dijkstra. Kruskals: ( miles) First start at The Marriott London, County hotel. Then connect to London Eye since its has the shortest amount of miles to take.(.04) Next go to Trafalgar Square since it has less mileage.(1.2) Afterwards go to River Thames because it has a lesser mileage consumption rate.(1.1) Then go to the Hyde Park for only 1.4 miles. Then finish the tour at The Tower of London(5) Total distance : 8.74miles Kruskals: (minutes) First start at The Marriot London, County hotel. Then go To London's Eye(2 minutes) Next go to Hyde Park( 14 minutes) Afterwards go to Trafalgar Square( 12 minutes) The go to River Thames( 9 minutes) Finally Tower Of London(21 minutes) Total distance: 58 min.

6 PRIMS Problem: George’s family noticed that they’re missing his wallet when they are at the end of the tour. They have to go back all the way up to the places they’ve visited to try to find the wallet. They picked River Thames as their starting point and they searched for it but it wasn’t there. Assume that the path is changed due to traffic. So they went to the nearest neighbor which is the Trafalgar Square. (1.1m) but still they couldn’t find it. After the Trafalgar Square, the nearest neighbor is the Hyde Park. (2.2m away from the Trafalgar Square) But still the wallet isn’t there. They went to London Eye (2.8m) the wallet isn’t there. Then the last option of nearest neighbor is the Tower of London. (2.7m) They connected all the destination but they couldn’t find the missing wallet. Total mileage: 8.8m Then suddenly they receive a call that someone had returned the wallet to the hotel so the case is solved.

7 MILEAGE GRAPH Hyde Park Trafalgar Square Mariott London County Hall Tower of London London Eye River Thames 3.5miles 2.3 miles.04 miles 5 miles 3.1 miles 2.7 miles 2.2 miles 2.8 miles 1.1 miles 2.3 miles

8 Solution ( miles and minutes) George wants to go to London's eye while still finding the shortest route from the Marriot Hotel to London's eye. Dijkstra(minutes): First start at the Marriot Hotel. Then compare the routes that is connected to the Marriott hotel,except London's eye. After comparing go to the Trafalgar square( 14 min) since it’s the least amount of time to get there. Then compare the time to go to River Thames


Download ppt "A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1."

Similar presentations


Ads by Google