SlideShare a Scribd company logo
Topic:- Breadth First Search ( BFS )
Presented By:-
Name:- Sadanand Kumar
Reg:- 220101120034
Branch – B.tech (CSE) 6th
Sem
Guided By :-
Asst. Prof.Manswini Padhy
Mathematical Problem Solving
Contents
 Introduction
 What is BFS?
 Applications of BFS Algorithm
 Time Complexity of BFS Algorithm
 Space Complexity of BFS Algorithm
 Example Of BFS
 Conclusion
Introduction
The BFS algorithm, or Breadth-First Search algorithm, is a fundamental graph
traversal technique widely used in computer science. It is used to find the
shortest path in unweighted graphs, making it ideal for various real-world
applications like network broadcasting and web crawling.
What is BFS?
Breadth-first search (BFS) is an algorithm for searching a tree data structure for a
node that satisfies a given property. It starts at the tree root and explores all nodes
at the present depth prior to moving on to the nodes at the next depth level.
Applications of BFS Algorithm
1. Shortest Path in Unweighted Graphs: BFS is used to find the shortest path between two nodes in an unweighted
graph.
2. Web Crawlers: BFS is used by web crawlers to explore web pages level by level.
3. Social Networking Sites: BFS helps in finding the shortest path between users, such as degrees of separation.
4. Broadcasting in Networks: BFS is used to send information (like a broadcast message) to all nodes in a network.
5. Finding Connected Components: BFS helps in identifying all connected components in an undirected graph.
6. Cycle Detection: BFS can be used to detect cycles in an undirected graph.
7. Peer-to-Peer Networks: BFS is used to find all nodes within a certain number of hops in P2P networks.
8. Solving Puzzles: BFS can be used to find the shortest solution in puzzles like the Rubik's Cube or the shortest
path in a maze.
Time Complexity of BFS Algorithm
The time complexity of BFS is O(V + E).
Space Complexity of BFS Algorithm
The space complexity of BFS algorithm is O(V).
A
B
G
F
E
D
C
 Example Of BFS
Conclusion
Breadth-First Search (BFS) is a versatile and powerful algorithm that excels in
scenarios requiring exhaustive exploration and shortest-path solutions in
unweighted graphs. Its level-by-level traversal makes it ideal for applications
like social network analysis, shortest-path navigation, web crawling, and game
state exploration. While it offers guaranteed optimality in terms of steps and
simplicity in implementation, BFS’s efficiency depends on the graph’s structure,
with its O(V + E) time complexity and significant memory demands due to
queue storage. As a fundamental tool in computer science and AI, BFS continues
to underpin solutions to both theoretical and practical problems, balancing
thoroughness with systematic precision.
THANK YOU

More Related Content

PPTX
Breath first search Traversal algorithm DSA .pptx
PDF
Breadth First Search .
PPTX
Breadth first search (Bfs)
PPTX
Presentation on Breadth First Search (BFS)
PPTX
Breadth-First Search and Depth-First Search.pptx
DOC
BFS, Breadth first search | Search Traversal Algorithm
PDF
Breadth first search signed
PPTX
Breadth first search (bfs)
Breath first search Traversal algorithm DSA .pptx
Breadth First Search .
Breadth first search (Bfs)
Presentation on Breadth First Search (BFS)
Breadth-First Search and Depth-First Search.pptx
BFS, Breadth first search | Search Traversal Algorithm
Breadth first search signed
Breadth first search (bfs)

Similar to Understanding Breadth First Search (BFS) Algorithm (20)

