0% found this document useful (0 votes)
45 views5 pages

Ethod of ATA Ollection: Prim's Algorithm (Minimum Spanning Tree Algorithm)

Prim's algorithm is an algorithm for finding minimum spanning trees for weighted undirected graphs. It works by building the spanning tree one edge at a time, taking the shortest possible edge from the tree to add a new node each time. The steps are to start with any node, connect it to the closest neighboring node. Then choose the closest neighboring node not yet included and connect it, repeating until all nodes are included in the minimum spanning tree.

Uploaded by

koni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views5 pages

Ethod of ATA Ollection: Prim's Algorithm (Minimum Spanning Tree Algorithm)

Prim's algorithm is an algorithm for finding minimum spanning trees for weighted undirected graphs. It works by building the spanning tree one edge at a time, taking the shortest possible edge from the tree to add a new node each time. The steps are to start with any node, connect it to the closest neighboring node. Then choose the closest neighboring node not yet included and connect it, repeating until all nodes are included in the minimum spanning tree.

Uploaded by

koni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Prim's Algorithm(minimum spanning tree

algorithm)
The steps are as follows:
Step 0: set C= and C'={1, 2, ...,m}
Step 1: Start with any node, say node i, in
and connect it to node j that is closed to
node i. Set C={i, j} and C'={1, 2, ..., m}\{i,
j}
Step 2: Now choose node 1 in C' that is
closed to some node k in C. Then connect
node k to node 1. Set C={i, j, k} and
C'=C'\C
Step 3: Repeat step 2 until C'= . Ties for
the closet node and arc to be included in the
minimum spanning tree may be broken
arbitrary.[9][11]
3. METHOD OF DATA
COLLECTION
The data used for this study is created using
latitude and longitude converter software
which makes use of airport latitude and
longitude in Myanmar to determine the
airport distance.

'0
C

Journal of Information Technology, Research and Innovation 2020, Vol-1, Issue-1
June, 2020
Figure 1. Airport to Airport airline
Network in Myanmar
Table 1. Latitudes and Longitudes of
Airports in Myanmar
S/ Airport
Latitude(N) Longitude(E)
N name
1 Heho 020° 44′ 49″ 096° 47′ 31″
2 Mong Hsat 020° 31′ 00″ 099° 15′ 24″
3 Tachilet 020° 29′ 01″ 099° 56′ 07″
4 Kengtung 021° 18′ 05″ 099° 38′ 09″
5 Mandalay 021°42' 07″ 095°58′ 40″
6 Loikaw 019° 41′ 29″ 097° 12′ 53″
7 Naypyidaw 019° 37′ 24″ 096° 12′ 03″
8 Naung U 021° 10′ 43″ 094° 55′ 48″
9 Pakokku 021° 24′ 00″ 095° 06′ 00″
10 Monywa 022° 14′ 00″ 095° 07′ 00″
11 Lasho 022° 58′ 40″ 097° 45′ 07″
12 Taunggo 019° 01′ 48″ 096° 25′ 00″
13 Magwe 020° 09′ 56″ 094° 56′ 28″
14 Kyaukpyu 019° 25′ 35″ 093° 32′ 05″
15 Sittwe 020° 07′ 57″ 092° 52′ 21″
16 Kyauktu 021° 24′ 45″ 094° 08′ 31″
17 Kalaymyo 023° 11′ 19″ 094° 03′ 03″
18 Bhamo 024° 16′ 15″ 097° 14′ 49″
19 Homalin 024° 53′ 58″ 094° 54′ 50″
20 Myityina 025° 23′ 01″ 097° 21′ 06″
21 Khamti 025° 59′ 18″ 095° 40′ 28″
22 Putao 027° 19′ 47″ 097° 25′ 34″
23 Thandwe 018° 27′ 38″ 094° 18′ 00″
24 Pathein 016° 48′ 54″ 094° 46′ 47″
25 Yangon 016° 54′ 26″ 096° 07′ 59″
Mawlamya
26 i
016° 26′ 41″ 097° 39′ 38″
27 Dawe 014° 06′ 13″ 098° 12′ 13″
28 Myeik 012° 26′ 23″ 098° 37′ 17″
29 Bokpyin 011° 16′ 00″ 098° 46′ 00″
30 Kawthoung 010° 02′ 57″ 098° 32′ 16″
[12]
Table 2. Distance in Km from Airport to another Airport
Airpo 2.Mo 8.Na
S/ 1.He 3.Tach 4.Kengt 5.Mand 6.Loik 7.Naypyi 9.Pako 10.Mon 11.La 12.Taun 13.Ma
rt ng ung
N ho ilet ung alay aw daw kku ywa sho ggo gwe
name Hsat U
1 Heho 257.8 135.9 125.4 139.3 199.2
Mong
2 257.8 70.77 95.73
Hsat
Tachil
3 70.77 96.11 297.4
et
Kengt
4 95.73 96.11 269.1
ung
Manda
5 135.9 106.7 231.1
lay
Loika
6 125.4 297.4 111.4
w
Naypyi
7 139.3 69.75 144.9
daw
Naung
8 199.2 30.27
U
Pakok
9 30.27 92.68
ku
Naung U
Pakokk
u
Kalaymyo
Putao
Myitkyina
Bhamo
Kyaukpyu
Mandalay Kengtung
Tachilek
Mong Hsat
Heho
Lasho
Pathein
Yangon
Mawlamying
Dawei
Myeik
Bokyin
Kawthoung
Loikaw
Sittwe
Magwe
Thandwe
Monywa
Kyauktu
Homalin
Khamti
Naypyida
w
Taungoo
Journal of Information Technology, Research and Innovation 2020, Vol-1, Issue-1
June, 2020
10 Monywa 106.7 92.68
11 Lasho 269.1 231.1
12 Taunggo 111.4 69.75
13 Magwe 144.9
14 Kyaukpyu 168.5
15 Sittwe 243.6
16 Kyauktu
17 Kalaymyo 152.4
18 Bhamo 152.7
19 Homalin
20 Myityina
21 Khamti
22 Putao
23 Thandwe
24 Pathein
25 Yangon 237.9
26 Mawlamyai
27 Dawe
28 Myeik
29 Bokpyin
30 Kawthoung

