Finding all the possible paths from a digraph

Hi every one,

Please is there a way I can find all the possible paths from my graph. Below is what the graph looks like, and the code I used to generate it. Thank you.

def drawGraph(transitions, probabilities):

G = Digraph('process_model', filename='Pdummycsv.gv')

G.attr(rankdir='LR', size='7,5')

G.attr('node', shape='doublecircle', style="filled", fillcolor="grey")



G.attr('node', shape='box', style="bold")

for i in range(0,len(transitions)):

  G.attr('edge', style="bold", penwidth='3.0', label=str(probabilities[i]))

  fromto = transitions[i].split("<-->")

  G.edge(fromto[0], fromto[1])


return G

y = decomposeResult(predicted_dataset)

link, probabilities, sequences = linkAndProbabilities(y)

drawGraph(link, probabilities)

Information about counting paths for a directed acyclic graph (DAG) is readily available on the Internet.
However your graph seems to be cyclic:

  • Start -> a -> h -> a
  • Start -> a -> b -> d ->a
  • Start -> a -> h -> f -> d ->a