PPTX
Search Algorithms in AI.pptx
PPTX
BFS.pptx
PPTX
Breath First Search
PPTX
Breadth First Search
PPTX
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
PPT
(148064384) bfs
PPTX
bfs and dfs (data structures).pptx
PPTX
Breadth-first search in alogorithm
PPTX
bfs tree searching ,sortingUntitled presentation.pptx
PPTX
Breadth First Search with example and solutions
PPTX
BFS_DFS_Enhanced_Presentation124567.pptx
PDF
Breadth First Search and Depth First Search Algorithm
PPTX
BFS_Presentation_Sourabh.pptx. Explain the bfs
PPTX
BFS and DFS
PPTX
Arun Gayen_CSE_34700122011_Artificial_Intelligence[1] [Autosaved].pptx
PPTX
DFS & BFS in Computer Algorithm
PPTX
Technical_Seminar .pptx
PPTX
Introduction to ai and algorithms required to that
PPTX
BFS & DFS in Data Structure
PPTX
kumattt).pptx
Search Algorithms in AI.pptx
BFS.pptx
Breath First Search
Breadth First Search
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
(148064384) bfs
bfs and dfs (data structures).pptx
Breadth-first search in alogorithm
bfs tree searching ,sortingUntitled presentation.pptx
Breadth First Search with example and solutions
BFS_DFS_Enhanced_Presentation124567.pptx
Breadth First Search and Depth First Search Algorithm
BFS_Presentation_Sourabh.pptx. Explain the bfs
BFS and DFS
Arun Gayen_CSE_34700122011_Artificial_Intelligence[1] [Autosaved].pptx
DFS & BFS in Computer Algorithm
Technical_Seminar .pptx
Introduction to ai and algorithms required to that
BFS & DFS in Data Structure
kumattt).pptx
Ad

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Presentation on HIE in infants and its manifestations
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
01-Introduction-to-Information-Management.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Cell Structure & Organelles in detailed.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Presentation on HIE in infants and its manifestations
human mycosis Human fungal infections are called human mycosis..pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
STATICS OF THE RIGID BODIES Hibbelers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
Microbial disease of the cardiovascular and lymphatic systems
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
RMMM.pdf make it easy to upload and study
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
O7-L3 Supply Chain Operations - ICLT Program
01-Introduction-to-Information-Management.pdf
VCE English Exam - Section C Student Revision Booklet
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Ad

Understanding Breadth First Search (BFS) Algorithm

  • 1. Topic:- Breadth First Search ( BFS ) Presented By:- Name:- Sadanand Kumar Reg:- 220101120034 Branch – B.tech (CSE) 6th Sem Guided By :- Asst. Prof.Manswini Padhy Mathematical Problem Solving
  • 2. Contents  Introduction  What is BFS?  Applications of BFS Algorithm  Time Complexity of BFS Algorithm  Space Complexity of BFS Algorithm  Example Of BFS  Conclusion
  • 3. Introduction The BFS algorithm, or Breadth-First Search algorithm, is a fundamental graph traversal technique widely used in computer science. It is used to find the shortest path in unweighted graphs, making it ideal for various real-world applications like network broadcasting and web crawling.
  • 4. What is BFS? Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next depth level.
  • 5. Applications of BFS Algorithm 1. Shortest Path in Unweighted Graphs: BFS is used to find the shortest path between two nodes in an unweighted graph. 2. Web Crawlers: BFS is used by web crawlers to explore web pages level by level. 3. Social Networking Sites: BFS helps in finding the shortest path between users, such as degrees of separation. 4. Broadcasting in Networks: BFS is used to send information (like a broadcast message) to all nodes in a network. 5. Finding Connected Components: BFS helps in identifying all connected components in an undirected graph. 6. Cycle Detection: BFS can be used to detect cycles in an undirected graph. 7. Peer-to-Peer Networks: BFS is used to find all nodes within a certain number of hops in P2P networks. 8. Solving Puzzles: BFS can be used to find the shortest solution in puzzles like the Rubik's Cube or the shortest path in a maze.
  • 6. Time Complexity of BFS Algorithm The time complexity of BFS is O(V + E). Space Complexity of BFS Algorithm The space complexity of BFS algorithm is O(V).
  • 8. Conclusion Breadth-First Search (BFS) is a versatile and powerful algorithm that excels in scenarios requiring exhaustive exploration and shortest-path solutions in unweighted graphs. Its level-by-level traversal makes it ideal for applications like social network analysis, shortest-path navigation, web crawling, and game state exploration. While it offers guaranteed optimality in terms of steps and simplicity in implementation, BFS’s efficiency depends on the graph’s structure, with its O(V + E) time complexity and significant memory demands due to queue storage. As a fundamental tool in computer science and AI, BFS continues to underpin solutions to both theoretical and practical problems, balancing thoroughness with systematic precision.