19. 20. 21. 22. 23. 24. 25.


S/ Airpor 14.Kyau 15.Sitt 16.Kya 17.Kalay 18.Bha 26.Mawla
Homa Myity Kha Put Thand .Path Yang
N t name kpyu we uktu myo mo myai
lin ina mti ao we ein on
1 Heho
Mong
2
Hsat
Tachile
3
t
Kengtu
4
ng
Manda
5
lay
Loika
6
w
Naypyi
7
daw
Naung
8 243.6
U
Pakokk
9
u
Mony
10 152.4
wa
11 Lasho 152.7
Taung
12 237.9
go
13 Magwe 168.5
Kyauk
14 104.7 134.2
pyu
15 Sittwe 104.7 194.1
Kyaukt
16 194.1 197.7
u
Kalay
17 197.7 346.9 209.5
myo
18 Bhamo 346.9 246 124.2
Homali
19 209.5 246 251.2 143.1
n
Myityi
20 124.2 251.2 181 216.5
na
21 Khamti 143.1 181 229.2
22 Putao 216.5 229.2
Thand
23 134.2 189.9 259.9
we
24 Pathein 189.9 144.4
Yango
25 259.9 144.4 170.6
n
Mawla
26 170.6
myai
27 Dawe 382.6 266.8
28 Myeik 564.2
Bokpyi
29
n
Kawtho
30
ung

Journal of Information Technology, Research and Innovation 2020, Vol-1, Issue-1


June, 2020
S/ Airport
27.Dawe 28.Myeik 29.Bokpyin 30.Kawthoung
N name
25 Yangon 382.6 564.2
26 Mawlamyai 266.8
27 Dawe 190.5
28 Myeik 190.5 586.3 266
29 Bokpyin 586.3 580.9
30 Kawthoung 266 580.9

Table 3. Prim's calculation


Initial
Relabeling Node
vertex
I II III IV V VI VII VIII
L1- L1- L1- L1- L1- L1- L1- L1-
2 2(257.8)
L1-2(257.8)
2(257.8) 2(257.8) 2(257.8) 2(257.8) 2(257.8) 2(257.8) 2(257.8)
L6- L6- L6- L6- L6- L6- L6-
3 3(297.4)
L6-3(297.4)
3(297.4) 3(297.4) 3(297.4) 3(297.4) 3(297.4) 3(297.4) 
4         
L1- L1- L1-
5 5(135.9)
L1-5(135.9)
5(135.9) 5(135.9)
- - - - -
L1-
6 6(125.4)
- - - - - - - -
L1- L12-
7 7(139.3)
L1-7(139.3)
7(69.75)
- - - - - -
L1- L1- L1- L1- L1- L9-
8 8(199.2)
L1-8(199.2)
8(199.2) 8(199.2) 8(199.2) 8(199.2) 8(30.27)
- -
L10-
9 9(92.68)     
L5-
10 10(106.7)
- - - -    
L5- L5- L5- L5- L5-
11 11(231.1) 11(231.1) 11(231.1) 11(231.1) 11(231.1)    
L6-
12 12(111.4)
- - - - - - - 
L7- L7- L7- L7- L7-
13 13(144.9) 13(144.9) 13(144.9) 13(144.9) 13(144.9)
-   
L13-
14 14(168.5)        
L8- L8-
15 15(243.6) 15(243.6)       
16         
L10- L10- L10-
17 17(152.4)
L10-17(152.4)
17(152.4) 17(152.4)     
L17-
18 18(346.9)        
L17-
19 19(209.5)        
20         
21         
22         
23         
24         
L12-
 
