SlideShare a Scribd company logo
Uninformed Search Techniques
Lecture-08
Hema Kashyap
1
Uninformed Search
 Breadth First Search
 Uniform Cost Search
 Depth First Search
 Depth Limited Search
 Iterative deepening Depth First Search
 Bidirectional Search
2
Breadth First Search
3
Concept
Step 1: Traverse the root node
Step 2: Traverse all neighbours of root node.
Step 3: Traverse all neighbours of neighbours of the root node.
Step 4: This process will continue until we are getting the goal node.
4
5
6
7
8
9
10
Step 8: G is selected for expansion. It is found to be a goal node. So the
algorithm returns the path A C G by following the parent pointers of the node
corresponding to G. The algorithm terminates.
11
Properties of BFS
• Complete.
• The algorithm is optimal (i.e., admissible) if all operators have the same
cost. Otherwise, breadth first search finds a solution with the shortest path
length.
• The algorithm has exponential time and space complexity. Suppose the
search tree can be modelled as a b-ary tree as shown in Figure 3. Then the
time and space complexity of the algorithm is O(bd) where d is the depth of
the solution and b is the branching factor (i.e., number of children) at each
node.
12
Advantages
• In this procedure at any way it
will find the goal.
• It does not follow a single
unfruitful path for a long time.
• It finds the minimal solution in
case of multiple paths.
13
Disadvantages
• BFS consumes large memory
space.
• Its time complexity is more.
• It has long pathways, when all
paths to a destination are on
approximately the same search
depth.
Depth First Search
14
Concept
Step 1: Traverse the root node.
Step 2: Traverse any neighbour of the root node.
Step 3: Traverse any neighbour of neighbour of the root node.
Step 4: This process will continue until we are getting the goal node.
15
16
17
18
Step 4: Node D is removed from fringe. C and F are pushed in front of fringe
19
20
Step 6: Node G is expanded and found to be a goal node. The solution path A-
B-D-C-G is returned and the algorithm terminates.
21
Properties of DFS
• The algorithm takes exponential time. If N is the maximum depth of a node
in the search space, in the worst case the algorithm will take time O(bd).
However the space taken is linear in the depth of the search tree, O(bN).
• Note that the time taken by the algorithm is related to the maximum depth
of the search tree. If the search tree has infinite depth, the algorithm may
not terminate. This can happen if the search space is infinite. It can also
happen if the search space contains cycles. The latter case can be handled
by checking for cycles in the algorithm. Thus Depth First Search is not
complete.
22
Advantages:
• DFS consumes very less
memory space.
• It will reach at the goal node in
a less time period than BFS if it
traverses in a right path.
• It may find a solution without
examining much of search
because we may get the desired
solution
• in the very first go.
23
Disadvantages:
• It is possible that may states
keep reoccurring.
• There is no guarantee of
finding the goal node.
• Sometimes the states may also
enter into infinite loops.
Difference between BFS and DFS
BFS
• It uses the data structure
queue.
• BFS is complete because it
finds the solution if one
exists.
• BFS takes more space i.e.
equivalent to o (b0) where b
is the maximum breath exist
in a search
• tree and d is the maximum
depth exit in a search tree.
• In case of several goals, it
finds the best one.
24
DFS
• It uses the data structure
stack.
• It is not complete because it
may take infinite loop to
reach at the goal node.
• The space complexity is O
(d).
• In case of several goals, it
will terminate the solution in
any order.
Uniform Cost Search
• This algorithm is by Dijkstra [1959]. The algorithm expands nodes in the
order of their cost from the source.
• In uniform cost search the newly generated nodes are put in OPEN
according to their path costs. This ensures that when a node is selected for
expansion it is a node with the cheapest cost among the nodes in OPEN.
• Let g(n) = cost of the path from the start node to the current node n. Sort
nodes by increasing value of g.
25
Algorithm- Uniform Cost Search
1. Initialize: set OPEN=s, CLOSED={} and c(s)=0
2. Fail: If OPEN={}, terminate with failure
3. Select: Select a state with the minimum cost ,n, from OPEN and save in
CLOSED
4. Terminate: If n∈G, terminate with success
5. Expand: generate the successor of n
For each successor, m, :
If m∈[OPEN∪CLOSED]
set C(m)= C(n)+C(n,m) and insert m in OPEN
If m∈[OPEN∪CLOSED]
Set C(m)= min{ C(m),C(n)+C(n,m)}
If c(m) has decreased and m ∈ CLOSED, move it to OPEN
** if m is in OPEN already then we just simply update the cost**
6. Loop: Goto step 2
26
Properties of UCS
Some properties of this search algorithm are:
• Complete
• Optimal/Admissible
• Exponential time and space complexity, O(bd)
27

