Top "Transitive-closure" questions

Use this tag for the transitive closure of a relationship or when related to graph theory.

Define graph in Prolog: edge and path, finding if there is a path between two vertices

I'm very new to Prolog. I defined in graph.pl the following graph: And here's my Prolog code: edge(a,…

prolog graph-theory transitive-closure
Depth First Search Algorithm Prolog

I am hoping you could help me with this. I am trying to learn about Depth First search algorithm in …

algorithm prolog depth-first-search transitive-closure
Prolog "Out of local stack" Error

Here is my simple Prolog program: friend(X,Y):- knows(X,Y). friend(X,Z):- friend(X,Y), …

prolog failure-slice transitive-closure