Introduction to
Logic Programming
What
versus
How
 

Exercise 9.8 - 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 acyclic, i.e. there is no sequence of arcs connecting a node to itself.