diff --git a/algo.sty b/algo.sty new file mode 100644 index 0000000..bf6d54c --- /dev/null +++ b/algo.sty @@ -0,0 +1,14 @@ +\def\begin@lg{\begin{minipage}{1in}\begin{tabbing} + \quad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\kill} +\def\end@lg{\end{tabbing}\end{minipage}} + +\newenvironment{algorithm} +{\begin{tabular}{|l|}\hline\begin@lg} +{\end@lg\\\hline\end{tabular}} + +\newenvironment{algo} +{\begin{center}\begin{algorithm}} +{\end{algorithm}\end{center}} + +\def\argmax{\operatornamewithlimits{arg\,max}} +\def\argmin{\operatornamewithlimits{arg\,min}} diff --git a/main.tex b/main.tex index 0bc09b8..cbb6115 100644 --- a/main.tex +++ b/main.tex @@ -1,6 +1,6 @@ \documentclass[12pt]{article} \usepackage{chao} - +\usepackage{algo} \geometry{a4paper,margin=2cm} % \usepackage[breakable, theorems, skins]{tcolorbox} @@ -345,6 +345,22 @@ We can also recover IPCO alg's 2-approximation. Then $\opt(IP)\in [L(\lambda^*),2L(\lambda^*)]$. +\subsection{complexity} + +\begin{algo} +\underbar{\textsc{$b$-free MinCut}}($G,w,c,b$):\\ +compute $\lambda^*$ using parametric search\\ +reweight $G$ with $w_\lambda$\\ +for each 2-approx mincut $C$ in $(G,w_\lambda)$:\\ +\quad run FPTAS for knapsack to compute $\min \set{w(C-F)| F\subset C, c(F)\leq b}$\\ +return the optimal $(C,F)$ +\end{algo} + +\paragraph{time for $\lambda^*$} $L(\lambda)-b\lambda$ is pwl concave. The number of segments is at most the number of lines which has a trivial upperbound of $2^m 2^m$. We need almost linear time to find the solution to a fixed $\lambda$. So parametric seach gives complexity $m^{1+o(1)} O(\log 4^m)$. + +\paragraph{time for the rest parts} Reweighting takes linear time. +Finding 2-approx mincut takes $\tilde O(n^4)$. FPTAS for knapsack takes $O(\frac{1}{\e}m^2)$. The total complexity is $O(\frac{1}{\e}m^2n^4)$. + \bibliographystyle{plain} \bibliography{ref}