More Related Content

PPTX
uninformed search part 1.pptx
PPTX
A star algorithms
PPT
Ch2 3-informed (heuristic) search
PPTX
Uninformed search /Blind search in AI
PPTX
Uninformed Search technique
PPTX
State space search and Problem Solving techniques
PPTX
Lecture 21 problem reduction search ao star search
PDF
State Space Search in ai
uninformed search part 1.pptx
A star algorithms
Ch2 3-informed (heuristic) search
Uninformed search /Blind search in AI
Uninformed Search technique
State space search and Problem Solving techniques
Lecture 21 problem reduction search ao star search
State Space Search in ai

What's hot (20)

PPTX
Informed and Uninformed search Strategies
PPTX
A Star Search
PPTX
uninformed search part 2.pptx
PPT
Informed search (heuristics)
PPT
AI Lecture 4 (informed search and exploration)
PPT
Iterative deepening search
PPTX
AI_Session 7 Greedy Best first search algorithm.pptx
PPT
Uninformed search
PDF
A* Search Algorithm
PPT
Heuristic Search Techniques {Artificial Intelligence}
PPTX
Unit-III-AI Search Techniques and solution's
PPTX
Introduction to Algorithms and Asymptotic Notation
PPTX
Breadth first search (bfs)
PPTX
A* Algorithm
PPTX
AI_Session 6 Iterative deepening Depth-first and bidirectional search.pptx
PPTX
Uninformed search
PPT
Artificial Intelligence 1 Planning In The Real World
PDF
I. Hill climbing algorithm II. Steepest hill climbing algorithm
PPTX
AI: Logic in AI
PPT
Uniformed tree searching
Informed and Uninformed search Strategies
A Star Search
uninformed search part 2.pptx
Informed search (heuristics)
AI Lecture 4 (informed search and exploration)
Iterative deepening search
AI_Session 7 Greedy Best first search algorithm.pptx
Uninformed search
A* Search Algorithm
Heuristic Search Techniques {Artificial Intelligence}
Unit-III-AI Search Techniques and solution's
Introduction to Algorithms and Asymptotic Notation
Breadth first search (bfs)
A* Algorithm
AI_Session 6 Iterative deepening Depth-first and bidirectional search.pptx
Uninformed search
Artificial Intelligence 1 Planning In The Real World
I. Hill climbing algorithm II. Steepest hill climbing algorithm
AI: Logic in AI
Uniformed tree searching
Ad

Similar to Lecture 08 uninformed search techniques (20)

PPTX
Problem Solving through Search - Uninformed Search
PPTX
Unit 2 Uninformed Search Strategies.pptx
PDF
Presentation on the artificial intelligenc
PPTX
NEW-II.pptx
PPTX
Uninformed Search Strategies techni.pptx
PPT
Unit 2 Topic 2 Uniformed search strategies.ppt
PPTX
NEW-II.pptx
PPTX
AIArtificial intelligence (AI) is a field of computer sciencehsh
PPTX
Search Algorithms in AI.pptx
PPTX
Unit-2 for AIML including type of searches
PPTX
Search in Algorithm in artificial intelligence
PPTX
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
PPTX
unit 2 ai artificial intelligence 1.pptx
PPTX
AI-Week-05-Uninformed Search (UCS, DLS, IDS, BS).pptx
PPTX
Artificial Intelligence uninformed Search techniques.pptx
PPTX
UNIT II ARTIFICIQL INTELLIGENCE SEARCH STRATEGIES OSMANIA UNIVERSITY
PPTX
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPTX
Artificial intelligence(05)
PDF
DBATU Chapter or unit 3- topic (Uninformed_search.pdf)
Problem Solving through Search - Uninformed Search
Unit 2 Uninformed Search Strategies.pptx
Presentation on the artificial intelligenc
NEW-II.pptx
Uninformed Search Strategies techni.pptx
Unit 2 Topic 2 Uniformed search strategies.ppt
NEW-II.pptx
AIArtificial intelligence (AI) is a field of computer sciencehsh
Search Algorithms in AI.pptx
Unit-2 for AIML including type of searches
Search in Algorithm in artificial intelligence
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
unit 2 ai artificial intelligence 1.pptx
AI-Week-05-Uninformed Search (UCS, DLS, IDS, BS).pptx
Artificial Intelligence uninformed Search techniques.pptx
UNIT II ARTIFICIQL INTELLIGENCE SEARCH STRATEGIES OSMANIA UNIVERSITY
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
Artificial intelligence(05)
DBATU Chapter or unit 3- topic (Uninformed_search.pdf)
Ad

