关于差分约束(转载)
关于差分约束(转载)
(本文假设读者已经有以下知识:最短路径的基本性质、Bellman-Ford算法。) 比如有这样一组不等式:
$$ \begin{cases} X1 - X2 <= 0 \\ X1 - X5 <= (-1) \\ X2 - X5 <= 1 \\ X3 - X1 <= 5 \\ X4 - X1 <= 4 \\ X4 - X3 <= (-1) \\ X5 - X3 <= (-3) \\ X5 - X4 <= (-3) \end{cases} $$(1)
关于差分约束(转载)
(本文假设读者已经有以下知识:最短路径的基本性质、Bellman-Ford算法。) 比如有这样一组不等式:
$$ \begin{cases} X1 - X2 <= 0 \\ X1 - X5 <= (-1) \\ X2 - X5 <= 1 \\ X3 - X1 <= 5 \\ X4 - X1 <= 4 \\ X4 - X3 <= (-1) \\ X5 - X3 <= (-3) \\ X5 - X4 <= (-3) \end{cases} $$(1)