- From: Frederic Guinand <frederic.guinand AT univ-lehavre.fr>
- To: sshbeita AT jacada.com
- Cc: graphstream-users AT litislab.fr
- Subject: Re: All possible paths from source node to target node
- Date: Tue, 2 Aug 2016 16:12:46 +0200
Hello Serhan,
What is exactly your question? Do you want to enumerate the paths or do you
want to know the number of paths?
This number is generally exponential in the number of nodes. Just imagine a
graph made of
a -> a_10
a -> a_11
a_1x -> a_20 (x in 0,1)
a_1x -> a_21
a_2x -> a_3x
…
a_(N-1)x -> a_Nx
a_Nx -> b
then you will have 2^N paths:
Unless your graph has some characteristics that could limit this number, do
you really want to enumerate them all?
Best,
Frederic
Le 2 août 2016 à 13:28,
sshbeita AT jacada.com
a écrit :
>
Hi
>
How can I find all possible paths from node to node in a graph?
>
I used Dijkstra but i can find only the shortest ones, i want to find all
>
path
>
in a directed graph.
>
Is there any algorithm in the library helping me doing this?
>
>
thanks
>
serhan
Archives gérées par MHonArc 2.6.16.