Question: (I) (s pointo) Write a Prolog program for the followings with the given data and s save it as your-last- name.pl. You need the operator
(I) (s pointo) Write a Prolog program for the followings with the given data and s save it as your-last- name.pl. You need the operator "not" (V-Specify the value of X and Y in each question. fatherinlaw(X,Y): X is a father-in-law of Y o test fatherinlaw(X,) 2. motherinlaw(x,Y): X is a mother-in-law of Y o test motherinlaw(X,Y). 3. ancestor(X,Y): X is an ancestor of Y o test ancestor(X, cathy) 4. des(X,Y): X is a descendent of Y o test des(X, brondie). 5. greatgrand(X,Y) : X is a great grandparent of Y o test greatgrand(x,eva). 6. cousin(X,Y) : X is a cousin of Y o test cousin(chris, Y). 7. nephew(X,Y): X is a nephew of Y o test nephew (X,Y). 8. uncle(X,Y): X is an uncle of Y o test uncle(X,Y). Given data is as follows male(thomas). female(kathy). parent(thomas, abraham). parent (abraham, benjamin) parent(abraham, brondie). parent(abraham, brown) parent(brondie, cathy). parent(brondie, cecil). parent(brown, chris) parent(brown, clown). parent(cathy, dane). parent(cecil, doug). parent(chris, dune). parent(dane, eva). parent(ace, babara). parent(babara, chuck). parent(bradely, chuck). parent(alton, cathy). parent(judy, cathy). wife(cathy, chuck). male(ace). male(brown). male(benjamin). female(cathy). female(babara) female(brondie). male(chuck). male(alton). male(bradely) (I) (s pointo) Write a Prolog program for the followings with the given data and s save it as your-last- name.pl. You need the operator "not" (V-Specify the value of X and Y in each question. fatherinlaw(X,Y): X is a father-in-law of Y o test fatherinlaw(X,) 2. motherinlaw(x,Y): X is a mother-in-law of Y o test motherinlaw(X,Y). 3. ancestor(X,Y): X is an ancestor of Y o test ancestor(X, cathy) 4. des(X,Y): X is a descendent of Y o test des(X, brondie). 5. greatgrand(X,Y) : X is a great grandparent of Y o test greatgrand(x,eva). 6. cousin(X,Y) : X is a cousin of Y o test cousin(chris, Y). 7. nephew(X,Y): X is a nephew of Y o test nephew (X,Y). 8. uncle(X,Y): X is an uncle of Y o test uncle(X,Y). Given data is as follows male(thomas). female(kathy). parent(thomas, abraham). parent (abraham, benjamin) parent(abraham, brondie). parent(abraham, brown) parent(brondie, cathy). parent(brondie, cecil). parent(brown, chris) parent(brown, clown). parent(cathy, dane). parent(cecil, doug). parent(chris, dune). parent(dane, eva). parent(ace, babara). parent(babara, chuck). parent(bradely, chuck). parent(alton, cathy). parent(judy, cathy). wife(cathy, chuck). male(ace). male(brown). male(benjamin). female(cathy). female(babara) female(brondie). male(chuck). male(alton). male(bradely)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
