Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Convert following sentences into facts used in Prolog program. John is the fa

ID: 3719787 • Letter: 1

Question

1. Convert following sentences into facts used in Prolog program.

John is the father of Susan.

John is the husband of Martha.

Susan eats oranges.

John bought pizza for Martha.

Susan is tired.

John eats a pepperoni pizza.

X and Y are parents of Z if X is the mother of Z and Y is the father of Z

Sparky barks at anyone who walks quickly.

A equals B

A does not equal B

John eats a pepperoni pizza.

X and Y are parents of Z if X is the mother of Z and Y is the father of Z

Sparky barks at anyone who walks quickly.

A equals B

A does not equal B

Explanation / Answer

Answer:

tired(susan).

English Prolog John is the father of Susan. father(john,susan). John is the husband of Martha. husband(john,martha). John eats pizza. eats(john,pizza). Susan eats pizza. eats(susan,pizza). Martha eats pizza. eats(martha,pizza). Susan eats oranges. eats(susan,oranges). John bought pizza for Martha. bought(john,pizza,martha). Susan is tired.

tired(susan).