Graph algorithms | Search algorithms

Breadth-first search

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. Extra memory, usually a queue, is needed to keep track of the child nodes that were encountered but not yet explored. For example, in a chess endgame a chess engine may build the game tree from the current position by applying all possible moves, and use breadth-first search to find a win position for white. Implicit trees (such as game trees or other problem-solving trees) may be of infinite size; breadth-first search is guaranteed to find a solution node if one exists. In contrast, (plain) depth-first search, which explores the node branch as far as possible before backtracking and expanding other nodes, may get lost in an infinite branch and never make it to the solution node. Iterative deepening depth-first search avoids the latter drawback at the price of exploring the tree's top parts over and over again. On the other hand, both depth-first algorithms get along without extra memory. Breadth-first search can be generalized to graphs, when the start node (sometimes referred to as a 'search key') is explicitly given, and precautions are taken against following a vertex twice. BFS and its application in finding connected components of graphs were invented in 1945 by Konrad Zuse, in his (rejected) Ph.D. thesis on the PlankalkĂĽl programming language, but this was not published until 1972. It was reinvented in 1959 by Edward F. Moore, who used it to find the shortest path out of a maze, and later developed by C. Y. Lee into a wire routing algorithm (published 1961). (Wikipedia).

Breadth-first search
Video thumbnail

Searching a Tree - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Breadth First without Recursion - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Depth vs Breadth First Search - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Recursion Replacement - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Graph Data Structure 3. Traversing a Graph (algorithms)

This is the third in a series of videos about the graph data structure, including how to search a graph by systematically by visiting each and every vertex, namely, how to traverse a graph. Depth first traversal is compared with breadth first traversal, including explanations of how depth

From playlist Data Structures

Video thumbnail

Breadth-first search, visualized | Graph Algorithm 1

Play with the visualization yourself, with random edges each time you refresh the page: https://jazonjiao.github.io/bfs/ Source code: https://github.com/JazonJiao/Manim.js/tree/master/Graph%20Algorithms BGM: Cjbeards - Dreams

From playlist Graph Algorithms

Video thumbnail

Lecture 12 - Topological Sort & Connectivity

This is Lecture 12 of the CSE373 (Analysis of Algorithms) course taught by Professor Steven Skiena [http://www.cs.sunysb.edu/~skiena/] at Stony Brook University in 2007. The lecture slides are available at: http://www.cs.sunysb.edu/~algorith/video-lectures/2007/lecture12.pdf More informa

From playlist CSE373 - Analysis of Algorithms - 2007 SBU

Video thumbnail

Lecture 12 - Depth-First Search

This is Lecture 12 of the CSE373 (Analysis of Algorithms) course taught by Professor Steven Skiena [http://www3.cs.stonybrook.edu/~skiena/] at Stony Brook University in 2016. The lecture slides are available at: https://www.cs.stonybrook.edu/~skiena/373/newlectures/lecture12.pdf More inf

From playlist CSE373 - Analysis of Algorithms 2016 SBU

Video thumbnail

BFS Algorithm | Breadth First Search Algorithm Tutorial | Data Structures And Algorithm |Simplilearn

🔥Post Graduate Program In Full Stack Web Development: https://www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?utm_campaign=BFSAlgorithm-_I401xw0irg&utm_medium=DescriptionFF&utm_source=youtube 🔥Caltech Coding Bootcamp (US Only): https://www.simplilearn.com/c

From playlist Data Structures & Algorithms

Video thumbnail

Breadth First Search Algorithm In 10 Minutes | BFS in Artificial Intelligence | Edureka

** Machine Learning Engineer Masters Program: https://www.edureka.co/masters-program/machine-learning-engineer-training ** In this Edureka Session on Breadth-First Search Algorithm, we will discuss the logic behind graph traversal methods and use examples to understand the working of the B

From playlist Artificial Intelligence Tutorial For Beginners | Edureka

Video thumbnail

Breadth First Search Algorithm | Shortest Path | Graph Theory

Breadth First Search (BFS) algorithm explanation video with shortest path code Algorithms repository: https://github.com/williamfiset/algorithms#graph-theory Video Slides: https://github.com/williamfiset/Algorithms/tree/master/slides/graphtheory ===================================== Pr

From playlist Graph Theory Playlist

Video thumbnail

Lecture 11 - Breadth & Depth-First Search

This is Lecture 11 of the CSE373 (Analysis of Algorithms) taught by Professor Steven Skiena [http://www.cs.sunysb.edu/~skiena/] at Stony Brook University in 1997. The lecture slides are available at: http://www.cs.sunysb.edu/~algorith/video-lectures/1997/lecture15.pdf

From playlist CSE373 - Analysis of Algorithms - 1997 SBU

Video thumbnail

Graph Traversal In Data Structures | Breadth First Search &Depth First Search Tutorial | Simplilearn

This data structure tutorial will help beginners to understand the BFS and DFS In Data Structure. In this graph traversal tutorial, you will understand the what is Breadth-First Search and Depth First Search algorithm and their representation. In Breadth-First Search and Depth First Search

From playlist Data Structures & Algorithms

Video thumbnail

Breadth-first search in 4 minutes

Breadth-first search in 4 minutes. Code: https://github.com/msambol/youtube/blob/master/search/breadth_first_search.py Sources: 1. https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844 2. https://en.wikipedia.org/wiki/Breadth-first_search LinkedIn: https://www.lin

From playlist Search Algos // Michael Sambol

Video thumbnail

Breadth First Search grid shortest path | Graph Theory

Finding the shortest path on a grid using the Breadth First Search (BFS) algorithm on an unweighted graph. Algorithms repository: https://github.com/williamfiset/algorithms#graph-theory Video slides: https://github.com/williamfiset/Algorithms/tree/master/slides Dungeon master problem li

From playlist Graph Theory Playlist

Related pages

Branching factor | Ford–Fulkerson algorithm | Implicit graph | Queue (abstract data type) | Depth-first search | Edward F. Moore | Game tree | Level structure | Graph (abstract data type) | Maximum flow problem | Konrad Zuse | Parallel breadth-first search | Adjacency matrix | Garbage collection (computer science) | Bipartite graph | Cuthill–McKee algorithm | Artificial intelligence | Search algorithm | Stack (abstract data type) | Lexicographic breadth-first search | Space complexity | Flow network | Time complexity | Tree (data structure) | Adjacency list | Iterative deepening depth-first search | Algorithm | Cheney's algorithm