More from Hema Kashyap (20)

PPTX
Lecture 30 introduction to logic
PPTX
Lecture 29 genetic algorithm-example
PPTX
Lecture 28 genetic algorithm
PPTX
Lecture 27 simulated annealing
PPTX
Lecture 26 local beam search
PPTX
Lecture 25 hill climbing
PPTX
Lecture 24 iterative improvement algorithm
PPTX
Lecture 23 alpha beta pruning
PPTX
Lecture 22 adversarial search
PPTX
Lecture 20 problem reduction search
PPTX
Lecture 19 sma star algorithm
PPTX
Lecture 18 simplified memory bound a star algorithm
PPTX
Lecture 17 Iterative Deepening a star algorithm
PPTX
Lecture 16 memory bounded search
PPTX
Lecture 15 monkey banana problem
PPTX
Lecture 14 Heuristic Search-A star algorithm
PPTX
Lecture 13 Criptarithmetic problem
PPTX
Lecture 12 Heuristic Searches
PPT
Lecture 11 Informed Search
PPTX
Lecture 10 Uninformed Search Techniques conti..
Lecture 30 introduction to logic
Lecture 29 genetic algorithm-example
Lecture 28 genetic algorithm
Lecture 27 simulated annealing
Lecture 26 local beam search
Lecture 25 hill climbing
Lecture 24 iterative improvement algorithm
Lecture 23 alpha beta pruning
Lecture 22 adversarial search
Lecture 20 problem reduction search
Lecture 19 sma star algorithm
Lecture 18 simplified memory bound a star algorithm
Lecture 17 Iterative Deepening a star algorithm
Lecture 16 memory bounded search
Lecture 15 monkey banana problem
Lecture 14 Heuristic Search-A star algorithm
Lecture 13 Criptarithmetic problem
Lecture 12 Heuristic Searches
Lecture 11 Informed Search
Lecture 10 Uninformed Search Techniques conti..

Recently uploaded (20)

PDF
PPT on Performance Review to get promotions
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
DOCX
573137875-Attendance-Management-System-original
PPTX
additive manufacturing of ss316l using mig welding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Construction Project Organization Group 2.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Geodesy 1.pptx...............................................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Digital Logic Computer Design lecture notes
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT on Performance Review to get promotions
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Foundation to blockchain - A guide to Blockchain Tech
CYBER-CRIMES AND SECURITY A guide to understanding
573137875-Attendance-Management-System-original
additive manufacturing of ss316l using mig welding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Construction Project Organization Group 2.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Geodesy 1.pptx...............................................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Digital Logic Computer Design lecture notes
Lesson 3_Tessellation.pptx finite Mathematics
Internet of Things (IOT) - A guide to understanding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf

Lecture 08 uninformed search techniques

  • 2. Uninformed Search  Breadth First Search  Uniform Cost Search  Depth First Search  Depth Limited Search  Iterative deepening Depth First Search  Bidirectional Search 2
  • 4. Concept Step 1: Traverse the root node Step 2: Traverse all neighbours of root node. Step 3: Traverse all neighbours of neighbours of the root node. Step 4: This process will continue until we are getting the goal node. 4
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. Step 8: G is selected for expansion. It is found to be a goal node. So the algorithm returns the path A C G by following the parent pointers of the node corresponding to G. The algorithm terminates. 11
  • 12. Properties of BFS • Complete. • The algorithm is optimal (i.e., admissible) if all operators have the same cost. Otherwise, breadth first search finds a solution with the shortest path length. • The algorithm has exponential time and space complexity. Suppose the search tree can be modelled as a b-ary tree as shown in Figure 3. Then the time and space complexity of the algorithm is O(bd) where d is the depth of the solution and b is the branching factor (i.e., number of children) at each node. 12
  • 13. Advantages • In this procedure at any way it will find the goal. • It does not follow a single unfruitful path for a long time. • It finds the minimal solution in case of multiple paths. 13 Disadvantages • BFS consumes large memory space. • Its time complexity is more. • It has long pathways, when all paths to a destination are on approximately the same search depth.
  • 15. Concept Step 1: Traverse the root node. Step 2: Traverse any neighbour of the root node. Step 3: Traverse any neighbour of neighbour of the root node. Step 4: This process will continue until we are getting the goal node. 15
  • 16. 16
  • 17. 17
  • 18. 18
  • 19. Step 4: Node D is removed from fringe. C and F are pushed in front of fringe 19
  • 20. 20
  • 21. Step 6: Node G is expanded and found to be a goal node. The solution path A- B-D-C-G is returned and the algorithm terminates. 21
  • 22. Properties of DFS • The algorithm takes exponential time. If N is the maximum depth of a node in the search space, in the worst case the algorithm will take time O(bd). However the space taken is linear in the depth of the search tree, O(bN). • Note that the time taken by the algorithm is related to the maximum depth of the search tree. If the search tree has infinite depth, the algorithm may not terminate. This can happen if the search space is infinite. It can also happen if the search space contains cycles. The latter case can be handled by checking for cycles in the algorithm. Thus Depth First Search is not complete. 22
  • 23. Advantages: • DFS consumes very less memory space. • It will reach at the goal node in a less time period than BFS if it traverses in a right path. • It may find a solution without examining much of search because we may get the desired solution • in the very first go. 23 Disadvantages: • It is possible that may states keep reoccurring. • There is no guarantee of finding the goal node. • Sometimes the states may also enter into infinite loops.
  • 24. Difference between BFS and DFS BFS • It uses the data structure queue. • BFS is complete because it finds the solution if one exists. • BFS takes more space i.e. equivalent to o (b0) where b is the maximum breath exist in a search • tree and d is the maximum depth exit in a search tree. • In case of several goals, it finds the best one. 24 DFS • It uses the data structure stack. • It is not complete because it may take infinite loop to reach at the goal node. • The space complexity is O (d). • In case of several goals, it will terminate the solution in any order.
  • 25. Uniform Cost Search • This algorithm is by Dijkstra [1959]. The algorithm expands nodes in the order of their cost from the source. • In uniform cost search the newly generated nodes are put in OPEN according to their path costs. This ensures that when a node is selected for expansion it is a node with the cheapest cost among the nodes in OPEN. • Let g(n) = cost of the path from the start node to the current node n. Sort nodes by increasing value of g. 25
  • 26. Algorithm- Uniform Cost Search 1. Initialize: set OPEN=s, CLOSED={} and c(s)=0 2. Fail: If OPEN={}, terminate with failure 3. Select: Select a state with the minimum cost ,n, from OPEN and save in CLOSED 4. Terminate: If n∈G, terminate with success 5. Expand: generate the successor of n For each successor, m, : If m∈[OPEN∪CLOSED] set C(m)= C(n)+C(n,m) and insert m in OPEN If m∈[OPEN∪CLOSED] Set C(m)= min{ C(m),C(n)+C(n,m)} If c(m) has decreased and m ∈ CLOSED, move it to OPEN ** if m is in OPEN already then we just simply update the cost** 6. Loop: Goto step 2 26
  • 27. Properties of UCS Some properties of this search algorithm are: • Complete • Optimal/Admissible • Exponential time and space complexity, O(bd) 27