[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] spanningtree
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] spanningtree |
Date: |
Mon, 8 Mar 2010 11:19:32 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
> Is there a way to find spanning trees with the flexibility of
> choosing the source vertex and is there a way to run BFS or DFS to
> end up with a spanning tree?
I assume that you are interested in an arbitrary spanning tree only and
not all of them (or those that satisfy some criterion). In this case,
calculating all the shortest paths from a given source vertex to all
others will give you a spanning tree if the graph is connected. If you
are using R, try graph.bfs() and set the "father" argument to TRUE. The
result vector will contain a $father component that gives you the
"parent" of each vertex in the BFS tree. Connecting each vertex with its
parent will give you a spanning tree.
--
Tamas
- [igraph] i can't find it, but there must be an easy was to reduce a graph, Yannick Rochat, 2010/03/06
- Re: [igraph] i can't find it, but there must be an easy was to reduce a graph, harun pirim, 2010/03/06
- Re: [igraph] i can't find it, but there must be an easy was to reduce a graph, Yannick Rochat, 2010/03/07
- [igraph] spanningtree, harun pirim, 2010/03/07
- Re: [igraph] spanningtree,
Tamas Nepusz <=
- RE: [igraph] spanningtree, Harun Pirim, 2010/03/08
- RE: [igraph] spanningtree, Harun Pirim, 2010/03/08
- Re: [igraph] spanningtree, Gábor Csárdi, 2010/03/08
- RE: [igraph] spanningtree, Harun Pirim, 2010/03/08
- Re: [igraph] spanningtree, Gábor Csárdi, 2010/03/08
- RE: [igraph] spanningtree, Harun Pirim, 2010/03/08
- Re: [igraph] spanningtree, Gábor Csárdi, 2010/03/09