The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by NOOR BAZLI HAMDANI, 2022-10-07 09:12:13

Casestudy1_Math

Casestudy1_Math

POLITEKNIK SULTAN MIZAN ZAINAL ABIDIN
DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY

DBM20083
DISCRETE MATHEMATICS

TOPIC CHAPTER 3

ASSESMENT CASE STUDY

NAME i. NURUL ATIEFFA BINTI JIMI HASNUL
REG. NO ii. NUR FATIHAH AZMAR BINTI SHIPUN AZUDDIN
PROGRAMME iii. SITI NABIHA RADZIAH BINTI MUHAMMED NAZRI
iv. AL KHALID BIN ABDUL AZIZ
i. F1101
ii. F1156
iii. F1050
iv. F1116
DDT2S3

INSTRUCTIONS:
1. Answer ALL the questions
2. Submit your assessment on _________________

MARKING SCHEME

CLO3 P3

TOTAL

THE ENTIRE QUESTION IS BASED ON JTMK’S QUESTION BANK APPROVED BY PROGRAMME LEADER.
SIGNATURE IS NOT REQUIRED

TABLE OF CONTENTS

a) Introduction ………………………………………………………. 2
b) Chart ………………………………………………………………. 3
c) Data Analysis & Calculation ……………………………………….. 5
d) Conclussion ………………………………………………………… 7
e) References ………………………………………………………….. 8

A) Introduction
A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a
connected, edge-weighted undirected graph that connects all the vertices together, without any cycles
and with the minimum possible total edge weight.[1] That is, it is a spanning tree whose sum of edge
weights is as small as possible.[2] More generally, any edge-weighted undirected graph (not necessarily
connected) has a minimum spanning forest, which is a union of the minimum spanning trees for its
connected components. Prim's algorithm is a greedy algorithm that starts from one vertex and continue
to add the edges with the smallest weight until the goal is reached. The applications of prim's algorithm
are Prim's algorithm can be used in network designing. ,it can be used to make network cycles and can
also be used to lay down electrical wiring cables . In Kruskal's algorithm, we start from edges with the
lowest weight and keep adding the edges until the goal is reached.The applications of Kruskal's
algorithm are Kruskal's algorithm can be used to layout electrical wiring among cities and it can be used
to lay down LAN connections.

2

B) CHART

Photo was taken from Google Maps
3

Weighted Graph

C
TUMPAT

23 KM 21 KM D
B 20 KM
PASIR MAS
E
KOTA BHARU

21 KM 8 KM

A 17 KM F
RANTAU PANJANG
18 KM KUBANG KERIAN

30 KM G 16 KM
KADOK

36 KM 6 KM H
MELOR

P 5KM 21 KM
JELI
48 KM I J
33 KM L KETEREH

TANAH MERAH PASIR PUTEH

13 KM 23 KM
27 KM
O
KUALA K
MACHANG
BALAH 21 KM
47 KM

DABONG 81 KM M
N KUALA KRAI

4

C) Data Analysis & Calculation

PRIM ALGORITHM ;

• The numbers near the edges indicate the weight of it .
• Vertex L , which is at Tanah Merah chosed as starting point .
• Vertex P, A, B, K, are connected to L through single edge .
• K ,(Machang) is the nearest vertex to L and wil be choose as second vertex along with edge KL .
• P(Jeli) is 48 away from L and also A was 36 away from L .
• B is the smallest distance between other , so B will be highlight and the arc is LB .
• C is 23 away from B and E and A is 21 away from B . So A will be choose as the second vertex

along with the edge BA .
• Vertex K (Machang) , which is 27 Away from L was highlighted .
• We can choose between I and M or J .
• J is 27 away from K , I is 23 away from K and M is 47 away from K . I is the nearest so I will be

highlight and the arc is KI .
• The only available vertices here is H (Melor) and G (Kadok) . H is 5 away from I and G is 6 away

from I . H is chosen and highlighted along with arc IH

5

SOLUTION

B
A

I5 H

23
L

13

K

VERTEX WEIGHT
1 AB 21
2 BL 30
3 LK 13
4 KI 23
5 IH 5

Total minimal spanning tree = 21 + 30 + 13 + 23 + 5
= 92

6

D) Conclusion
We Choose Prim`s Algorithm to conclude the Question . It`s because The advantage of Prim’s
algorithm is its complexity, which is better than Kruskal’s algorithm. Therefore, Prim’s algorithm is
helpful when dealing with dense graphs that have lots of edges.However, Prim’s algorithm doesn’t
allow us much control over the chosen edges when multiple edges with the same weight occur. The
reason is that only the edges discovered so far are stored inside the queue, rather than all the edges
like in Kruskal’s algorithm. Also Unlike Kruskal’s algorithm, Prim’s algorithm is a little harder to
implement.

7

E) References
1. Discrete Mathematics (DBM20083) for Polytechnic Student Semstr 2 Digital Technology by
Nurul Adani binti Haron
2. Kelantan - Google Maps

8


Click to View FlipBook Version