SlideShare a Scribd company logo
1 of 14
ARTIFICIAL INTELLIGENCE
PANKAJ DEBBARMA
Deptt. of CSE, TIT, Narsingarh
Search Algorithms
CONTENTS
Search
Algorithms
• Search Algorithms
• Uninformed Search
• Informed Search
• Breadth First Search
• Depth First Search
• Depth Limited Search
• Iterative Deepening DFS
• Cost First Search
Search Algorithms
• Do faster computers help? If searching takes too
long, the obvious solution would appear to be to
get a faster computer (or many parallel
computers).
• Irrelevant Operators: Irrelevant operators
increase the branching factor b, and this rapidly
increases the size of the search space, bd.
• Search Order: The excessive time spent in
searching is almost entirely spent on failures.
Search Algorithms
Uninformed Search
• Search without
information
• No knowledge
• Time consuming
• More complexity (time,
space)
• DFS, BFS, etc.
Informed Search
• Search with information
• Use knowledge to find
steps
• Quick solution
• Less complexity (time,
space)
• A*, Best First Search, etc.
Search Algorithms
1
4
3
2 1 2 3 4
1
2
3
4
Travelling Salesman Problem
Constraint
Satisfaction
Means-end
Analysis
AO* Search
A* Search
Informed Search
Search algorithms
Uninformed Search
Generate and Test Hill Climbing
Breadth First
Search
Cost First
Search
Depth Limited
Search
Depth First
Search
Iterative
Deepening DFS
Problem
Reduction
Best First
Search
Breadth-first search (BFS)
• Uninformed
• FIFO (Queue data
structure)
• Shallowest node
• Complete
• Optimal
• Time Complexity
– O(V+E)
– O(bd)
A
F
D
C
E
B
G
N
J
H I
M
K L
0
2
1
4
3
Breadth-first search
Advantage:
1. Guaranteed to find an optimal solution (in terms
of shortest number of steps to reach the goal).
2. Can always find a goal node if one exists
(complete).
Disadvantage:
1. High storage requirement: exponential with tree
depth.
Depth-first search (DFS)
• Uninformed
• LIFO (Stack data
structure)
• Deepest node
• Incomplete
• Non-optimal
• Time Complexity
– O(V+E)
– O(bd)
A
F
D
C
E
B
G
N
J
H I
M
K L
0
2
1
4
3
Depth-first search
Advantage:
1. Low storage requirement: linear with tree depth.
2. Easily programmed: function call stack does most
of the work of maintaining state of the search.
Disadvantage:
1. May find a sub-optimal solution (one that is
deeper or more costly than the best solution).
2. Incomplete: without a depth bound, may not find
a solution even if one exists.
Bounded depth-first search
Problems:
1. It’s hard to guess how deep the solution lies.
2. If the estimated depth is too deep (even by 1) the
computer time used is dramatically increased, by
a factor of bextra.
3. If the estimated depth is too shallow, the search
fails to find a solution; all that computer time is
wasted.
Iterative Deepening DFS
A
F
D
C
E
B
G
N
J
H I
M
K L
d = 0
d = 1
d = 3
d = 2
d = 4
Cost first search
Note visited:
A, C, B, D, G, E, L,
I, K, H, F, J, M, N
A
F
D
C
E
B
G
N
J
H I
M
K L
4
6
3
4
3
4
3
2
7
2
3
6
1
Child B C D G H E F I L J K M N
Cost 4 3 7 7 10 7 10 9 8 11 9 12 12
AI-05 Search Algorithms.pptx

More Related Content

What's hot

Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
Praveen Kumar
 
Chapter3 Search
Chapter3 SearchChapter3 Search
Chapter3 Search
Khiem Ho
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI
Bharat Bhushan
 

What's hot (20)

uninformed search part 1.pptx
uninformed search part 1.pptxuninformed search part 1.pptx
uninformed search part 1.pptx
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
Informed search
Informed searchInformed search
Informed search
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
AI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptxAI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptx
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
 
Chapter3 Search
Chapter3 SearchChapter3 Search
Chapter3 Search
 
AI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptx
 
CP03-Data Structures.pptx
CP03-Data Structures.pptxCP03-Data Structures.pptx
CP03-Data Structures.pptx
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
State space search
State space searchState space search
State space search
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 
Adversarial Search
Adversarial SearchAdversarial Search
Adversarial Search
 

Similar to AI-05 Search Algorithms.pptx

Intelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDBIntelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDB
Mihnea Giurgea
 
Search enabled applications with lucene.net
Search enabled applications with lucene.netSearch enabled applications with lucene.net
Search enabled applications with lucene.net
Willem Meints
 
Session 4 Agent types in Internet of things
Session 4 Agent types in Internet of thingsSession 4 Agent types in Internet of things
Session 4 Agent types in Internet of things
SKCTCSE
 

Similar to AI-05 Search Algorithms.pptx (20)

NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
AI(Module1).pptx
AI(Module1).pptxAI(Module1).pptx
AI(Module1).pptx
 
Search strategies BFS, DFS
Search strategies BFS, DFSSearch strategies BFS, DFS
Search strategies BFS, DFS
 
NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
2.uninformed search
2.uninformed search2.uninformed search
2.uninformed search
 
Artificial intelligence(05)
Artificial intelligence(05)Artificial intelligence(05)
Artificial intelligence(05)
 
uninformed search part 2.pptx
uninformed search part 2.pptxuninformed search part 2.pptx
uninformed search part 2.pptx
 
tensorflow.pptx
tensorflow.pptxtensorflow.pptx
tensorflow.pptx
 
