Algorithms For Dummies


Leveraging Prim’s algorithm



Download 7,18 Mb.
Pdf ko'rish
bet328/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   324   325   326   327   328   329   330   331   ...   651
Bog'liq
Algorithms

Leveraging Prim’s algorithm

Prim’s algorithm generates the minimum spanning tree for a graph by traversing 

the graph vertex by vertex. Starting from any chosen vertex, the algorithm adds 

edges using a constraint in which, if one vertex is currently part of the spanning 

tree and the second vertex isn’t part of it, the edge weight between the two must be 

the least possible among those available. By proceeding in this fashion, creating 

cycles in the spanning tree is impossible (it could happen only if you add an edge 

whose vertexes are already both in the spanning tree) and you’re guaranteed to 

obtain a minimal tree because you add the edges with the least weight. In terms of 

steps, the algorithm includes these three phases, with the last one being iterative:

1. 

Track both the edges of the minimum spanning tree and the used vertexes as 



they become part of the solution.


188

 

   


  PART 3 


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   324   325   326   327   328   329   330   331   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish