The Gryffindor table

The following picture shows who is sitting at the Gryffindor table. Define the functor sits_right_of/2 to represent who is sitting right of whom. sits_right_of(X,Y) should be true if X is to the right of Y.


Solution

Based on this knowledge base, formulate the rules defining the following predicates:

Test your implementation by asking queries. For example:


Last modified: Thu Dec 2 11:17:38 CET 2004