in reply to Re: Print all possible paths in a graph and some graph creation too!
in thread Print all possible paths in a graph and some graph creation too!
Imagine, all nodes are bus stops, and the paths are buses. A bus as to stop at all nodes it passes through. So when going from level 1 to level 5, it has to pass through 1 node of each intermediate level.
All I want to do is
1. Create a random graph with 1 starting node, and 4-5 levels, with number of points at each level random. Last level can have one or many nodes, no issues here.
2. Print all possible Paths from A to the end nodes
So its more like a tree where you cannot go from the first level to an intermediate level by skipping the levels between the two.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Print all possible paths in a graph and some graph creation too!
by Ratazong (Monsignor) on Aug 17, 2010 at 07:27 UTC | |
by tsk1979 (Scribe) on Aug 17, 2010 at 08:47 UTC | |
|
Re^3: Print all possible paths in a graph and some graph creation too!
by wol (Hermit) on Aug 19, 2010 at 15:09 UTC |