尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
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

Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
Md. Tanvir Masud
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
Dr. C.V. Suresh Babu
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
Hitesh Mohapatra
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
DataminingTools Inc
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
Amey Kerkar
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
Bhavin Darji
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
manika kumari
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
Amey Kerkar
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Backtracking
BacktrackingBacktracking
Backtracking
subhradeep mitra
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
vikas dhakane
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
Activation function
Activation functionActivation function
Activation function
Astha Jain
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1 Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1
DigiGurukul
 
Informed search
Informed searchInformed search
Informed search
Amit Kumar Rathi
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
Sajid Marwat
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 
State space search
State space searchState space search
State space search
chauhankapil
 

What's hot (20)

Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Backtracking
BacktrackingBacktracking
Backtracking
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
Activation function
Activation functionActivation function
Activation function
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1 Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1
 
Informed search
Informed searchInformed search
Informed search
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
State space search
State space searchState space search
State space search
 

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
 
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
 
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 )
Pensil Dan Pemadam
 
8-Queens Problem.pptx
8-Queens Problem.pptx8-Queens Problem.pptx
8-Queens Problem.pptx
rajinooka
 

Similar to Water jug problem ai part 6 (13)

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)
 
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

Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
IJCNCJournal
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
Data Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdfData Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdf
Kamal Acharya
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
paraasingh12 #V08
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
Ismail Sultan
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
Guangdong Ctube Industry Co., Ltd.
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 MinutesCall Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
kamka4105
 
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call GirlCall Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
sapna sharmap11
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
ShurooqTaib
 
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Banerescorts
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
ShivangMishra54
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine
 
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
sonamrawat5631
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Balvir Singh
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Dr.Costas Sachpazis
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
yakranividhrini
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
yogita singh$A17
 
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
Ak47
 

Recently uploaded (20)

Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
Data Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdfData Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdf
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 MinutesCall Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
Call Girls In Tiruppur 👯‍♀️ 7339748667 🔥 Free Home Delivery Within 30 Minutes
 
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call GirlCall Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
 
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
 
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
 
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
College Call Girls Kolkata 🔥 7014168258 🔥 Real Fun With Sexual Girl Available...
 

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)
  翻译: