I have a directed acyclic graph where each node represents a state
public class State{ List<State> ForwardStates; string stateName; }
where ForwardStates is a list of the following states from the current state.
I have two special conditions
State initialState (name=initial) State finalState (name=final)
I want to find all the paths in the beginning from the initial state to the final state and is populated in
List<List<string>> paths
For example, this chart is as follows

paths must contain the value {{"Start", "a", "final"}, {"start", "b", "final"}}
How can I easily achieve this in C # without recursion (since the graph can be large)?
c # algorithm
william007 Jan 31 '13 at 17:41 2013-01-31 17:41
source share