jug


can anybody write a prolog solution for me for the water jug problem?
i've got the solutions but i don't know how to write em' in prolog.

p/s:- the question is, you have two jugs, Jug A with 4 gallon and Jug B with 3 gallon. the objective is to get 2 gallon in Jug A.

the steps are :-
1. Fill Jug B.(0,3)
2. Fill Jug A with Jug B.(3,0)
3. Fill Jug B.(3,3)
4. Pour Jug B into Jug A.(4,2)
5. Pour away Jug A.(0,2)
6. Fill Jug A with Jug B.(2,0)



Wyszukiwarka

Podobne podstrony:
aura, litte brown jug
jug of brown ale the
Little Brown Jug Glenn Miller
Little Brown Jug
jug of punch
Little Brown Jug

więcej podobnych podstron