SlideShare a Scribd company logo
AI Problem Representation
ARTIFICIAL INTELLIGENCE PART #6
Water Jug Problem
A Water Jug Problem: You are given two jugs, a 4-gallon
one and a 3-gallon one, a pump which has unlimited water
which you can use to fill the jug, and the ground on which
water may be poured. Neither jug has any measuring markings
on it. How can you get exactly 2 gallons of water in the 4-
gallon jug?
State Representation
 We will represent a state of the problem as a tuple
(x, y) where x represents the amount of water in the 4-
gallon jug and y represents the amount of water in the 3-
gallon jug.
 Initial state as (0,0).
 Goal state as (2,y).
Production Rules
1. (x,y) If x<4 -> (4,y)
2. (x,y) If y<3 ->(x,3)
3. (x,y) If x>0 ->(x-d,y)
4. (x,y) If y>0 ->(x,y-d)
5. (x,y) If x>0 ->(0,y)
6. (x,y) If y>0 ->(x,0)
7. (x,y) If (x+y>=4 and y>0) ->(4,y-(4-x))
8. (x,y) If (x+y>=3 and x>0) ->(x-(3-y),3)
9. (x,y) If(x+y<=4 and y>0) ->(x+y,0)
10.(x,y) If (x+y<=3 and x>0) ->(0,x+y)
11.(0,2) ->(2,0)
WATER JUG: one of the Solution
4 Gallon
Jug
3 Gallon
Jug
Rule
applied
0 0
4 0 1
1 3 8
1 0 6
0 1 10
4 1 1
2 3 8
4 Gallon jug 3 Gallon jug
pump
Search Tree : Water Jug Problem
(0,0)
(4,0)
(4,3) (0,0) (1,3)
(0,3)
(4,3) (0,0) (3,0)
8 Queen Problem
Problem: Place 8 queens on a chess board so
that none of them attack each other.
Formulation- I
- A state is an arrangement of 0 to 8 queens on
the board
- Operators add a queen to any square.
This formulation is not a systematic way to
find the solution, it takes a long time to get
the solution.
-
Formulation – II
-A state is an arrangement of 0-8 queen with no one
attacked.
-Operators place a queen in the left most empty
column.
- More systematic than formulation-I
8 Queen Problem
Formulation –III
- A state is an arrangement of 8 queens on
in each column.
-Operators move an attacked queen to another
square in the same column.
-Keep on shuffling the queen until the goal is
reached.
- This formulation is more systematic hence ,
it is also called as Iterative Formulation.
8 Queen Problem
8 Queen Problem: one solution
8 Puzzle Problem
Start State Goal State
• State space (S)
• Location of each of the 8 tiles(and the blank tile)
• Start State (s)
• Starting configuration
Operators(O)
• Four Operators : Right, Left, Up, Down
• Goals(G) one of the goal configuration
8 Puzzle Problem
8 Puzzle Tree
Missionaries and Cannibals
• Three missionaries and three cannibals find themselves on a side
of river. They agreed to get to the other side of river.
• But missionaries are afraid of being eaten by cannibals so, the
missionaries want to manage the trip in such a way that no. of
missionaries on either side of the river is never less than the no.
of cannibals on the same side.
• The boat is able to hold only 2 people at a time.
Missionaries and Cannibals:
State representation
• State(#m,#c,1/0)
#m – number of missionaries on first bank #c –
number of cannibals on first bank
• The last bit indicate whether the boat is in
the first bank.
Operators
• Boat carries (1,0) or (0,1) or (1,1) or (2,0) or
(0,2)
FIND SOLUTION ?
Water jug problem ai part 6

More Related Content

What's hot

AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
Mohammad Imam Hossain
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
Amey Kerkar
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Informed search
Informed searchInformed search
Informed search
Amit Kumar Rathi
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and bound
Abhishek Singh
 
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
Asst.prof M.Gokilavani
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
sandeep54552
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
Jismy .K.Jose
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
Megha Sharma
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representationSravanthi Emani
 
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
Asst.prof M.Gokilavani
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
Jismy .K.Jose
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
Kirti Verma
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
vikas dhakane
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
Tajim Md. Niamat Ullah Akhund
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
Hema Kashyap
 
State space search
State space searchState space search
State space search
chauhankapil
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
Megha Sharma
 

What's hot (20)

Hill climbing
Hill climbingHill climbing
Hill climbing
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Informed search
Informed searchInformed search
Informed search
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and bound
 
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
 
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
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
 
State space search
State space searchState space search
State space search
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 

Similar to Water jug problem ai part 6

AI problem solving.pptx
AI problem solving.pptxAI problem solving.pptx
AI problem solving.pptx
Sonam Mittal
 
Problem Formulation
Problem FormulationProblem Formulation
Problem Formulation
Adri Jovin
 
03_UninformedSearch.pdf
03_UninformedSearch.pdf03_UninformedSearch.pdf
03_UninformedSearch.pdf
kaxeca4096
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
Ratnakar Mikkili
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
Ratnakar Mikkili
 
Ai lecture 8(unit02)
Ai lecture  8(unit02)Ai lecture  8(unit02)
Ai lecture 8(unit02)
vikas dhakane
 
UninformedSearch (2).pptx
UninformedSearch (2).pptxUninformedSearch (2).pptx
UninformedSearch (2).pptx
SankarTerli
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
pavan402055
 
Lecture 09 uninformed problem solving
Lecture 09 uninformed problem solvingLecture 09 uninformed problem solving
Lecture 09 uninformed problem solving
Hema Kashyap
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdf
Shiwani Gupta
 
Presentaion on “MiniMax Algorithm and Water Jug Problem
Presentaion on “MiniMax Algorithm and Water Jug ProblemPresentaion on “MiniMax Algorithm and Water Jug Problem
Presentaion on “MiniMax Algorithm and Water Jug Problem
Maruf Alom
 
8-Queens Problem.pptx
8-Queens Problem.pptx8-Queens Problem.pptx
8-Queens Problem.pptx
rajinooka
 

Similar to Water jug problem ai part 6 (14)

AI problem solving.pptx
AI problem solving.pptxAI problem solving.pptx
AI problem solving.pptx
 
Problem Formulation
Problem FormulationProblem Formulation
Problem Formulation
 
03_UninformedSearch.pdf
03_UninformedSearch.pdf03_UninformedSearch.pdf
03_UninformedSearch.pdf
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
Ai lecture 8(unit02)
Ai lecture  8(unit02)Ai lecture  8(unit02)
Ai lecture 8(unit02)
 
UninformedSearch (2).pptx
UninformedSearch (2).pptxUninformedSearch (2).pptx
UninformedSearch (2).pptx
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
 
Lecture 09 uninformed problem solving
Lecture 09 uninformed problem solvingLecture 09 uninformed problem solving
Lecture 09 uninformed problem solving
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdf
 
Presentaion on “MiniMax Algorithm and Water Jug Problem
Presentaion on “MiniMax Algorithm and Water Jug ProblemPresentaion on “MiniMax Algorithm and Water Jug Problem
Presentaion on “MiniMax Algorithm and Water Jug Problem
 
D.E.V.
D.E.V.D.E.V.
D.E.V.
 
Numerical literacy ( week 2 )
Numerical literacy ( week 2 )Numerical literacy ( week 2 )
Numerical literacy ( week 2 )
 
8-Queens Problem.pptx
8-Queens Problem.pptx8-Queens Problem.pptx
8-Queens Problem.pptx
 

More from Kirti Verma

L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
Kirti Verma
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
Kirti Verma
 
L-4 BCE Generations of Computers final.ppt
L-4 BCE Generations of Computers final.pptL-4 BCE Generations of Computers final.ppt
L-4 BCE Generations of Computers final.ppt
Kirti Verma
 
L-1 BCE computer fundamentals final kirti.ppt
L-1 BCE computer fundamentals final kirti.pptL-1 BCE computer fundamentals final kirti.ppt
L-1 BCE computer fundamentals final kirti.ppt
Kirti Verma
 
BCE L-4 Data Type In C++.ppt
BCE L-4 Data Type In C++.pptBCE L-4 Data Type In C++.ppt
BCE L-4 Data Type In C++.ppt
Kirti Verma
 
BCE L-3 overview of C++.ppt
BCE L-3 overview of C++.pptBCE L-3 overview of C++.ppt
BCE L-3 overview of C++.ppt
Kirti Verma
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
Kirti Verma
 
BCE L-1 Programmimg languages.pptx
BCE L-1  Programmimg languages.pptxBCE L-1  Programmimg languages.pptx
BCE L-1 Programmimg languages.pptx
Kirti Verma
 
BCE L-1 networking fundamentals 111.pptx
BCE L-1  networking fundamentals 111.pptxBCE L-1  networking fundamentals 111.pptx
BCE L-1 networking fundamentals 111.pptx
Kirti Verma
 
BCE L-2 e commerce.pptx
BCE L-2 e commerce.pptxBCE L-2 e commerce.pptx
BCE L-2 e commerce.pptx
Kirti Verma
 
BCE L-3omputer security Basics.pptx
BCE L-3omputer security Basics.pptxBCE L-3omputer security Basics.pptx
BCE L-3omputer security Basics.pptx
Kirti Verma
 
L 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxL 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptx
Kirti Verma
 
L 2 Introduction to Data science final kirti.pptx
L 2 Introduction to Data science final kirti.pptxL 2 Introduction to Data science final kirti.pptx
L 2 Introduction to Data science final kirti.pptx
Kirti Verma
 
Pandas Dataframe reading data Kirti final.pptx
Pandas Dataframe reading data  Kirti final.pptxPandas Dataframe reading data  Kirti final.pptx
Pandas Dataframe reading data Kirti final.pptx
Kirti Verma
 
L 8 introduction to machine learning final kirti.pptx
L 8 introduction to machine learning final kirti.pptxL 8 introduction to machine learning final kirti.pptx
L 8 introduction to machine learning final kirti.pptx
Kirti Verma
 
L 6.1 complete scikit libraray.pptx
L 6.1 complete scikit libraray.pptxL 6.1 complete scikit libraray.pptx
L 6.1 complete scikit libraray.pptx
Kirti Verma
 
L 7Complete Machine learning.pptx
L 7Complete Machine learning.pptxL 7Complete Machine learning.pptx
L 7Complete Machine learning.pptx
Kirti Verma
 
Introduction to python history and platforms
Introduction to python history and platformsIntroduction to python history and platforms
Introduction to python history and platforms
Kirti Verma
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptx
Kirti Verma
 
Production System l 10.pptx
Production System l 10.pptxProduction System l 10.pptx
Production System l 10.pptx
Kirti Verma
 

More from Kirti Verma (20)

L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
L-4 BCE Generations of Computers final.ppt
L-4 BCE Generations of Computers final.pptL-4 BCE Generations of Computers final.ppt
L-4 BCE Generations of Computers final.ppt
 
L-1 BCE computer fundamentals final kirti.ppt
L-1 BCE computer fundamentals final kirti.pptL-1 BCE computer fundamentals final kirti.ppt
L-1 BCE computer fundamentals final kirti.ppt
 
BCE L-4 Data Type In C++.ppt
BCE L-4 Data Type In C++.pptBCE L-4 Data Type In C++.ppt
BCE L-4 Data Type In C++.ppt
 
BCE L-3 overview of C++.ppt
BCE L-3 overview of C++.pptBCE L-3 overview of C++.ppt
BCE L-3 overview of C++.ppt
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
 
BCE L-1 Programmimg languages.pptx
BCE L-1  Programmimg languages.pptxBCE L-1  Programmimg languages.pptx
BCE L-1 Programmimg languages.pptx
 
BCE L-1 networking fundamentals 111.pptx
BCE L-1  networking fundamentals 111.pptxBCE L-1  networking fundamentals 111.pptx
BCE L-1 networking fundamentals 111.pptx
 
BCE L-2 e commerce.pptx
BCE L-2 e commerce.pptxBCE L-2 e commerce.pptx
BCE L-2 e commerce.pptx
 
BCE L-3omputer security Basics.pptx
BCE L-3omputer security Basics.pptxBCE L-3omputer security Basics.pptx
BCE L-3omputer security Basics.pptx
 
L 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxL 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptx
 
L 2 Introduction to Data science final kirti.pptx
L 2 Introduction to Data science final kirti.pptxL 2 Introduction to Data science final kirti.pptx
L 2 Introduction to Data science final kirti.pptx
 
Pandas Dataframe reading data Kirti final.pptx
Pandas Dataframe reading data  Kirti final.pptxPandas Dataframe reading data  Kirti final.pptx
Pandas Dataframe reading data Kirti final.pptx
 
L 8 introduction to machine learning final kirti.pptx
L 8 introduction to machine learning final kirti.pptxL 8 introduction to machine learning final kirti.pptx
L 8 introduction to machine learning final kirti.pptx
 
L 6.1 complete scikit libraray.pptx
L 6.1 complete scikit libraray.pptxL 6.1 complete scikit libraray.pptx
L 6.1 complete scikit libraray.pptx
 
L 7Complete Machine learning.pptx
L 7Complete Machine learning.pptxL 7Complete Machine learning.pptx
L 7Complete Machine learning.pptx
 
Introduction to python history and platforms
Introduction to python history and platformsIntroduction to python history and platforms
Introduction to python history and platforms
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptx
 
Production System l 10.pptx
Production System l 10.pptxProduction System l 10.pptx
Production System l 10.pptx
 

Recently uploaded

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 

Recently uploaded (20)

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 

Water jug problem ai part 6

  • 2. Water Jug Problem A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3-gallon one, a pump which has unlimited water which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring markings on it. How can you get exactly 2 gallons of water in the 4- gallon jug?
  • 3. State Representation  We will represent a state of the problem as a tuple (x, y) where x represents the amount of water in the 4- gallon jug and y represents the amount of water in the 3- gallon jug.  Initial state as (0,0).  Goal state as (2,y).
  • 4. Production Rules 1. (x,y) If x<4 -> (4,y) 2. (x,y) If y<3 ->(x,3) 3. (x,y) If x>0 ->(x-d,y) 4. (x,y) If y>0 ->(x,y-d) 5. (x,y) If x>0 ->(0,y) 6. (x,y) If y>0 ->(x,0) 7. (x,y) If (x+y>=4 and y>0) ->(4,y-(4-x)) 8. (x,y) If (x+y>=3 and x>0) ->(x-(3-y),3) 9. (x,y) If(x+y<=4 and y>0) ->(x+y,0) 10.(x,y) If (x+y<=3 and x>0) ->(0,x+y) 11.(0,2) ->(2,0)
  • 5. WATER JUG: one of the Solution 4 Gallon Jug 3 Gallon Jug Rule applied 0 0 4 0 1 1 3 8 1 0 6 0 1 10 4 1 1 2 3 8 4 Gallon jug 3 Gallon jug pump
  • 6. Search Tree : Water Jug Problem (0,0) (4,0) (4,3) (0,0) (1,3) (0,3) (4,3) (0,0) (3,0)
  • 7. 8 Queen Problem Problem: Place 8 queens on a chess board so that none of them attack each other. Formulation- I - A state is an arrangement of 0 to 8 queens on the board - Operators add a queen to any square. This formulation is not a systematic way to find the solution, it takes a long time to get the solution. -
  • 8. Formulation – II -A state is an arrangement of 0-8 queen with no one attacked. -Operators place a queen in the left most empty column. - More systematic than formulation-I 8 Queen Problem
  • 9. Formulation –III - A state is an arrangement of 8 queens on in each column. -Operators move an attacked queen to another square in the same column. -Keep on shuffling the queen until the goal is reached. - This formulation is more systematic hence , it is also called as Iterative Formulation. 8 Queen Problem
  • 10. 8 Queen Problem: one solution
  • 11. 8 Puzzle Problem Start State Goal State
  • 12. • State space (S) • Location of each of the 8 tiles(and the blank tile) • Start State (s) • Starting configuration Operators(O) • Four Operators : Right, Left, Up, Down • Goals(G) one of the goal configuration 8 Puzzle Problem
  • 14. Missionaries and Cannibals • Three missionaries and three cannibals find themselves on a side of river. They agreed to get to the other side of river. • But missionaries are afraid of being eaten by cannibals so, the missionaries want to manage the trip in such a way that no. of missionaries on either side of the river is never less than the no. of cannibals on the same side. • The boat is able to hold only 2 people at a time.
  • 15. Missionaries and Cannibals: State representation • State(#m,#c,1/0) #m – number of missionaries on first bank #c – number of cannibals on first bank • The last bit indicate whether the boat is in the first bank. Operators • Boat carries (1,0) or (0,1) or (1,1) or (2,0) or (0,2)