Embed
Email

family tree

Document Sample
family tree
Shared by: mahamed alaa
Stats
views:
19
posted:
10/24/2011
language:
English
pages:
3
Case study 3

Family tree



Tom









Bob Liz









Pat

Jim Ann







Facts:

Parents (tom, bob).

Parents (tom, Liz).

Parents (bob, Jim).

Parents (bob, Ann).

Parents (Liz, pat).

Male (tom).

Male (bob).

Female (Liz).

Male (Jim).

Female (Ann).

Male (pat).



Rules:

1- Father (x, y):-

Parent (x, y);

Male (x).

2- Mother (x, y):-

Parent (x, y);

Female (x).



3- Son (X, Y):-

Parent (y, x);

Male (x).



4- Daughter (x, y):-

Parent (y, x);

Female (x).



5- Grand parent (x, y):-

Parent (x, z);

Parent (z, y).



6- Grand father (x, y):-

Father (x, z);

Parent (z, y).



7- Grand Mather (x, y):-

Mather (x, z);

Parent (z, y).





8- Sister (x, y):-

Parent (x, z);

Parent (z, y);

Female (x).



9- Brother (x,y):-

Parent (z,y);

Parent (z,y);

Male (x).

10- Uncle (x, y):-

Brother (x, z);

Parent (z, y).



11- Aunt (x, y):-

Sister (x, z);

Parent (z, y).



12- Predecessor (x, y):-

Parent (x, y).

Or

Parent (x, z);

Predecessor (z, y).



13- off – spring (x, y)

Grandparent (y, x).

Or

Parent (y,z);

Parent (z,y).


Related docs
Other docs by mahamed alaa
DBAdminFund_PPT_4.2
Views: 0  |  Downloads: 0
vector graphic
Views: 34  |  Downloads: 0
cisco configuration
Views: 6  |  Downloads: 0
Concepts of programming _6_
Views: 8  |  Downloads: 0
Concepts of programming _11_
Views: 15  |  Downloads: 0
Exoert system
Views: 17  |  Downloads: 0
Logic Programming
Views: 19  |  Downloads: 0
SEC 12-3-2011-L2
Views: 10  |  Downloads: 0
DBAdminFund_PPT_3.3
Views: 0  |  Downloads: 0
lecture Ch2
Views: 15  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!