[AW] Update summary to new version of helpers

This commit is contained in:
2025-09-26 12:19:22 +02:00
parent 6ac6ee24cc
commit 33f034fdd1
16 changed files with 57 additions and 50 deletions

View File

@@ -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}

View File

@@ -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

View File

@@ -18,10 +18,10 @@ The graph $G'$ fulfills the above implication because
Let's assume $v_1 = v$ (the vertex removed during construction). However, $\langle \hat{v_2}, v_2, \ldots, \hat{v_n}, v_n \rangle$ is a path of length $n$
\item Let $\langle u_0, u_1, \ldots, u_n \rangle$ be a path of length $n$ in $G'$ and let $\deg(u_i) \geq 2 \smallhspace \forall i \in \{1, \ldots, n - 1\}$ These vertices hence have to be the $n - 1$ remaining vertices of $G$, thus we have $u_0 = \hat{w_i}$ and $u_n = \hat{w_j}$ two different ones of new vertices of degree $1$ in $G'$. Thus, we have $u_1 = w_i$ and $u_{n - 1} = w_j$ and we have $\langle v, u_1, \ldots, u_{n - 1}, v \rangle$, which is a Hamiltonian cycle in $G$
\end{enumerate}
Due to the construction of the graph $G'$ we can generate it from $G$ in \tco{n^2} steps. We thus have:
Due to the construction of the graph $G'$ we can generate it from $G$ in $\tco{n^2}$ steps. We thus have:
\begin{theorem}[]{Long Path Problem}
If we can find a \textit{long-path} in a graph with $n$ vertices in time $t(n)$, we can decide if a graph with $n$ vertices has a Hamiltonian cycle in $t(2n - 2) + \text{\tco{n^2}}$
If we can find a \textit{long-path} in a graph with $n$ vertices in time $t(n)$, we can decide if a graph with $n$ vertices has a Hamiltonian cycle in $t(2n - 2) + \tco{n^2}$
\end{theorem}
@@ -73,7 +73,7 @@ For the algorithm, we need to also define $N(v)$ which returns the neighbours of
\EndProcedure
\end{algorithmic}
\end{algorithm}
The time complexity of this algorithm is \tco{2^k km}. If we now have $k = \text{\tco{\log(n)}}$, the algorithm is polynomial.
The time complexity of this algorithm is $\tco{2^k km}$. If we now have $k = \tco{\log(n)}$, the algorithm is polynomial.
\shade{ForestGreen}{Random colouring}
@@ -91,7 +91,7 @@ For our algorithm we choose a $\lambda > 1 \in \R$ and we repeat the test at mos
\begin{theorem}[]{Random Colouring Algorithm}
\begin{itemize}
\item Time complexity: \tco{\lambda(2e)^k km}
\item Time complexity: $\tco{\lambda(2e)^k km}$
\item If we return ``\textsc{Yes}'', the graph is \textit{guaranteed} to contain a path of length $k - 1$
\item If we return ``\textsc{No}'', the probability of false negative is $e^{-\lambda}$
\end{itemize}