Problem Based Task 2
Problem Based Task 2
TOPICS GRAPH
TOTAL MARKS
LECTURER COMMENTS:
We need to find the shortest distance and shortest time based on weighted graph from UTHM Parit Raja
to UTHM Pagoh.
Calculate distance and time of all possible way from UTHM Parit Raja to UTHM Pagoh.
a) Find the shortest route in distance from UTHMM Parit Raja to UTHM Pagoh.
b) Find the shortest route in time from UTHM Parit Raja to UTHM Pagoh.
There are three possible way that salesperson to take from UTHM parit raja to UTHM pagoh
All of this calculation we can see the second way are the best choice for salesperson to take.
We have identified all the possible way from UTHM Parit Raja to UTHM Pagoh. The shortest distance is
UTHM Parit Raja → Sri Gading → Parit Sulong → UTHM Pagoh and the shortest time is UTHM Parit
Raja → Parit Bingan → Yong Peng → UTHM Pagoh. However, a better choose for salesperson need to
take from UTHM parit raja to UTHM pagoh are UTHM Parit Raja → Parit Bingan → Yong Peng →
UTHM Pagoh because the distance that it takes just a little bit longer from first way but the time it takes
are far shorter than the first way.
PROBLEM 2
Denver to:
a. Detroit = $229
b. New York = $279
Detroit to:
a. New York = $189
STEP 3: Generate solution
LA → SF → DV → DT → NY
$69 + $179 + $229 + $189 = $666