subject

Family Given are some facts in the following form.

male(jack).
male(oliver).
male(ali).
male(james).
male(simon).
male(harry).
female(helen).
female(sophie).
female(jess).
female(lily).
parent(jack, jess).
parent(jack, lily).
parent(helen, jess).
parent(helen, lily).
parent(oliver, james).
parent(sophie, james).
parent(jess, simon).
parent(ali, simon).
parent(lily, harry).
parent(james, harry).

where male/1 and female/1 state the gender of a person, and parent/2 means that the first argument is a parent of the second (in this case Jack is a parent of Jess).

Write the following predicates:
• mother/2
• father/2
• grandmother/2
• grandfather/2
• ancestor/2

Example execution:

?- father(ali, X)
X = simon

?- grandfather(jack, X).
X = simon
X = harry

?- ancestor(X, Y).
X = jack, Y = jess
X = jack, Y = lily
X = helen, Y = jess

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
Write a program that inserts the digits of an integer into an array in originalorderfollowed by reverse order. first, promptthe user to enter a positive integer(> 0). determine the number of digits of the integer. create a dynamically allocated integer arrayof a size twice the number of digits.now insert the digits in original order which will occupy half of the array. then, insert the digits in reverse order.finally, output thedigits in thearray.use at least two functions to organize your program.
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
You know the right answer?
Family Given are some facts in the following form.

male(jack).
male(oliver).
Questions
question
Mathematics, 08.12.2020 01:00
question
Mathematics, 08.12.2020 01:00
question
Mathematics, 08.12.2020 01:00
question
Mathematics, 08.12.2020 01:00
Questions on the website: 13722361