Question
#s 1-5 in prolog
Give an example of or relationship. Give an example of and relationship. Assume the following facts: parent(a,b). man(a).
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. likes(tom, carol); likes(tom, rosy). /* Tom likes Carol or Tom likes Rosy */

2. likes(nick, lucy), likes(lucy, nick). /* Nick likes Lucy and Lucy likes Nick */

3. father(a,b) :- man(a) , parent(a,b).

4. Jack is the owner of cat X if X has Fur and spots.

Add a comment
Know the answer?
Add Answer to:
#s 1-5 in prolog Give an example of "or" relationship. Give an example of "and" relationship. Assume the following facts: parent(a,b). man(a). woman(c) 1. 2. 3. State a clause for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • CSE 240 Homework 5- Programming with PROLOG Due: Monday, April 22, 11:59 PM A. What This...

    CSE 240 Homework 5- Programming with PROLOG Due: Monday, April 22, 11:59 PM A. What This Assignment Is About: Facts, Rules, Goals Prolog execution model Arithmetic operations . Recursive Rules B. Use the following Guidelines Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc.) Use tabs or spaces to indent code within blocks (code surrounded by braces). This includes classes, methods, and code associated with ifs, switches and loops. Be consistent with the number of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT