I have found a solution https://sites.google.com/site/prologsite/prolog-problems/6
6.03 (*) Cycle from a given node, but I cant put it together.
enter formula
allCycles([h(f,c),h(g,h),h(f,b),h(k,f),h(h,g)],f,Out).
?
Hello guys,
Im way beginner in Proglog therefore Id really appreciate a help with this...
The input is a graph which generally is not a tree. Program supposes to print all cycles of the graph for the specified node of the graph, which is the element of the given node.
thanx for any response!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.