Trying to test Johnson’s algorithm with over 100 vertices but it doesn’t work if there is a negative cycle. So I’m trying to write code to construct graphs with some negative weights (about 10% of the edges) that have NO negative cycles (so that I can test the efficiency of Johnson’s algorithm).
I’m having trouble trying to piecemeal together these graphs. So I really should first try to understand what conditions create negative cycles (beyond having at least one negative edge), but having trouble finding any info in the literature.
Any insights or even reference suggestions are appreciated. Thank you!