Welcome! Log In Create A New Profile

Advanced

water jug problem

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
water jug problem
May 02, 2011 04:50PM
Hello, i'm still having problems understanding the solution for the water jug problem in the sample exam paper.Can anyone help me on this?
avatar
Rey
Re: water jug problem
May 21, 2011 06:56PM
Hi
By no means am I ready for this exam... so don't take what I say as valid maybe not even satisfiable smiling smiley

Formulating a problem space: States description, Start State, Goal State, Cost function, Successor

I think your confusion is in the use of T and F. I think it would better be explained as (A,B ) where A has a single value between 0 and 3 litres and B has a single value between 0 and 5 litres.

The start state is: (0,0) as in no water in either jug

Goal state is: Either (1,0) or (0,1 ) (1,Xi) or (Xi,1) as one litre in either jug and something in the other

Cost function is: 1 for each movement of water, from one jug to another or from tap to jug. (Not really concerned with the cost function actually)

Successor function/Operators: Fill jug A or B from tap until full,
empty jug A or B into drain,
pore water from jug from jug A to jug B or B to A

Hope this helped.

From this we could do a state space diagram!

cool smiley very pruned one:
(0,0)
(3,0) Fill A
(0,3) Pore A into B
(3,3) Fill A
(1,5) Pore A into B till B is full
Yay

Correction from fellow sufferers really appreciated

----
"Flying is learning how to throw yourself at the ground and miss." - Douglas Adams
"Time is a great teacher, but unfortunately it kills all its pupils ..." - Louis Hector Berlioz
I think animal testing is a terrible idea; they get all nervous and give the wrong answers.
Sorry, only registered users may post in this forum.

Click here to login