Breath First Search
Group 9
• Taminul Islam (181-15-11116)
• Rayhanur Rashid Nur (181-15-11069)
Breadth First Search
Definition
What is BFS?
Breadth-first search (BFS) is an algorithm for traversing or searching tree or
graph data structures. It starts at the tree root (or some arbitrary node of a
graph, sometimes referred to as a 'search key') and explores all of the neighbor
nodes at the present depth prior to moving on to the nodes at the next depth
level.
BFS Method
Method
1.The Breadth first search begins at a root node and
inspects all the neighboring nodes.
2.Then for each of those neighbor nodes in turn,
it inspects their neighbor nodes which were
unvisited, and so on.
Binary graph searching
Step-1: A breadth-first search (BFS) explores
nodes nearest the root before exploring nodes
further away.
Step- 2:For example, after searching A, then B,
then C, the search proceeds with D, E, F, G
Step-3: Node are explored in the order A B C D
E F G H I J K L M N O P Q.
Step-4:H will be found before K.
Let’s we will see how to work level order
searching
BFS in details
Breath First Search
9
1
4
10
83
7
5
2
6
BFS
Queue
9
1
4
10
83
7
5
2
6
BFS
Queue
1
1
9
1
4
10
83
7
5
2
6
BFS
Queue
1
1
4 2
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2
4
2
3
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2
2
3
3
5 7 8
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8
5
7
8
3
10 9
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8
5
7
8
10 9
10
9
6
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8
7
8
10 9
10
9
6
6
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8
8
10 9
10
9
6
6
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8 10 9
10
9
6
6
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8 10 9
9
6
6
9
1
4
10
83
7
5
2
6
BFS
Queue
1 4 2 3 5 7 8 10 9 6
6
Final Answer
(BFS)
1 4 2 3 5 7 8 10 9 6
Applications
 Breadth first search can be used to solve games where a
series of choices result in either a winning or losing state.
For example: BFS can help a player determine a winning
sequence of moves for solving a Rubik’s cube.
 BFS is also used in the famous Dijkstra’s algorithm for computing
the shortest path in a graph and the Ford-Fulkerson algorithm for
computing the maximum​ flow in a flow network.
Example of a map that BFS can take and return the shortest paths
SHORTED
BFS is also used in Analyzing Network
Breath First Search

More Related Content

PPTX
3rd week internship report
PPTX
Cardiovascular Disease Prediction Using Machine Learning Approaches.pptx
PPTX
Is Simulation Blessing or Curse?
PPTX
Hello cox's bazar
PPTX
Paper Presentation
PPTX
Human vs computer
PDF
Memory Organization of a Computer System
PDF
The Basic Configuration of a Microcomputer
3rd week internship report
Cardiovascular Disease Prediction Using Machine Learning Approaches.pptx
Is Simulation Blessing or Curse?
Hello cox's bazar
Paper Presentation
Human vs computer
Memory Organization of a Computer System
The Basic Configuration of a Microcomputer

More from Taminul Islam (10)

PPTX
Efficient way of searching Google
PPTX
Mechanics
PPTX
Google Home Mini
PPTX
Breadth First Search
PPTX
PPTX
Solution of Traffic Jam
PPTX
Telecommunication Sector in Bangladesh
PPTX
Bangladesh in the world of cricket
PPTX
Artificial Intelligence
PPTX
Present Tense Presentation
Efficient way of searching Google
Mechanics
Google Home Mini
Breadth First Search
Solution of Traffic Jam
Telecommunication Sector in Bangladesh
Bangladesh in the world of cricket
Artificial Intelligence
Present Tense Presentation
Ad

Recently uploaded (20)

PDF
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
PPTX
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
PDF
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
PDF
Research on ultrasonic sensor for TTU.pdf
PPTX
AI-Reporting for Emerging Technologies(BS Computer Engineering)
PPT
UNIT-I Machine Learning Essentials for 2nd years
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PDF
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
PPTX
Solar energy pdf of gitam songa hemant k
PPTX
CNS - Unit 1 (Introduction To Computer Networks) - PPT (2).pptx
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PDF
Project_Mgmt_Institute_-Marc Marc Marc .pdf
PPTX
chapter 1.pptx dotnet technology introduction
PDF
CELDAS DE COMBUSTIBLE TIPO MEMBRANA DE INTERCAMBIO PROTÓNICO.pdf
PDF
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
PPTX
CS6006 - CLOUD COMPUTING - Module - 1.pptx
PPT
Programmable Logic Controller PLC and Industrial Automation
PPTX
Wireless sensor networks (WSN) SRM unit 2
PDF
Software defined netwoks is useful to learn NFV and virtual Lans
PPTX
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
Research on ultrasonic sensor for TTU.pdf
AI-Reporting for Emerging Technologies(BS Computer Engineering)
UNIT-I Machine Learning Essentials for 2nd years
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
Solar energy pdf of gitam songa hemant k
CNS - Unit 1 (Introduction To Computer Networks) - PPT (2).pptx
MLpara ingenieira CIVIL, meca Y AMBIENTAL
Project_Mgmt_Institute_-Marc Marc Marc .pdf
chapter 1.pptx dotnet technology introduction
CELDAS DE COMBUSTIBLE TIPO MEMBRANA DE INTERCAMBIO PROTÓNICO.pdf
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
CS6006 - CLOUD COMPUTING - Module - 1.pptx
Programmable Logic Controller PLC and Industrial Automation
Wireless sensor networks (WSN) SRM unit 2
Software defined netwoks is useful to learn NFV and virtual Lans
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
Ad

Breath First Search