Prolog Noob Question

jwill22

Junior Member
Mar 16, 2013
3
0
0
http://www.flickr.com/photos/7563768...in/photostream

Tried the problem up above but I'm pretty confident I'm wrong. I'm using clingo by the way running from the command prompt. Am I doing this right?

vertex(a).
vertex(b).
vertex(c).
vertex(d).
vertex(e).

edge(a,b).
edge(b,a).
edge(a,c).
edge(c,a).
edge(b,d).
edge(c,d).
edge(d,e).
edge(e,b).

connected(X,Y) :- edge(X,Y),
edge(Y,X).






Thanks for any help. Sorry for posting in the wrong forum earlier :oops:
 

TridenT

Lifer
Sep 4, 2006
16,800
45
91
http://www.flickr.com/photos/7563768...in/photostream

Tried the problem up above but I'm pretty confident I'm wrong. I'm using clingo by the way running from the command prompt. Am I doing this right?

vertex(a).
vertex(b).
vertex(c).
vertex(d).
vertex(e).

edge(a,b).
edge(b,a).
edge(a,c).
edge(c,a).
edge(b,d).
edge(c,d).
edge(d,e).
edge(e,b).

connected(X,Y) :- edge(X,Y),
edge(Y,X).






Thanks for any help. Sorry for posting in the wrong forum earlier :oops:

Well, since the link is giving a 404...