SlideShare a Scribd company logo
2
Most read
3
Most read
Problem Solving
(Uninformed Search)
Lecture-09
Hema Kashyap
18 August 2015 1
Water Jug Problem
Definition:
• Some jugs are given which should have non-calibrated properties. At least any one
of the jugs should have filled with water. Then the process through which we can
divide the whole water into different jugs according to the question can be called as
water jug problem.
Procedure:
• Suppose that you are given 3 jugs A,B,C with capacities 8,5 and 3 liters
respectively but are not calibrated (i.e. no measuring mark will be there). Jug A is
filled with 8 liters of water. By a series of pouring back and forth among the 3 jugs,
divide the 8 liters into 2 equal parts i.e. 4 liters in jug A and 4 liters in jug B.
18 August 2015 2
Production rules for Water Jug Problem
The production rules are formulated as follows:
Step 1:
In this step, the initial state will be (8, 0, 0) as the jug B and jug C will be empty. So the water of jug A can
be poured like:
(5, 0, 3) means 3 liters to jug C and 5 liters will remain in jug A.
(3, 5, 0) means 5 liters to jug B and 3 liters will be in jug A.
(0, 5, 3) means 5 liters to jug B and 3 liters to jug C and jug C and jug A will be empty.
Step2:
In this step, start with the first current state of step-1 i.e. (5, 0, 3). This state can only be implemented by
pouring the 3 liters water of jug C into jug B. so the state will be (5, 3, 0). Next, come to the second current
state of step-1 i.e. (3, 5, 0). This state can be implemented by only pouring the 5 liters water of jug B into
jug C. So the remaining water in jug B will be 2 liters. So the state will be (3, 2, 3). Finally come to the third
current state of step-1 i.e. (0, 5, 3). But from this state no more state can be implemented because after
implementing we may get (5, 0, 3) or (3, 5, 0) or (8, 0, 0) which are repeated state. Hence these states are
not considerably again for going towards goal.
So the state will be like:
5, 0, 3 5, 3, 0
3, 5, 0 3, 2, 3
0, 5, 3 X 18 August 2015 3
Step 3:
In this step, start with the first current state of step-2 i.e. (5, 3, 0) and proceed likewise the above steps.
5, 3, 0 2, 3, 3
3, 2, 3 6, 2, 0
Step 4:
In this step, start with the first current state of step-3 i.e. (2, 3, 3) and proceed.
2, 3, 3 2, 5, 1
6, 2, 0 7, 0, 1
Step 5:
2, 5, 1 7, 0, 1
6, 0, 2 1, 5, 2
Step6:
7, 0, 1 7, 1, 0
1, 4, 3 1, 4, 3
Step7:
7, 1, 0 4, 1, 3
1, 4, 3 4, 4, 0 Goal
So finally the state will be (4, 4, 0) that means jug A and jug B contains 4 liters of water each which is
our goal state. One thing you have to very careful about the pouring of water from one jug to another that
the capacity of jug must satisfy the condition to contain that much of water.
18 August 2015 4
Missionaries and Carnivals Problem
Definition:
In Missionaries and Carnivals Problem, initially there are some missionaries and some
carnivals will be at a side of a river. They want to cross the river. But there is only one
boat available to cross the river. The capacity of the boat is 2 and no one missionary or
no Carnivals can cross the river together. So for solving the problem and to find out the
solution on different states is called the Missionaries and Carnival Problem.
Procedure:
Let us take an example. Initially a boatman, Grass, Tiger and Goat is present at the left
bank of the river and want to cross it. The only boat available is one capable of carrying
2 objects of portions at a time. The condition of safe crossing is that at no time the tiger
present with goat, the goat present with the grass at the either side of the river. How
they will cross the river?
18 August 2015 5
Production Rules
Step 1:
According to the question, this step will be (B, T, G, Gr) as all the Missionaries and the
Carnivals are at one side of the bank of the river. Different states from this state can be
implemented as
`The states (B, T, O, O) and (B, O, O, Gr) will not be countable because at a time the
Boatman and the Tiger or the Boatman and grass cannot go. (According to the
question).
18 August 2015 6
Step 2:
Now consider the current state of step-1 i.e. the state (B,
O, G, O). The state is the right side of the river. So on
the left side the state may be (B, T, O, Gr)
i.e. B,O,G,O ------------ B, T, O, Gr
(Right) ------------------(Left)
Step 3:
Now proceed according to the left and right sides of the
river such that the condition of the problem must be
satisfied.
Step 4:
First, consider the first current state on the right side of
step 3 i.e.
Now consider the second current state on the right side
of step-3 i.e.
18 August 2015 7
Step 5:
Now first consider the first current
state of step 4 i.e.
Step 6:
Step 7:
Hence the final state will be (B, T, G,
Gr) which are on the right side of the
river.
18 August 2015 8
8 Queens Problem
Definition:
“We have 8 queens and an 8x8 Chess board having alternate black and white squares. The queens are placed on the
chessboard. Any queen can attack any other queen placed on same row, or column or diagonal. We have to find the
proper placement of queens on the Chess board in such a way that no queen attacks other queen”.
Figure A possible board configuration of 8 queen problem
Procedure:
In figure , the possible board configuration for 8-queen problem has been shown. The board has alternative black and
white positions on it. The different positions on the board hold the queens. The production rule for this game is you
cannot put the same queens in a same row or same column or in same diagonal. After shifting a single queen from its
position on the board, the user have to shift other queens according to the production rule. Starting from the first row
on the board the queen of their corresponding row and column are to be moved from their original positions to
another position. Finally the player has to be ensured that no rows or columns or diagonals of on the table is same.
18 August 2015 9

More Related Content

What's hot (20)

PPT
Database Systems Security
amiable_indian
 
PPT
Chapter 14 - Protection
Wayne Jones Jnr
 
PDF
Waltz algorithm in artificial intelligence
Minakshi Atre
 
PPTX
Issues in knowledge representation
Sravanthi Emani
 
PDF
Algorithms Lecture 1: Introduction to Algorithms
Mohamed Loey
 
PPTX
Dbms
Rupali Salunkhe
 
PPTX
Machine Learning SPPU Unit 1
Amruta Aphale
 
PDF
TOC 1 | Introduction to Theory of Computation
Mohammad Imam Hossain
 
PPTX
Planning and Machine learning, Strips, K Strips
VishwanathMurthy7
 
PPT
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
PPT
Predicate calculus
Rajendran
 
PPT
Micro programmed control
Syed Zaid Irshad
 
PPTX
Micro program example
rajshreemuthiah
 
PPTX
search strategies in artificial intelligence
Hanif Ullah (Gold Medalist)
 
PDF
I. Alpha-Beta Pruning in ai
vikas dhakane
 
PPTX
Diffie hellman key exchange algorithm
Sunita Kharayat
 
PPTX
AI-09 Logic in AI
Pankaj Debbarma
 
PPT
Problems, Problem spaces and Search
BMS Institute of Technology and Management
 
Database Systems Security
amiable_indian
 
Chapter 14 - Protection
Wayne Jones Jnr
 
Waltz algorithm in artificial intelligence
Minakshi Atre
 
Issues in knowledge representation
Sravanthi Emani
 
Algorithms Lecture 1: Introduction to Algorithms
Mohamed Loey
 
Machine Learning SPPU Unit 1
Amruta Aphale
 
TOC 1 | Introduction to Theory of Computation
Mohammad Imam Hossain
 
Planning and Machine learning, Strips, K Strips
VishwanathMurthy7
 
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Predicate calculus
Rajendran
 
Micro programmed control
Syed Zaid Irshad
 
Micro program example
rajshreemuthiah
 
search strategies in artificial intelligence
Hanif Ullah (Gold Medalist)
 
I. Alpha-Beta Pruning in ai
vikas dhakane
 
Diffie hellman key exchange algorithm
Sunita Kharayat
 
AI-09 Logic in AI
Pankaj Debbarma
 
Problems, Problem spaces and Search
BMS Institute of Technology and Management
 

Viewers also liked (20)

PDF
AI Lesson 08
Assistant Professor
 
PPTX
Lecture 12 Heuristic Searches
Hema Kashyap
 
PPTX
Lecture 23 alpha beta pruning
Hema Kashyap
 
PPTX
Alpha beta pruning
Nilesh Bandekar
 
PPT
Searchadditional2
chandsek666
 
DOCX
Core java tutorial
Niraj Bharambe
 
PDF
The Unified Modelling Lanage (UML)
CC Nakhon Pathom Rajabhat University
 
PDF
Alphabeta
afshan_j
 
PPT
Heuristic Search
butest
 
PDF
Advanced java practical semester 6_computer science
Niraj Bharambe
 
ODP
Uml
parag
 
PPS
Advance Java
Vidyacenter
 
PPT
(Radhika) presentation on chapter 2 ai
Radhika Srinivasan
 
DOC
Chapter 2 (final)
Nateshwar Kamlesh
 
PPTX
Informed and Uninformed search Strategies
Amey Kerkar
 
PDF
Advanced Java Practical File
Soumya Behera
 
PPT
Ch2 3-informed (heuristic) search
chandsek666
 
DOCX
Java PRACTICAL file
RACHIT_GUPTA
 
PPT
Java Servlets
Nitin Pai
 
PPTX
AI: AI & Problem Solving
DataminingTools Inc
 
AI Lesson 08
Assistant Professor
 
Lecture 12 Heuristic Searches
Hema Kashyap
 
Lecture 23 alpha beta pruning
Hema Kashyap
 
Alpha beta pruning
Nilesh Bandekar
 
Searchadditional2
chandsek666
 
Core java tutorial
Niraj Bharambe
 
The Unified Modelling Lanage (UML)
CC Nakhon Pathom Rajabhat University
 
Alphabeta
afshan_j
 
Heuristic Search
butest
 
Advanced java practical semester 6_computer science
Niraj Bharambe
 
Uml
parag
 
Advance Java
Vidyacenter
 
(Radhika) presentation on chapter 2 ai
Radhika Srinivasan
 
Chapter 2 (final)
Nateshwar Kamlesh
 
Informed and Uninformed search Strategies
Amey Kerkar
 
Advanced Java Practical File
Soumya Behera
 
Ch2 3-informed (heuristic) search
chandsek666
 
Java PRACTICAL file
RACHIT_GUPTA
 
Java Servlets
Nitin Pai
 
AI: AI & Problem Solving
DataminingTools Inc
 
Ad

Similar to Lecture 09 uninformed problem solving (20)

PDF
Production system
Amit Kumar Rathi
 
PPTX
AI problem solving.pptx
Sonam Mittal
 
PPTX
Problem Formulation
Adri Jovin
 
PPTX
Water jug problem ai part 6
Kirti Verma
 
DOC
Chapter2final 130103081315-phpapp02
Madhan Kumar
 
PDF
State space representation and search.pdf
vijeta3feb
 
PPT
Chapter 02-artificialPROBLEM SOLVING.ppt
jenyisblessed
 
PPTX
problemsolving with AI.pptx
PriyadharshiniG41
 
PPTX
Presentaion on “MiniMax Algorithm and Water Jug Problem
Maruf Alom
 
PPT
Problem space
harman_sekhon
 
PPT
Problem space
harman_sekhon
 
PPT
Problem space
harman_sekhon
 
PDF
State space search
Timothy Makgato
 
PPT
Amit ppt
amitp26
 
PPTX
AI-State Space Representation.pptx
Ratnakar Mikkili
 
PPTX
AI-State Space Representation.pptx
Ratnakar Mikkili
 
PPTX
Searching in Artificial Intelligence for UG
ProfSonaliGholveDoif
 
PDF
Ai lecture 8(unit02)
vikas dhakane
 
PPSX
Cs 361 2015 lec 1-2
Alaa Zaghloul
 
PPSX
Cs 361 2015 lec 1-2
Alaa Zaghloul
 
Production system
Amit Kumar Rathi
 
AI problem solving.pptx
Sonam Mittal
 
Problem Formulation
Adri Jovin
 
Water jug problem ai part 6
Kirti Verma
 
Chapter2final 130103081315-phpapp02
Madhan Kumar
 
State space representation and search.pdf
vijeta3feb
 
Chapter 02-artificialPROBLEM SOLVING.ppt
jenyisblessed
 
problemsolving with AI.pptx
PriyadharshiniG41
 
Presentaion on “MiniMax Algorithm and Water Jug Problem
Maruf Alom
 
Problem space
harman_sekhon
 
Problem space
harman_sekhon
 
Problem space
harman_sekhon
 
State space search
Timothy Makgato
 
Amit ppt
amitp26
 
AI-State Space Representation.pptx
Ratnakar Mikkili
 
AI-State Space Representation.pptx
Ratnakar Mikkili
 
Searching in Artificial Intelligence for UG
ProfSonaliGholveDoif
 
Ai lecture 8(unit02)
vikas dhakane
 
Cs 361 2015 lec 1-2
Alaa Zaghloul
 
Cs 361 2015 lec 1-2
Alaa Zaghloul
 
Ad

More from Hema Kashyap (20)

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

Recently uploaded (20)

PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PPTX
Big Data and Data Science hype .pptx
SUNEEL37
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Big Data and Data Science hype .pptx
SUNEEL37
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Thermal runway and thermal stability.pptx
godow93766
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 

Lecture 09 uninformed problem solving

  • 2. Water Jug Problem Definition: • Some jugs are given which should have non-calibrated properties. At least any one of the jugs should have filled with water. Then the process through which we can divide the whole water into different jugs according to the question can be called as water jug problem. Procedure: • Suppose that you are given 3 jugs A,B,C with capacities 8,5 and 3 liters respectively but are not calibrated (i.e. no measuring mark will be there). Jug A is filled with 8 liters of water. By a series of pouring back and forth among the 3 jugs, divide the 8 liters into 2 equal parts i.e. 4 liters in jug A and 4 liters in jug B. 18 August 2015 2
  • 3. Production rules for Water Jug Problem The production rules are formulated as follows: Step 1: In this step, the initial state will be (8, 0, 0) as the jug B and jug C will be empty. So the water of jug A can be poured like: (5, 0, 3) means 3 liters to jug C and 5 liters will remain in jug A. (3, 5, 0) means 5 liters to jug B and 3 liters will be in jug A. (0, 5, 3) means 5 liters to jug B and 3 liters to jug C and jug C and jug A will be empty. Step2: In this step, start with the first current state of step-1 i.e. (5, 0, 3). This state can only be implemented by pouring the 3 liters water of jug C into jug B. so the state will be (5, 3, 0). Next, come to the second current state of step-1 i.e. (3, 5, 0). This state can be implemented by only pouring the 5 liters water of jug B into jug C. So the remaining water in jug B will be 2 liters. So the state will be (3, 2, 3). Finally come to the third current state of step-1 i.e. (0, 5, 3). But from this state no more state can be implemented because after implementing we may get (5, 0, 3) or (3, 5, 0) or (8, 0, 0) which are repeated state. Hence these states are not considerably again for going towards goal. So the state will be like: 5, 0, 3 5, 3, 0 3, 5, 0 3, 2, 3 0, 5, 3 X 18 August 2015 3
  • 4. Step 3: In this step, start with the first current state of step-2 i.e. (5, 3, 0) and proceed likewise the above steps. 5, 3, 0 2, 3, 3 3, 2, 3 6, 2, 0 Step 4: In this step, start with the first current state of step-3 i.e. (2, 3, 3) and proceed. 2, 3, 3 2, 5, 1 6, 2, 0 7, 0, 1 Step 5: 2, 5, 1 7, 0, 1 6, 0, 2 1, 5, 2 Step6: 7, 0, 1 7, 1, 0 1, 4, 3 1, 4, 3 Step7: 7, 1, 0 4, 1, 3 1, 4, 3 4, 4, 0 Goal So finally the state will be (4, 4, 0) that means jug A and jug B contains 4 liters of water each which is our goal state. One thing you have to very careful about the pouring of water from one jug to another that the capacity of jug must satisfy the condition to contain that much of water. 18 August 2015 4
  • 5. Missionaries and Carnivals Problem Definition: In Missionaries and Carnivals Problem, initially there are some missionaries and some carnivals will be at a side of a river. They want to cross the river. But there is only one boat available to cross the river. The capacity of the boat is 2 and no one missionary or no Carnivals can cross the river together. So for solving the problem and to find out the solution on different states is called the Missionaries and Carnival Problem. Procedure: Let us take an example. Initially a boatman, Grass, Tiger and Goat is present at the left bank of the river and want to cross it. The only boat available is one capable of carrying 2 objects of portions at a time. The condition of safe crossing is that at no time the tiger present with goat, the goat present with the grass at the either side of the river. How they will cross the river? 18 August 2015 5
  • 6. Production Rules Step 1: According to the question, this step will be (B, T, G, Gr) as all the Missionaries and the Carnivals are at one side of the bank of the river. Different states from this state can be implemented as `The states (B, T, O, O) and (B, O, O, Gr) will not be countable because at a time the Boatman and the Tiger or the Boatman and grass cannot go. (According to the question). 18 August 2015 6
  • 7. Step 2: Now consider the current state of step-1 i.e. the state (B, O, G, O). The state is the right side of the river. So on the left side the state may be (B, T, O, Gr) i.e. B,O,G,O ------------ B, T, O, Gr (Right) ------------------(Left) Step 3: Now proceed according to the left and right sides of the river such that the condition of the problem must be satisfied. Step 4: First, consider the first current state on the right side of step 3 i.e. Now consider the second current state on the right side of step-3 i.e. 18 August 2015 7
  • 8. Step 5: Now first consider the first current state of step 4 i.e. Step 6: Step 7: Hence the final state will be (B, T, G, Gr) which are on the right side of the river. 18 August 2015 8
  • 9. 8 Queens Problem Definition: “We have 8 queens and an 8x8 Chess board having alternate black and white squares. The queens are placed on the chessboard. Any queen can attack any other queen placed on same row, or column or diagonal. We have to find the proper placement of queens on the Chess board in such a way that no queen attacks other queen”. Figure A possible board configuration of 8 queen problem Procedure: In figure , the possible board configuration for 8-queen problem has been shown. The board has alternative black and white positions on it. The different positions on the board hold the queens. The production rule for this game is you cannot put the same queens in a same row or same column or in same diagonal. After shifting a single queen from its position on the board, the user have to shift other queens according to the production rule. Starting from the first row on the board the queen of their corresponding row and column are to be moved from their original positions to another position. Finally the player has to be ensured that no rows or columns or diagonals of on the table is same. 18 August 2015 9