Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ...I'm writing a program to find an acyclic_path in a graph (the graph should be define by a person who runs the program...)
I know that the algorithm is in internet but I don't know how can I define a graph in prolog like this :
g([Vertex, ...],[e(Vertex1,Vertex3), ...])
I've found some links but at last I didn't understand what to do....
I'm a begginer in prolog and it's so hard to think in another way of programmin...plz help me!
Posted
Comments
Sergey Alexandrovich Kryukov 27-Dec-12 17:20pm    
Hm... Just a note: Prolog is a pretty much purely declarative logical programming language. If you need some other features, such as the ability to define general data structures, or the features of imperative programming, it all highly depends on the particular implementation. So, the answer may depend on the implementation you use. What is it?
—SA

1 solution

I think here is all, that you need: https://sites.google.com/site/prologsite/prolog-problems/6[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900