Each step from one node to another is a multiplication.
So for instance given the entry node TE and an entry value of 1.
TE = 1
TB = 1/10010
GB = 999/(10010*1000)
GE = (19990*999)/(10010*1000)
and so on.
I want to find the best path from TE to TE to return the highest value.
In this case is
TE TB GB GE TE = 1,993010988
I tried to apply Dijkstra's SPF but it doesn't work because each step can increment or decrement so it's not monotone
neither Bellman–Ford algorithm is applicable here because the graph contains negative cycle. (e.g. TE TB TE).
Anyone has some clue if this problem has a solution ?