Traverse all edges, at least once.

429 views
Skip to first unread message

2rs1

unread,
Apr 7, 2012, 5:31:11 AM4/7/12
to networkx-discuss
Hi. Is there an algorithm or a simple way in networkx to go through
the graph (directed) and traverse all edges? Using an edge multiple
times is not a problem, I just need to be sure every edge is visited
at least once.

Say I got this graph:
http://imgur.com/bVxBT
If I call G.some_method('IDLE') it returns ['t1', 't2', 't3', 't8',
't1', 't2', 't6'].

Regards,
Kristian

Dan Schult

unread,
Apr 7, 2012, 11:15:13 AM4/7/12
to networkx...@googlegroups.com

On Apr 7, 2012, at 5:31 AM, 2rs1 wrote:

> Hi. Is there an algorithm or a simple way in networkx to go through
> the graph (directed) and traverse all edges? Using an edge multiple
> times is not a problem, I just need to be sure every edge is visited
> at least once.

Maybe I am missing something, but why doesn't G.edges() work?


Daπid

unread,
Apr 8, 2012, 6:00:13 AM4/8/12
to networkx...@googlegroups.com
On Sat, Apr 7, 2012 at 5:15 PM, Dan Schult <dsc...@colgate.edu> wrote:
> Maybe I am missing something, but why doesn't G.edges() work?

I think he wants a walkable path. The next edge should start where the
previous ended.

Eric BEAUSSART

unread,
Apr 10, 2012, 10:43:30 AM4/10/12
to networkx...@googlegroups.com
Sirs,
I didn't succeed to let "NetworkX" in my computer even if between 1980 and 1996,
I have been first in Computer'maintenance, then Analyst-programmer, least writer of
Technical Documents such as "User's Manuals" in this field and others !
But I have always been more in Theory than in Practice !

So, when the question asks for an Algorithm to a "Walkable Path along all the Edges
of a Graph", I can't provide as others elements of Code, but I can say :  
This Problem is the "Koenigsberg Bridges Problem" that Euler himself studied and
then Founded the Graphs Theory

So, you can ask : "How to find the "Eulerian" of a Graph, the name of such a Path, and 
when written, you can name "Eulerian Provider" ! 
I will maybe check my Data about Graph Theory to see if I find this Algorithm, but I am 
sure that Programmers will be faster than me ! 
But here it is the pityful status of Mathematics that worry me ! 
Every time there is people to look again for things solved Years ago !
Mathematicians provided since Euler a lot of Facts about Graph Numbers and Algorithms 
to find them as : Eulerian, Laplacian, Lagrangian, two Hamiltonians, etc. 
But no one, no Sofware Provider, show they know about ! 
Too bad ! So long ! 
Eric Beaussart. 


> Message du 08/04/12 12:00
> De : "Daπid"
> A : networkx...@googlegroups.com
> Copie à :
> Objet : Re: [networkx-discuss] Traverse all edges, at least once.

>
> On Sat, Apr 7, 2012 at 5:15 PM, Dan Schult wrote:
> > Maybe I am missing something, but why doesn't G.edges() work?
>
> I think he wants a walkable path. The next edge should start where the
> previous ended.
>
> --
> You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
> To post to this group, send email to networkx...@googlegroups.com.
> To unsubscribe from this group, send email to networkx-discu...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/networkx-discuss?hl=en.
>
>
Reply all
Reply to author
Forward
0 new messages