Finding the minimal subgraph that contains all negative cycles
问题 I'm stuck at the following problem: Given a weighted digraph G, I'd like to construct the minimal subgraph of G that contains all negative (simple) cycles of G. I do know how to find a negative cycle using Bellman-Ford, and I know that the number of simple cycles in a directed graph is exponential. One naive way to approach the problem would be to simply iterate all simple cycles and pick those that are negative, but I have the feeling that there might be a polynomial-time algorithm. Most