mirror of
https://github.com/janishutz/eth-summaries.git
synced 2025-11-26 02:54:24 +00:00
[AW] Update summary to new version of helpers
This commit is contained in:
@@ -16,20 +16,20 @@ Most algorithms for the max-flow problem use a residual network, where $\mathcal
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
|
||||
The problem with this algorithm is that it may not terminate for irrational capacities. If we however only consider integral networks without bidirectional edges, it can be easily seen that if we denote $U \in \N$ the upper bound for capacities, the time complexity of this algorithm is \tco{nUm} where \tco{m} is the time complexity for constructing residual network.
|
||||
The problem with this algorithm is that it may not terminate for irrational capacities. If we however only consider integral networks without bidirectional edges, it can be easily seen that if we denote $U \in \N$ the upper bound for capacities, the time complexity of this algorithm is $\tco{nUm} where \tco{m}$ is the time complexity for constructing residual network.
|
||||
\begin{theorem}[]{Max-Flow Algorithm}
|
||||
If in a network without bidirectional edges and all capacities integral and no larger than $U$, there is an integral max-flow we can compute in \tco{mnU}, whereas $m$ is the number of edges and $n$ the number of vertices in the network.
|
||||
If in a network without bidirectional edges and all capacities integral and no larger than $U$, there is an integral max-flow we can compute in $\tco{mnU}$, whereas $m$ is the number of edges and $n$ the number of vertices in the network.
|
||||
\end{theorem}
|
||||
|
||||
There are more advanced algorithms than this one that can calculate solutions to this problem faster or also for irrational numbers.
|
||||
For the following two proposition, $m = |E|$ and $n = |V|$, i.e. $m$ is the number of edges and $n$ the number of vertices
|
||||
|
||||
\begin{proposition}[]{Capacity-Scaling}
|
||||
If in a network all capacities are integral and at most $U$, there exists an integral max-flow that can be computed in \tco{mn(1 + \log(U))}
|
||||
If in a network all capacities are integral and at most $U$, there exists an integral max-flow that can be computed in $\tco{mn(1 + \log(U))}$
|
||||
\end{proposition}
|
||||
|
||||
\begin{proposition}[]{Dynamic-Trees}
|
||||
The max-flow of a flow in a network can be calculated in \tco{mn\log(n)}
|
||||
The max-flow of a flow in a network can be calculated in $\tco{mn\log(n)}$
|
||||
\end{proposition}
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ In the following section we use \textit{multigraphs}.
|
||||
|
||||
We define $\mu(G)$ to be the cardinality of the \textit{min-cut} (this is the problem).
|
||||
This problem is similar to the min-cut problem for flows, only that we have a multigraph now. We can however replace multiple edges with a single, weighted edge, allowing us to use the algorithms discussed above.
|
||||
Since we need to compute $(n - 1)$ $s$-$t$-cuts, our total time complexity is \tco{n^4 \log(n)}, since we can compute $s$-$t$-cuts in \tco{n^3\log(n)} = \tco{n\cdot m\log(n)}
|
||||
Since we need to compute $(n - 1)$ $s$-$t$-cuts, our total time complexity is $\tco{n^4 \log(n)}$, since we can compute $s$-$t$-cuts in $\tco{n^3\log(n)} = \tco{n\cdot m\log(n)}$
|
||||
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ Of note is that there is a bijection: $\text{Edges in G without the ones between
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
|
||||
If we assume that we can perform edge contraction in \tco{n} and we can choose a uniformly random edge in $G$ in \tco{n} as well, it is evident that we can compute \textsc{Cut}($G$) in \tco{n^2}
|
||||
If we assume that we can perform edge contraction in $\tco{n}$ and we can choose a uniformly random edge in $G$ in $\tco{n}$ as well, it is evident that we can compute \textsc{Cut}($G$) in $\tco{n^2}$
|
||||
|
||||
\begin{lemma}[]{Random edge contraction}
|
||||
If $e$ is uniformly randomly chosen from the edges of multigraph $G$, then we have
|
||||
@@ -155,10 +155,10 @@ Thus, we repeat the algorithm \textsc{Cut}$(G)$ $\lambda {n \choose 2}$ times fo
|
||||
\begin{theorem}[]{\textsc{Cut}$(G)$}
|
||||
For the algorithm that runs \textsc{Cut}$(G)$ $\lambda{n \choose 2}$ times we have the following properties:
|
||||
\begin{enumerate}[label=(\arabic*)]
|
||||
\item Time complexity: \tco{\lambda n^4}
|
||||
\item Time complexity: $\tco{\lambda n^4}$
|
||||
\item The smallest found value is with probability at least $1 - e^{-\lambda}$ equal to $\mu(G)$
|
||||
\end{enumerate}
|
||||
\end{theorem}
|
||||
If we choose $\lambda = \ln(n)$, we have time complexity \tco{n^4 \ln(n)} with error probability \textit{at most} $\frac{1}{n}$
|
||||
If we choose $\lambda = \ln(n)$, we have time complexity $\tco{n^4 \ln(n)}$ with error probability \textit{at most} $\frac{1}{n}$
|
||||
|
||||
Of note is that for low $n$, it will be worth it to simply deterministically determine the min-cut
|
||||
|
||||
Reference in New Issue
Block a user