Jump to content

Datalog Queries for Transitive Closure (Graph Theory)

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
kzahid

kzahid

    Newbie

  • Members
  • Pip
  • 3 posts
A road segment between 2 cities X and Y is represented using two tuples r(E,X) and e(E,Y); c(X) means X is a City. How can following be expressed in datalog query/stratified datalog


Any Help would be appreciated

Thanks

Edited by kzahid, 14 October 2010 - 05:40 PM.


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
1) this is equivalent to every circuit has an even number of vertices
2) this is equivalent to every pair of vertices is part of a circuit
3) this is equivalent to the graph is Eulerian
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
kzahid

kzahid

    Newbie

  • Members
  • Pip
  • 3 posts
Thank you for the reply.
Still not clear to me, is it possible if I get an example of expressing the above statments in datalog query or any URL that can help me in this regard?

Thanks

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I'm not familiar with datalog. I don't know if this site will help: Datalog User Manual
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
kzahid

kzahid

    Newbie

  • Members
  • Pip
  • 3 posts
Ok, Thanks, atleast I got some idea of what these pbs are all about.