A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.
-
Upload
chloe-tyler -
Category
Documents
-
view
213 -
download
1
Transcript of A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.
![Page 1: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/1.jpg)
A Trip to England
Nicholas GriceAngela Miranda
A2Computer Science 1
![Page 2: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/2.jpg)
ProblemFor 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:
![Page 3: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/3.jpg)
Hyde Park
Trafalgar Square
Mariott London County
Hall
Tower of London
London Eye
River Thames
19 minutes16 m
inutes
14 minutes 18
min
utes
2 min
utes
25 m
inut
es
16 m
inut
es
21 minutes
15 minutes
12 m
inutes
12 minutes
14 minutes
7 minutes
9 minutes
17 m
inut
es
TIME GRAPH
![Page 4: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/4.jpg)
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
mile
s
.04 m
iles
5 m
iles
3.1
mile
s
3.9 miles
2.7 miles
2.2 m
iles
1.4 miles
2.8 miles
1.1 miles
2.3
mile
s
1.2 miles
![Page 5: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/5.jpg)
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.
![Page 6: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/6.jpg)
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.
![Page 7: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/7.jpg)
MILEAGE GRAPH
Hyde Park
Trafalgar Square
Mariott London County
Hall
Tower of London
London Eye
River Thames
3.5miles
2.3
mile
s
.04 m
iles
5 m
iles
3.1
mile
s
2.7 miles
2.2 m
iles
2.8 miles
1.1 miles
2.3
mile
s
![Page 8: A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.](https://reader036.fdocuments.in/reader036/viewer/2022083008/56649dca5503460f94ac06fc/html5/thumbnails/8.jpg)
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