water jug problem
water jug problem
(OP)
Hi
I'm new in Prolog and i've got to solve the following.
It's the water jug problem.
There are two jugs one can hold 4 gallons and the other 3 gallons. I need to write a prolog program such that i have 2 gallons of water in the 4 gallon jug. I know the production rules and i can't even get started with the query and the facts. So please i need help and i'd be very grateful if u could spare some time for me
ash_wing
I'm new in Prolog and i've got to solve the following.
It's the water jug problem.
There are two jugs one can hold 4 gallons and the other 3 gallons. I need to write a prolog program such that i have 2 gallons of water in the 4 gallon jug. I know the production rules and i can't even get started with the query and the facts. So please i need help and i'd be very grateful if u could spare some time for me
ash_wing





RE: water jug problem
i have the similar problem as as yours,can anyone be so kind to help to solve the water jug problem too thanks.
regds
ziperoo
RE: water jug problem