Click here to Skip to main content
12,623,511 members (27,840 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: (untagged)
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 27-Dec-12 12:06pm
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100