Prolog Primer with family.pl Questions

The student should be good at
Computer Science, in particular the student should be good at the simple Prolog
programming language from Computer Science. e.g. Use the following program when
searching with Prolog:    
 ancestor( X, Y ) :-    
    parent( X, Y ).    
 ancestor( X, Y ) :-  
      parent( X, Z ),        
 ancestor( Z, Y ). 
So, given a string of parent facts, the program returns true if there is an
ancestral link given as input. The main goal when using Prolog is to narrow down
methodologies to objects cycling through objects, for example, a flute player
‘recursively’ blows air into a flute, for example, he or she repeatedly blows
until he or she has counted up to a certain number, in the same way that the
ancestor program recursively calls itself. This is how the student will
approach the next task.
% Program:  family.pl
% Source:   Prolog
%
% Purpose:  This is the sample program for the Prolog Lab
in COMP9414.
%           It is a simple Prolog program to
demonstrate how prolog works.
%           See lab.html for a full description.
%
% History:  Original code by Barry Drake, adapted to
SWI-Prolog by Bill Wilson
% parent(Parent, Child)
%
parent(albert, jim).
parent(albert, peter).
parent(jim, brian).
parent(john, darren).
parent(peter, lee).
parent(peter, sandra).
parent(peter, james).
parent(peter, kate).
parent(peter, kyle).
parent(brian, jenny).
parent(irene, jim).
parent(irene, peter).
parent(pat, brian).
parent(pat, darren).
parent(amanda, jenny).
% female(Person)
%
female(irene).
female(pat).
female(lee).
female(sandra).
female(jenny).
female(amanda).
female(kate).
% male(Person)
%
male(albert).
male(jim).
male(peter).
male(brian).
male(john).
male(darren).
male(james).
male(kyle).
% yearOfBirth(Person, Year).
%
yearOfBirth(irene, 1923).
yearOfBirth(pat, 1954).
yearOfBirth(lee, 1970).
yearOfBirth(sandra, 1973).
yearOfBirth(jenny, 2004).
yearOfBirth(amanda, 1979).
yearOfBirth(albert, 1926).
yearOfBirth(jim, 1949).
yearOfBirth(peter, 1945).
yearOfBirth(brian, 1974).
yearOfBirth(john, 1955).
yearOfBirth(darren, 1976).
yearOfBirth(james, 1969).
yearOfBirth(kate, 1975).
yearOfBirth(kyle, 1976).
% ----------------------
% 
Questions Start Here
% ----------------------
% 1. grandparent(Grandparent,
Grandchild)
% means Grandparent is a
grandparent of Grandchild
% 2. older(A,B)
% means A is older than B
% 3. siblings(A,B)
% means A and B are siblings
% 4. sibling_list(Child, Siblings)
% Siblings is a list of Child's
brothers and sisters
% 5. olderBrother(A,B)
% means A is an older brother of B
% 6. descendant(Person, Descendant)
% means Descendant is a descendant
of Person.
% 7. ancestor(Person, Ancestor)
% means Ancestor is an ancestor of
Person.
% 8. children(Parent, ChildList)
% ChildList is bound to a list of
the children of Parent.
% 9. listCount(List, Count)
% Count is bound to the number of
elements in List.
% 10. countDescendants(Person, Count)
% Count is bound to the number of
descentants of Person.