L12- L12-
25 25(237.9)
L12-25(237.9) L12-25(237.9) L12-25(237.9) L12-25(237.9)
25(237.9) 25(237.9)

26         
27         
28         
29         
30         

Relabeling Node

IX X XI XII
2 L1-2(257.8) L1-2(257.8) L1-2(257.8)
3 L6-3(297.4) L6-3(297.4) L6-3(297.4)
4   
5 - - -
6 - - -
7 - - -
8 - - -
9 - - -
10 - - -
11 L5-11(231.1) L5-11(231.1) L5-11(231.1)

Journal of Information Technology, Research and Innovation 2020, Vol-1, Issue-1


June, 2020
12 - - - - - - - - -
13 - - - - - - - - -
14 L13-14(168.5) - - - - - - - -
15 L8-15(243.6) L14-15(104.7) - - - - - - -
16 L17-16(197.7) L17-16(197.7) L15-16(194.1) L15-16(194.1) L15-16(194.1) L15-16(194.1) L15-16(194.1) - -
17 - - - - - - - - -
18 L17-18(346.9) L17-18(346.9) L17-18(346.9) L17-18(346.9) L17-18(346.9) L17-18(346.9) L17-18(346.9) L17-18(346.9) L19-18(246)
19 L17-19(209.5) L17-19(209.5) L17-19(209.5) L17-19(209.5) L17-19(209.5) L17-19(209.5) L17-19(209.5) L17-19(209.5) -
20 L19-20(251.2)        
21 L19-21(143.1)        
22         
23 L14-23(134.2) L14-23(134.2) L14-23(134.2) - - - - - -
24 L23-24(189.9) - - - - -   
25 L12-25(237.9) L12-25(237.9) L12-25(237.9) L12-25(237.9) L24-25(144.4) - - - -

26 L25-26(170.6) - - -     
27 L25-27(382.6) L26-27 (266.8) L26-27 (266.8) L26-27 (266.8)     
28 L25-28 (564.2) L25-28 (564.2) L25-28 (564.2) L25-28 (564.2)     
29         
30         

Relabeling Node

XVIII XIX XX XXI XXII XXIII XXIII XXIV XXVI


L1- L1- L1- L1-
2 2(257.8) 2(257.8) 2(257.8) 2(257.8)
L1-2(257.8) - - - -
L6- L6- L6- L6-
3 3(297.4) 3(297.4) 3(297.4) 3(297.4)
L6-3(297.4) L2-3(70.77) - - -
L2-
4 L11-4(269.1) L11-4(269.1) L2-4(95.73)
4(95.73)
- -
5 - - - - - - - - -
6 - - - - - - - - -
7 - - - - - - - - -
8 - - - - - - - - -
9 - - - - - - - - -
10 - - - - - - - - -
L5- L18-
11 11(231.1)
L5-11(231.1)
11(152.7)
- - - - - -
12 - - - - - - - - -
13 - - - - - - - - -
14 - - - - - - - - -
15 - - - - - - - - -
16 - - - - - - - - -
17 - - - - - - - - -
L17- L20-
18 18(246) 18(124.2)
- - - - - - -
19 - - - - - - - - -
L21-
20 20(181)
- - - - - - - -
21 - - - - - - - - -
L21- L20- L20- L20-
22 22(229.2) 22(216.5) 22(216.5) 22(216.5)
- - - - -
23 - - - - - - - - -
24 - - - - - - - - -
25 - - - - - - - - -
26 - - - - - - - - -
L26-27 L26-27 L26-27 L26-27 L26-27 L26-27 L26-27 L26-27
27 (266.8) (266.8) (266.8) (266.8) (266.8) (266.8) (266.8) (266.8) -
L25-28 L25-28 L25-28 L25-28 L25-28 L25-28 L25-28 L25-28 L27-28
28 (564.2) (564.2) (564.2) (564.2) (564.2) (564.2) (564.2) (564.2) (190.5)
29
30

Relabeling Node

XXVII XXVIII
29 L28-29(586.3) L30-29(580.9)
30 L28-30(266) -

You might also like