Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help!

Status
Not open for further replies.

singanetch1

Programmer
Jan 13, 2004
2
CH
I am very new to prolog.
I have a problem for which the coding should be written in Prolog with Depth
First Search Algorithm. The question is;
" there are 2 sand clocks. One could measure only 5 minutes and the other one only 7 minutes.
How can i measure 13 minutes with the use of only these two clocks?"

The attachment shows the sequence of actions needed to achieve this task.
But I don't understand how to define the problem in prolog domain( facts and
the rules needed)
I have to write a program that should output the goal path in the following
format.

A- clock 5
b- clock 7

output
------

1) turn A & B
2) once A is finish turn A
3) once B is finish turn B
4) once A is finish turn B

Please help me with this problem with a example. Thanks in advance for your
time and consideration.

thank you

mj
 
Hello

Have you yet received the answer to your question? I'm looking for the same answer...

Thanx
s73
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top