Click here to Skip to main content
13,301,619 members (69,638 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
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?

1 solution

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

Solution 1


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 |
Web04 | 2.8.171207.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2017
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