35 lines
734 B
Text
35 lines
734 B
Text
//Alexander Huddleston
|
|
//CSCE 420
|
|
//Due: November 15, 2017
|
|
//README.txt
|
|
|
|
run gprolog
|
|
[hw3prX].
|
|
|
|
problem 1 expects arguments:
|
|
|
|
my_sort(Unsorted, Sorted).
|
|
|
|
problem 2 expects arguments:
|
|
|
|
my_topo_sort(Partial_order, Total_order).
|
|
|
|
problem 3 can tell you these relations:
|
|
|
|
is_spouse(X, Y). NOTE: Only expected to be used in the rest of the definitions.
|
|
is_child(X, Y). NOTE: Only expected to be used in the rest of the definitions.
|
|
|
|
grandchild(X, Y).
|
|
greatgrandparent(X, Y).
|
|
ancestor(X, Y).
|
|
brother(X, Y).
|
|
sister(X, Y).
|
|
daughter(X, Y).
|
|
son(X, Y).
|
|
first_cousin(X, Y).
|
|
brother_in_law(X, Y).
|
|
sister_in_law(X, Y).
|
|
aunt(X, Y).
|
|
uncle(X, Y).
|
|
|
|
cousin(X, Y). NOTE: This just called first_cousin(X, Y), since a cousin is a synonym for first cousin.
|