Artificial Intelligence Lab CS793C

1.WRITE A PROGRAM TO FIND OUT GRANDPARENT AND SIBLING OF A PARTICULAR MEMBER FROM A GIVEN FAMILY TREE SOURCE CODE parent(  pam,  bob). parent(  tom,  bob). parent(  tom, liz). parent(  bob,  ann). parent(  bob,  pat). parent(  pat,  jim). grandparent(X,Z):- parent(X,Y),parent(Y,Z). sibling(X,Y):- parent(X,Z),parent(Y,Z). OUTPUT % c:/users/bum/documents/prolog/parent compiled 0.00 sec, 9 clauses 1 ?- |    grandparent(X,ann). X … Read more

Pin It on Pinterest

Open chat