For a directed graph G(V,E) where it has negative weights, I searched some similar topics and it seems Bellmanford can detect negative cycles. But it stops once negative cycles found, so how can we list all negative cycles in this case?
Given thoughts on Eric Lippert's suggestion, I tried removing negative cycles once found from graph, but I feel this is not correct, why? because the graph changes after cycles are removed and there could be extra non-negative cycles in old graph but not gonna be found in new graph. Can someone please help clear my mind on this issue?
this can be implemented in either java or c# (i prefer c# though)
thanks
java
tag.. – Soner Gönül