Introduction to
Logic Programming
What
versus
How
 

Exercise 9.7 - Directed Graphs


Consider a directed graph defined with a unary relation node and a binary base relation edge. Write rules to to determine if the graph is transitive, i.e. whenever there is an arc from x to y and an arc from y to z, then there is an arc from x to z.