DEPARTMENT OF INFORMATION TECHNOLOGY
CENTRE FOR DIPLOMA STUDIES
DAT 10203 DISCRTE MATHEMATICS
PROBLEM BASED TASK
*SERIES NUMBER PBT 1 PBT 2
TOPICS GRAPH
QUESTION NUMBER 1,2 AND 3
DATELINE 20 APRIL 2020
YEAR AND PROGRAM 1 DAT
STUDENT NAME MATRIX NO SECTION
1. MUHAMMAD AZAM AA190886 2
AKHRAM BIN ABDULLAH
2. MUHAMAD HAFIZ AA190509 2
STUDENTS DETAIL FAKHRUDDIN BIN AWANG
3. OS ASRI FIKRI BIN OS AA190471 2
NORTIKA
PUAN MAZNIHA BINTI BERAHIM
LECTURER NAME
TOTAL MARKS
LECTURER COMMENTS:
Notes: 1. *Please tick “√” at the appropriate box
2. Use blue front page for Section 1, green front page for Section 2 and pink front page for Section 3
PROBLEM 1
STEP 1: Define the problem
We need to find the shortest distance and shortest time based on weighted graph from UTHM Parit Raja
to UTHM Pagoh.
STEP 2: Devise a plan
Calculate distance and time of all possible way from UTHM Parit Raja to UTHM Pagoh.
STEP 3: Generate solution
a) Find the shortest route in distance from UTHMM Parit Raja to UTHM Pagoh.
UTHM Parit Raja → Sri Gading → Parit Sulong → UTHM Pagoh
b) Find the shortest route in time from UTHM Parit Raja to UTHM Pagoh.
UTHM Parit Raja → Parit Bingan → Yong Peng → UTHM Pagoh
c) Solve the traveling salesperson problem to the above figure.
There are three possible way that salesperson to take from UTHM parit raja to UTHM pagoh
1. UTHM Parit Raja → Sri Gading → Parit Sulong → UTHM Pagoh.
Distance = 73km, Time = 85 minutes
2. UTHM Parit Raja → Parit Bingan → Yong Peng → UTHM Pagoh
Distance = 75.9km, Time = 58 minutes
3. UTHM Parit Raja → Parit Bingan → Ayer Hitam → Yong Peng → UTHM Pagoh
Distance = 91km, Time = 69 minutes
All of this calculation we can see the second way are the best choice for salesperson to take.
STEP 4: Check and interpret
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
STEP 1: Define the Problem
We have to label the room and identify a way to tour the exhibit so that we pass through each door
exactly once.
STEP 2: Devise a plan
Label the room = {A, B, C, D, E}
Assume the way = A → B → C → D → E → A
STEP 3: Generate solution
STEP 4: Check and Interpret
We label each room with variables {A, B, C, D, E}. We use the circuit or cycle terms of the graph
because the tour we sketch begin at the same room or vertex. We don’t have repeated edges because we
not allowed to pass through each door or edges twice. So, we can tour each room without pass through the
same door. The way to tour exhibit is A→B→C→D→E→A.
PROBLEM 3
STEP 1: Define the Problem
We need find the route with the least total airfare that visits each of the cities in
this graph, where the weight on an edge is the least price available for a flight between the two cities.
STEP 2: Devise a plan
Cities Vertex name
Los Angeles LA
San Francisco SF
Denver DV
Detroit DT
New York NY
Los Angeles to:
a. San Francisco = $69
b. Denver = $209
c. Detroit = $349
d. New York = $379
San Francisco to:
a. Denver = $179
b. Detroit = $329
c. New York = $359
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
STEP 4: Check and Interpret
First, I consume all the vertex as a short form of every cities which is LA for Los Angeles, SF for San
Francisco, DV for Denver, DT for Detroit and NY for New York. Then, start from any vertex. I pick LA
vertex. Next, choose from LA to cities that have the cheapest flight. The result is LA to SF to DV to DT
to NY. The price of all the flight is $666.
SCORE TABLE (Fill by Lecturer)
Problem Step 1 Step 2 Step 3 Step 4 Total Score Per
Problem
1
2
3
Total score per step