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, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
question
Computers and Technology, 24.06.2019 17:30
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
You know the right answer?
Family Given are some facts in the following form.

male(jack).
male(oliver).
Questions
question
Mathematics, 02.08.2021 05:40
question
History, 02.08.2021 05:40
question
Mathematics, 02.08.2021 05:40
question
Mathematics, 02.08.2021 05:50