SlideShare a Scribd company logo
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

PPTX
Semophores and it's types
PPTX
3. planning in situational calculas
PPTX
Lecture 15 monkey banana problem
PPTX
1.1. the central concepts of automata theory
PPTX
Analysis and Design of Algorithms
PDF
Soft computing
PPTX
AI_Session 7 Greedy Best first search algorithm.pptx
DOCX
Natural Language Processing
Semophores and it's types
3. planning in situational calculas
Lecture 15 monkey banana problem
1.1. the central concepts of automata theory
Analysis and Design of Algorithms
Soft computing
AI_Session 7 Greedy Best first search algorithm.pptx
Natural Language Processing

What's hot (20)

PPTX
Data cube computation
PPTX
Knowledge representation in AI
PPTX
System analysis and design
PDF
FLAT Notes
PPT
Primitive Recursive Functions
PPT
Regular Languages
PPTX
Types of grammer - TOC
PPTX
Knowledge based agents
PPT
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
PDF
P, NP, NP-Complete, and NP-Hard
PPT
Finite automata examples
PPTX
Means End Analysis (MEA) in Artificial.pptx
PPTX
Artificial Intelligence Notes Unit 3
PPT
Multi Head, Multi Tape Turing Machine
PPTX
AI_Session 28 planning graph.pptx
PPTX
Fuzzy inference
PPTX
Genetic algorithms vs Traditional algorithms
PPT
1.2 steps and functionalities
PDF
Unit4: Knowledge Representation
PPTX
Active and main memory database
Data cube computation
Knowledge representation in AI
System analysis and design
FLAT Notes
Primitive Recursive Functions
Regular Languages
Types of grammer - TOC
Knowledge based agents
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
P, NP, NP-Complete, and NP-Hard
Finite automata examples
Means End Analysis (MEA) in Artificial.pptx
Artificial Intelligence Notes Unit 3
Multi Head, Multi Tape Turing Machine
AI_Session 28 planning graph.pptx
Fuzzy inference
Genetic algorithms vs Traditional algorithms
1.2 steps and functionalities
Unit4: Knowledge Representation
Active and main memory database
Ad

Viewers also liked (20)

PDF
AI Lesson 08
PPTX
Lecture 12 Heuristic Searches
PPTX
Lecture 23 alpha beta pruning
PPTX
Alpha beta pruning
PPT
Searchadditional2
DOCX
Core java tutorial
PDF
The Unified Modelling Lanage (UML)
PDF
Alphabeta
PPT
Heuristic Search
PDF
Advanced java practical semester 6_computer science
ODP
Uml
PPS
Advance Java
PPT
(Radhika) presentation on chapter 2 ai
DOC
Chapter 2 (final)
PPTX
Informed and Uninformed search Strategies
PDF
Advanced Java Practical File
PPT
Ch2 3-informed (heuristic) search
DOCX
Java PRACTICAL file
PPT
Java Servlets
PPTX
AI: AI & Problem Solving
AI Lesson 08
Lecture 12 Heuristic Searches
Lecture 23 alpha beta pruning
Alpha beta pruning
Searchadditional2
Core java tutorial
The Unified Modelling Lanage (UML)
Alphabeta
Heuristic Search
Advanced java practical semester 6_computer science
Uml
Advance Java
(Radhika) presentation on chapter 2 ai
Chapter 2 (final)
Informed and Uninformed search Strategies
Advanced Java Practical File
Ch2 3-informed (heuristic) search
Java PRACTICAL file
Java Servlets
AI: AI & Problem Solving
Ad

Similar to Lecture 09 uninformed problem solving (20)

PDF
Production system
PPTX
AI problem solving.pptx
PPTX
Problem Formulation
PPTX
Water jug problem ai part 6
DOC
Chapter2final 130103081315-phpapp02
PDF
State space representation and search.pdf
PPT
Chapter 02-artificialPROBLEM SOLVING.ppt
PPTX
problemsolving with AI.pptx
PPTX
Presentaion on “MiniMax Algorithm and Water Jug Problem
PPT
Problem space
PPT
Problem space
PPT
Problem space
PPTX
Presentation_8948_Content_Document_20250725121751PM (1).pptx
PDF
chapter 2 Problem Solving.pdf
PDF
State space search
PPT
Amit ppt
PPTX
AI-State Space Representation.pptx
PPTX
AI-State Space Representation.pptx
PPTX
Searching in Artificial Intelligence for UG
PDF
Ai lecture 8(unit02)
Production system
AI problem solving.pptx
Problem Formulation
Water jug problem ai part 6
Chapter2final 130103081315-phpapp02
State space representation and search.pdf
Chapter 02-artificialPROBLEM SOLVING.ppt
problemsolving with AI.pptx
Presentaion on “MiniMax Algorithm and Water Jug Problem
Problem space
Problem space
Problem space
Presentation_8948_Content_Document_20250725121751PM (1).pptx
chapter 2 Problem Solving.pdf
State space search
Amit ppt
AI-State Space Representation.pptx
AI-State Space Representation.pptx
Searching in Artificial Intelligence for UG
Ai lecture 8(unit02)

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 22 adversarial search
PPTX
Lecture 21 problem reduction search ao star 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 14 Heuristic Search-A star algorithm
PPTX
Lecture 13 Criptarithmetic problem
PPT
Lecture 11 Informed Search
PPTX
Lecture 10 Uninformed Search Techniques conti..
PPTX
Lecture 08 uninformed search techniques
PPTX
Lecture 07 search techniques
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 22 adversarial search
Lecture 21 problem reduction search ao star 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 14 Heuristic Search-A star algorithm
Lecture 13 Criptarithmetic problem
Lecture 11 Informed Search
Lecture 10 Uninformed Search Techniques conti..
Lecture 08 uninformed search techniques
Lecture 07 search techniques

Recently uploaded (20)

PPTX
OOP with Java - Java Introduction (Basics)
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Geodesy 1.pptx...............................................
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
DOCX
573137875-Attendance-Management-System-original
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPT
Project quality management in manufacturing
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
PPT on Performance Review to get promotions
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
web development for engineering and engineering
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
OOP with Java - Java Introduction (Basics)
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Geodesy 1.pptx...............................................
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Internet of Things (IOT) - A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
573137875-Attendance-Management-System-original
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mechanical Engineering MATERIALS Selection
Foundation to blockchain - A guide to Blockchain Tech
Project quality management in manufacturing
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT on Performance Review to get promotions
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Safety Seminar civil to be ensured for safe working.
web development for engineering and engineering
Model Code of Practice - Construction Work - 21102022 .pdf

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