subject

1. Assuming the parent relation as defined in the following piece of Prolog code, what will be Prolog's answers to the following questions?
parent (pam, bob).
parent (tom, bob).
parent (tom, liz).
parent (bob, ann).
parent (bob, pat).
parent (pat, jim).
a) ?- parent (jim, x).
b) ?- parent (X, jim).
c) ?- parent (pam, X),parent (X, pat).
d) ?- parent (pam, X), parent (X, Y), parent (Y, jim).
2. Formulate in Prolog the following questions about the parent relation:
a) Who is Pat's parent?
b) Does Liz have a child?
c) Who is Pat's grandparent?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
You know the right answer?
1. Assuming the parent relation as defined in the following piece of Prolog code, what will be Prol...
Questions
question
Mathematics, 22.08.2019 02:50
question
Chemistry, 22.08.2019 02:50
question
Geography, 22.08.2019 02:50
question
History, 22.08.2019 02:50
Questions on the website: 13722360