This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/6_Plat/SPneg.md
Benjamin Qi 84cc6bcebd + PAPS
2020-06-22 21:00:35 -04:00

1.7 KiB

id title author prerequisites description
sp-neg Shortest Paths with Negative Edge Weights Benjamin Qi
Gold - Shortest Paths with Non-Negative Edge Weights
Applications of Bellman-Ford.
  • Hasn't appeared in recent USACO Gold as far as I know.
  • If no negative cycles, can use Shortest Path Faster Algorithm or modify Dijkstra slightly (though the same running time bound no longer applies).

Tutorial

Problems

Simple Linear Programming

You can also use shortest path algorithms to solve the following problem (a very simple linear program).

Given variables x_1,x_2,\ldots,x_N with constraints in the form x_i-x_j\ge c, compute a feasible solution.

Problems