Data science and Hadoop
Data science and HadoopData science and Hadoop
Data science and Hadoop
 
Intelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDBIntelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDB
 
Unit-III-AI Search Techniques and solution's
Unit-III-AI Search Techniques and solution'sUnit-III-AI Search Techniques and solution's
Unit-III-AI Search Techniques and solution's
 
DNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and ResponseDNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and Response
 
Search enabled applications with lucene.net
Search enabled applications with lucene.netSearch enabled applications with lucene.net
Search enabled applications with lucene.net
 
Session 6 Search Introduction in Internet of things
Session 6 Search Introduction in Internet of thingsSession 6 Search Introduction in Internet of things
Session 6 Search Introduction in Internet of things
 
Session 4 Agent types in Internet of things
Session 4 Agent types in Internet of thingsSession 4 Agent types in Internet of things
Session 4 Agent types in Internet of things
 
Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...
 
Search strategies
Search strategiesSearch strategies
Search strategies
 
Why you need more documentation
Why you need more documentationWhy you need more documentation
Why you need more documentation
 
prace_days_ml_2019.pptx
prace_days_ml_2019.pptxprace_days_ml_2019.pptx
prace_days_ml_2019.pptx
 
prace_days_ml_2019.pptx
prace_days_ml_2019.pptxprace_days_ml_2019.pptx
prace_days_ml_2019.pptx
 

More from Pankaj Debbarma

More from Pankaj Debbarma (11)

AI-09 Logic in AI
AI-09 Logic in AIAI-09 Logic in AI
AI-09 Logic in AI
 
OS-02 Segmentation.pptx
OS-02 Segmentation.pptxOS-02 Segmentation.pptx
OS-02 Segmentation.pptx
 
OS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptxOS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptx
 
CP02-Structure and Union.pptx
CP02-Structure and Union.pptxCP02-Structure and Union.pptx
CP02-Structure and Union.pptx
 
CP01.pptx
CP01.pptxCP01.pptx
CP01.pptx
 
Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06
 
HTTP and Email
HTTP and EmailHTTP and Email
HTTP and Email
 
Ppt World Wide Web
Ppt World Wide WebPpt World Wide Web
Ppt World Wide Web
 
Ppt congestion control
Ppt congestion controlPpt congestion control
Ppt congestion control
 
NETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingNETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical Addressing
 
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTPTRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
 

Recently uploaded

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 

Recently uploaded (20)

Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 

AI-05 Search Algorithms.pptx

  • 1. ARTIFICIAL INTELLIGENCE PANKAJ DEBBARMA Deptt. of CSE, TIT, Narsingarh Search Algorithms
  • 2. CONTENTS Search Algorithms • Search Algorithms • Uninformed Search • Informed Search • Breadth First Search • Depth First Search • Depth Limited Search • Iterative Deepening DFS • Cost First Search
  • 3. Search Algorithms • Do faster computers help? If searching takes too long, the obvious solution would appear to be to get a faster computer (or many parallel computers). • Irrelevant Operators: Irrelevant operators increase the branching factor b, and this rapidly increases the size of the search space, bd. • Search Order: The excessive time spent in searching is almost entirely spent on failures.
  • 4. Search Algorithms Uninformed Search • Search without information • No knowledge • Time consuming • More complexity (time, space) • DFS, BFS, etc. Informed Search • Search with information • Use knowledge to find steps • Quick solution • Less complexity (time, space) • A*, Best First Search, etc.
  • 5. Search Algorithms 1 4 3 2 1 2 3 4 1 2 3 4 Travelling Salesman Problem
  • 6. Constraint Satisfaction Means-end Analysis AO* Search A* Search Informed Search Search algorithms Uninformed Search Generate and Test Hill Climbing Breadth First Search Cost First Search Depth Limited Search Depth First Search Iterative Deepening DFS Problem Reduction Best First Search
  • 7. Breadth-first search (BFS) • Uninformed • FIFO (Queue data structure) • Shallowest node • Complete • Optimal • Time Complexity – O(V+E) – O(bd) A F D C E B G N J H I M K L 0 2 1 4 3
  • 8. Breadth-first search Advantage: 1. Guaranteed to find an optimal solution (in terms of shortest number of steps to reach the goal). 2. Can always find a goal node if one exists (complete). Disadvantage: 1. High storage requirement: exponential with tree depth.
  • 9. Depth-first search (DFS) • Uninformed • LIFO (Stack data structure) • Deepest node • Incomplete • Non-optimal • Time Complexity – O(V+E) – O(bd) A F D C E B G N J H I M K L 0 2 1 4 3
  • 10. Depth-first search Advantage: 1. Low storage requirement: linear with tree depth. 2. Easily programmed: function call stack does most of the work of maintaining state of the search. Disadvantage: 1. May find a sub-optimal solution (one that is deeper or more costly than the best solution). 2. Incomplete: without a depth bound, may not find a solution even if one exists.
  • 11. Bounded depth-first search Problems: 1. It’s hard to guess how deep the solution lies. 2. If the estimated depth is too deep (even by 1) the computer time used is dramatically increased, by a factor of bextra. 3. If the estimated depth is too shallow, the search fails to find a solution; all that computer time is wasted.
  • 12. Iterative Deepening DFS A F D C E B G N J H I M K L d = 0 d = 1 d = 3 d = 2 d = 4
  • 13. Cost first search Note visited: A, C, B, D, G, E, L, I, K, H, F, J, M, N A F D C E B G N J H I M K L 4 6 3 4 3 4 3 2 7 2 3 6 1 Child B C D G H E F I L J K M N Cost 4 3 7 7 10 7 10 9 8 11 9 12 12