Unit 2 Topic 2 Uniformed Search Strategies
Unit 2 Topic 2 Uniformed Search Strategies
1
Ms. Richa Singh
CSE(AI)
CONTENTS
Basic
Brute-Force Search Strategies
Breadth-First Search
Depth-First Search
Bidirectional Search
Complexities
2
BASIC
The search algorithms in this section have
no additional information on the goal
node other than the one provided in the
problem definition.
The plans to reach the goal state from the
search.
3
CONTI…
Each of these algorithms will have:
A problem graph, containing the start node S and
node.
A solution plan, which the sequence of nodes
4
from S to G.
BRUTE-FORCE SEARCH STRATEGIES
They are most simple, as they do not need any
domain-specific knowledge. They work fine with
small number of possible states.
Requirements −
State description
Initial state
5
BREADTH-FIRST SEARCH
Starts from the root node, explores the
neighboring nodes first and moves towards the
next level neighbors.
Generates one tree at a time until the solution is
found.
Can be implemented using FIFO queue data
structure.
Provides shortest path to the solution.
If branching factor
8
CONTI…
Traversing of the tree using BFS algorithm from
the root node S to goal node K.
BFS search algorithm traverse in layers, so it will
9
CONTI…
Advantages
BFS will provide a solution if any solution exists.
Disadvantages
Since each level of nodes is saved for creating
12
CONTI…
Depth-first search is a recursive algorithm for
traversing a tree or graph data structure.
BFS algorithm.
CONTI…
Its
complexity depends on the number of
paths. It cannot check duplicate nodes.
14
CONTI…
Advantage
DFS requires very less memory as it only needs to
Disadvantage
There is the possibility that many states keep re-
16
BIDIRECTIONAL SEARCH
It searches forward from initial state and backward
from goal state till both meet to identify a
common state.
18
CONTI…
Advantages
Bidirectional search is fast.
Disadvantages
Implementation of the bidirectional search tree is
difficult.
20
UNIFORM COST SEARCH
Sorting is done in increasing cost of the path to a
node. It always expands the least cost node.
23
CONTI…
Advantages
Uniform cost search is optimal because at every
Disadvantages
It does not care about the number of steps
Time bd bm bd/2 bd
Space bd bm bd/2 bd
26