From c7f6a7f3b74335d3b9a821db6e0aabc4dba093b7 Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Mon, 12 Oct 2015 09:53:02 +0200
Subject: Finish assignment 6

---
 assignment6.tex | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'assignment6.tex')

diff --git a/assignment6.tex b/assignment6.tex
index 60cd0bb..b60e779 100644
--- a/assignment6.tex
+++ b/assignment6.tex
@@ -226,11 +226,21 @@
 
             Intuitively we reduce the maximum flow problem in a graph with vertex capacities $(V,E)$ to the standard maximum flow problem in $(V',E')$, where we take $s'_i$ as start node and $t'_o$ as termination node.
 
-    \item %todo
+    \item First, we run Ford-Fulkerson. Then, for every edge $(v,w,c)$ in the residual graph we see if adding an edge $(w,v,1)$ would allow us to continue running the algorithm (i.e., there would be a path $s\leadsto t$). If so, $(v,w)$ is a bottleneck edge, because if the capacity had been higher, Ford-Fulkerson would have continued running after the point that we stopped at.
 
-    \item %todo
+        This runs in $f + \pazocal O(|E|\cdot|V|)\cdot p$, where $f$ is the running time of Ford-Fulkerson and $p$ the running time of the path finding algorithm, because we first run Ford-Fulkerson and then check for every edge if adding a reserve results in a path $s\leadsto t$.
 
-    \item %todo
+    \item This reduces to the bipartite matching problem, where we match reviewers and articles, and of which we saw in the lecture that it reduces to the maximum flow problem. In addition to that, we have to give every node a limit (namely $m_A$ and $m_B$). We saw already how to reduce such a problem to the maximum flow problem in exercise 2.
+
+        Therefore, this problem can be represented as a maximum flow problem.
+
+    \item We first find a path $s\leadsto t$ through $(u,v)$ where for every edge $e$ we have $r(e)>0$. If there is no such path, the flow $f$ we found already is correct. This takes $\pazocal O(|V|+|E|)$.
+
+        If there is such a path, we decrease the rates of all the edges by $1$, such that we have a valid flow ($f-1$) again. This takes $\pazocal O(|E|)$.
+
+        Finally, we see if there is a path $s\leadsto t$ in the residual graph. We know that we can increase the flow by at most $1$, so we only have to do this once. If there is a path in the residual graph, we have flow $f$ -- if not, we have flow $f-1$. This final step takes $\pazocal O(|V|+|E|)$.
+
+        In total, this takes $\pazocal O(|V|+|E|)$.
 
 \end{enumerate}
 
-- 
cgit v1.2.3

