Professional Documents
Culture Documents
Uninformed Search Strategies Breath-First & Uniform Cost Summary Research
Uninformed Search Strategies Breath-First & Uniform Cost Summary Research
Breadth-First Search
Background of the algorithm
Definition
BFS is an uninformed search algorithm that systematically traverses a graph
by expanding the shallowest unexpanded node first using a FIFO queue.
Main Proponent and History
Developed in the late 1950s and early 1960s by computer scientists working in
the field of artificial intelligence like Allen Newell, Herbert Simon, and Edgar F.
Codd.
Pseudocode
Step 1: Initialize empty frontier queue Q.
Step 2: Add the start node to Q.
Loop until Q empty:
Step 3: Remove the first node N from Q.
Step 4: Check if N is goal, return path if yes.
Step 5: Expand N, add resulting nodes to Q.
Limitations
Exponential space complexity, slow compared to informed searches, can get
stuck in large cyclic graphs.
Pseudocode
Step 1: Initialize PQ frontier ordered by path cost.
Step 2: Add start node to PQ with cost 0.
Loop until Q empty:
Step 3: Pop cheapest node N from PQ.
Step 4: Check if N is goal, return path if yes.
Step 5: Expand N, add resulting nodes to PQ.
Limitations
Shares space complexity issue with BFS, slower than algorithms using
admissible heuristics.