Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use JAVA and also include comments / brief explanation Also please fulfil all requirements Use the adjacency matrix provided 16 21 2 Bukit Batok
Please use JAVA and also include comments / brief explanation Also please fulfil all requirements
Use the adjacency matrix provided
16 21 2 Bukit Batok 18 3 Bukit Panjang 16 5 Clementi Bukit Timah Bedok 6 Changi Cho Chu Vang 8 Jurong 9 Mandai 12 Outram 11 Nee Soon 6 13 Pasir Panjang 14 Punggol 15 Queenstown 17 Sentosa Sembawang 18 Serangoon 6 19 Tampines 10 Marina Bay . 16 . 20 Toa Payoh Tuas 22 23 Upper Thomson Woodlands 5 16 16 = e 5 13 22 5 6 7 = 16 7 19 6 4 4 = 15 90 16 = = = 11 22 7 5 7. 6 5 25 . 10 14 11 = 5 . 7 9 5 = = = = 16 5 18 = 4 4 = 22 90 = 6 19 11 25 se 22 15 19 = 15 3 = 8 16 2 2 se Index 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 10 Index 0 To! From Ang Mo Kio Ang Mo Kio Bedok Bukit Batok 18 Bukit Panjang 16 Bukit Timah Clementi Changi ChoiChu Karg = Jurong Mandai Marina Bay Nee Soon 6 Outram Pasir Panjang = Punggol Queenstown Sembawang Sentosa Serangoon 6 Tampines = Toa Payoh Tuas Upper Thomson 5 Woodlands = 6 . 5 16 = = = 3 = = = 9 16 8 2 . 5 6 = 6 8 7 = 8 = 9 9 - 5 5 = . 50 6 = 10 9 9 = 10 6 5 5 = . 6 8 10 . 8 8 12 -- = = 16 5 18 6 15 . = 5 13 = 8 = 6 12 6 10 10 8 9 15 16 = 15 19 = 16 11 10 6 14 11 8 . = 11 8 9 9 = 5 = Part B: (10.0 marks) You are engaged to develop an application that helps a manager to determine the shortest route a delivery vehicle needs to use between cities. Having studied CSC1203 - Data Structure and Algorithms, you recognize that this is an application for Dijkstra's shortest path algorithm. To prepare for your proposal , you decide to implement it on your computer. The requirements are listed below. Note that marks are also awarded for presentation of your program output. Requirement 1 - Representation of the map in Figure 1 Represent the city-distance information shown in the map in Figure 1 with a weighted graph using adjacency matrix or link-list. Sembawang Woodlands 5 00 5 6 Choa Chu Kang 15 14 11 22 18 15 Punggol Mndal 3 Nee Soon 11/15 16 6 Bukit 16 Ang Mo Kio 8 6 16 Changi Panjang 7 6 18 5 12 8 Serangoon 5 Apper 6/ Bukit 6 Thomson 16 Tampines Batak Bukit 5 Timah 25 7 10 10 Toa Payoh 16 Bedok Blo, Clement 5 Marina Bay Queenstown 16 Pasir 5 Panjang Outram 110 8 6 6 16 19/ 2216 59 19 Jurong 6 6 Sonusa Requirement 2 - Imple me ntation Write an interactive program that given the start and destination cities, will determine the shortest route between them and its total distance. It is all right to have 0 distance; ie., start and end at the same city. You can assume that the roads are all bi-direction: ie., vehicle can travel in both directions. The output of your program may look something similar as follow: Start from: Changi To: Choa Chu Kang Path: Changi -> Toa Payoh -> Bukit Timah -> Bukit Batok -> Choa Chu Kang Total distance: 39 Km. Requirement 3 - Test run Test your program by determining the following routes: Changi to Choa Chu Kang Bedok to Bukit Batok Marina Bay to Woodlands . Sembawang to Bukit Timah Upper Thomson to Outram Bukit Batok to Tampines Requirement 4 - Program Complexity Derive the program running time complexity of your algorithm using Big-O notation. State clearly how you arrive at the Big-O notation. Partial marks will be awarded only for stating without showing the work in arriving at your conclusionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started