Source code online books for professionals by professionals



Download 4,67 Mb.
Pdf ko'rish
bet230/266
Sana31.12.2021
Hajmi4,67 Mb.
#213682
1   ...   226   227   228   229   230   231   232   233   ...   266
Bog'liq
2 5296731884800181221

Set and vertex covers. A vertex cover is a set of vertices that cover (that is, are adjacent to) all the edges of the graph. 
A set cover is a generalization of this idea, where the nodes are replaced with subsets, and you want to cover the entire 
set. The problem lies in constraining or minimizing the number of nodes/subsets. Both problems are NP-hard  
(see Chapter 11).
Shortest paths. This problem involves finding the shortest path from one node to another, from one node to all the 
others (or vice versa), or from all nodes to all others. The one-to-one, one-to-all, and all-to-one cases are solved 
the same way, normally using BFS for unweighted graphs, DAG shortest path for DAGs, Dijkstra’s algorithm for 
nonnegative edge weights, and Bellman–Ford in the general case. To speed up things in practice (although without 
affecting the worst-case running time), you can also use bidirectional Dijkstra, or the A* algorithm. For the all pairs 
shortest paths problem, the algorithms of choice are probably Floyd–Warshall or (for sparse graphs) Johnson’s 
algorithm. If the edges are nonnegative, Johnson’s algorithm is (asymptotically) equivalent to running Dijkstra’s 
algorithm from every node (which may be more effective). (For more information on shortest path algorithms, see 
Chapters 5 and 9.) Note that the longest path problem (for general graphs) can be used to find Hamilton paths, which 
means that it is NP-hard. This, in fact, means that the shortest path problem is also NP-hard in the general case. If we 
disallow negative cycles in the graph, however, our polynomial algorithms will work.

Download 4,67 Mb.

Do'stlaringiz bilan baham:
1   ...   226   227   228   229   230   231   232   233   ...   266




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
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