Breadth First Search and Depth First Search Algorithms
Breadth First Search and Depth First Search Algorithms
Padaboc
BSCS 3A
Intelligent Systems
https://www.edureka.co/blog/breadth-first-search-algorithm/
One Example of Breadth First Search Algorithm:
GPS Navigation Systems. Breadth First Search is used to find all neighboring locations.
Navigation systems as the Google Maps, which can give directions to reach from one
place to another uses BFS. They take your location to be the source node and your
destination as the destination node on the graph. (A city can be represented as a graph
by taking landmarks as nodes and the roads as the edges that connect the nodes in the
graph.) BFS is applied and the shortest route is generated which is used to give directions
or real time navigation.
Sarah Mae E. Padaboc
BSCS 3A
Intelligent Systems
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data
structures. The algorithm starts at the root node (selecting some arbitrary node as the
root node in the case of a graph) and explores as far as possible along each branch
before backtracking.