pred(s)
ever changes?If pred(s)
changes after InitSSSP
, it would signify that the algorithm had taken a path through the input graph already that had led it back to s
, meaning that there was some path s -> u-> u_1 ... -> u_k -> s
, and the edge u_k -> s
would have to be tense. This would mean that the cycle was negative, since s
starts with a distance of zero. Thus, the input graph contains a negative cycle that travels back through s
.
Prove that, if the input graph has no negative cycles, then \(P \cup X\) is always a dag.
Prove that, if \(P \cup X\) is always a dag, then the input graph has no negative cycles.
MetaSSSP
, and start by relaxing edges to form a path to this negative cycle from \(s\).Applications: Optimizing transportation, scheduling, distributed systems, image processing, baseball elimination, etc.
Let \(G\) be a directed graph where each edge \(e\) has capacity \(c(e)\).
\[ \sum_a f(a\rightarrow v) = \sum_z f(v \rightarrow z) \] - The value \(|f|\) of a flow \(f\) is the total net flow out of \(s\) (or equivalently, into \(t\).)
\[ |f| = \sum_z f(s \rightarrow z) - \sum_a f(a \rightarrow s) \]
Table #1 | Table #2 | Table #3 | Table #4 | Table #5 | Table #6 | Table #7 |
---|---|---|---|---|---|---|
Levi | Claire | Talia | Bri | Drake | Ethan | Graham |
Kevin | Isaac | Jordan | Josiah | Kristen | James | Blake |
Logan | Andrew | Nathan | John | Grace | Jack | Trevor |
Can you increase the flow in Figure 10.2, keeping it feasible? If so, try to make its value as big as possible.
Let \(G\) be a directed graph where each edge \(e\) has capacity \(c(e)\).
Find a cut in the graph in Figure 10.2, and try to make its capacity as small as possible.
Try to find a flow whose value is bigger than the capacity of the cut that you found.
Lemma. The value of any feasible \((s,t)\)-flow is less than or equal to the capacity of any \((S,T)\)-cut.
Proof.