Algorithms For Dummies


Determining which application to use



Download 7,18 Mb.
Pdf ko'rish
bet314/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   310   311   312   313   314   315   316   317   ...   651
Bog'liq
Algorithms

Determining which application to use

The choice between BFS and DFS depends on how you plan to apply the output 

from the search. Developers often employ BFS to locate the shortest route between 

two points as quickly as possible. This means that you commonly find BFS used in 

applications such as GPS, where finding the shortest route is paramount. For the 

purposes of this book, you also see BFS used for spanning tree, shortest path, and 

many other minimization algorithms.



180

 

   


  PART 3 

 Exploring the World of Graphs

A DFS focuses on finding an entire path before exploring any other path. You use 

it when you need to search in detail, rather than generally. For this reason, you 

often see DFS used in games, where finding a complete path is important. It’s also 

an optimal approach to perform tasks such as finding a solution to a maze.

Sometimes you have to decide between BFS and DFS based on the limitations of 

each technique. BFS needs lots of memory because it systematically stores all the 

paths before finding a solution. On the other hand, DFS needs less memory, but 

you have no guarantee that it’ll find the shortest and most direct solution.


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   310   311   312   313   314   315   316   317   ...   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