\section{LP Decoding using ADMM}%
\label{sec:LP Decoding using ADMM}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{LP Decoding using ADMM}%
\label{sub:LP Decoding using ADMM}

\begin{frame}[t]
    \frametitle{LP Decoding \citereference{FWK05}}

    \vspace*{-3mm}

    \begin{itemize}
        \item General reformulation of ML decoding as a linear program (LP)
%        \item Codeword polytope:
%            \begin{align*}
%                \text{poly}\left( \mathcal{C} \right) =
%                    \left\{
%                        \sum_{\boldsymbol{c}\in\mathcal{C}}\alpha_{\boldsymbol{c}}
%                            \boldsymbol{c} : \alpha_{\boldsymbol{c}} \ge  0,
%                        \sum_{\boldsymbol{c}\in\mathcal{C}}\alpha_{\boldsymbol{c}} = 1
%                    \right\},
%                    \hspace{5mm} \alpha_{\boldsymbol{c}} \in \mathbb{R}_{\ge 0}
%            \end{align*}
        \item Cost function:
            \begin{align*}
                \boldsymbol{\gamma}^{T} \boldsymbol{c} = \sum_{i=1}^{n}
                    \gamma_i c_i,
                \hspace{5mm}\gamma_i = \ln\left(
                    \frac{f_{Y_i \mid C_i}\left( y_i | c_i = 0 \right) }
                    {f_{Y_i \mid C_i}\left(y_i | c_i=1 \right) } \right)
            \end{align*}
        \item Exact \textit{integer linear programming} (ILP) formulation of ML decoding:
            \begin{align*}
                &\text{minimize } \boldsymbol{\gamma}^\text{T} \boldsymbol{c}\\
                &\text{subject to } \boldsymbol{c}\in \mathcal{C}
            \end{align*}
        \item Goal: relaxation of constraints to make a practical solution to the problem feasible
    \end{itemize}

    \bigskip
    \bigskip
    
    \addreference{FWK05}{J. Feldman; M.J. Wainwright; D.R. Karger: \emph{Using linear programming
        to Decode Binary linear codes}.
        IEEE Transactions on Information Theory 51.3 (2005), pp. 954–972.}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
    \frametitle{LP Decoding: Relaxation}

    \vspace*{-1cm}

    \begin{gather*}
%        \boldsymbol{G} =
%            \begin{bmatrix}
%                0 & 1 & 1
%            \end{bmatrix} \hspace{1cm}
        \boldsymbol{H} =
            \begin{bmatrix}
                1 & 1 & 1\\
                0 & 1 & 1
            \end{bmatrix} \hspace{1cm}
%            \\[1em]
        \mathcal{C} = \left\{ \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix},
            \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}   \right\} 
    \end{gather*}%

    \vspace*{-5mm}

    \begin{figure}[H]
        \centering

        \begin{subfigure}[c]{0.4\textwidth}
            \centering

            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]

            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.9, tdplot_main_coords]
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                
                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000] {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
            \end{tikzpicture}
        
            \caption{Set of all codewords $\mathcal{C}$}
            \label{fig:lp:poly:exact_ilp}
        \end{subfigure}%
        \begin{subfigure}[c]{0.16\textwidth}
            \centering
            \begin{tikzpicture}
                \node (relaxation) at (0, 0) {Relaxation};

                \draw (-1.5, 0) -- (relaxation);
                \draw[->] (relaxation) -- (1.5, 0);
            \end{tikzpicture}
        \end{subfigure}%
        \begin{subfigure}[c]{0.4\textwidth}
            \centering

            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]

            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.9, tdplot_main_coords]
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                
                % Polytope Edges

                \draw[line width=1pt, color=KITblue] (c000) -- (c011);
                
                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000] {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
            \end{tikzpicture}
        
            \caption{Codeword polytope $\text{poly}\left( \mathcal{C} \right) $}
            \label{fig:lp:poly:exact}
        \end{subfigure}
    \end{figure}

%    \vspace*{-5mm}

    \begin{align*}
        \text{poly}\left( \mathcal{C} \right) =
            \left\{
                \sum_{\boldsymbol{c}\in\mathcal{C}}\alpha_{\boldsymbol{c}}
                    \boldsymbol{c} : \alpha_{\boldsymbol{c}} \ge  0,
                \sum_{\boldsymbol{c}\in\mathcal{C}}\alpha_{\boldsymbol{c}} = 1
            \right\},
            \hspace{5mm} \alpha_{\boldsymbol{c}} \in \mathbb{R}_{\ge 0}
    \end{align*}
\end{frame}

\begin{frame}[t]
    \frametitle{LP Decoding: Relaxation}
  
    \vspace*{-1cm}

    \begin{figure}[H]
        \centering
   
        \begin{subfigure}[c]{0.48\textwidth}
            \centering

            \begin{minipage}{\textwidth}
                \centering
            
                \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                    draw, circle, inner sep=0pt, minimum size=4pt]

                \tdplotsetmaincoords{60}{25}
                \begin{tikzpicture}[scale=0.7, tdplot_main_coords]
                    \tikzstyle{every node}=[font=\normalsize]

                    % Cube

                    \coordinate (p000) at (0, 0, 0);
                    \coordinate (p001) at (0, 0, 2);
                    \coordinate (p010) at (0, 2, 0);
                    \coordinate (p011) at (0, 2, 2);
                    \coordinate (p100) at (2, 0, 0);
                    \coordinate (p101) at (2, 0, 2);
                    \coordinate (p110) at (2, 2, 0);
                    \coordinate (p111) at (2, 2, 2);

                    \draw[] (p000) -- (p100);
                    \draw[] (p100) -- (p101);
                    \draw[] (p101) -- (p001);
                    \draw[] (p001) -- (p000);

                    \draw[dashed] (p010) -- (p110);
                    \draw[]       (p110) -- (p111);
                    \draw[]       (p111) -- (p011);
                    \draw[dashed] (p011) -- (p010);

                    \draw[dashed] (p000) -- (p010);
                    \draw[]       (p100) -- (p110);
                    \draw[]       (p101) -- (p111);
                    \draw[]       (p001) -- (p011);

                    % Polytope Vertices

                    \node[codeword] (c000) at (p000) {};
                    \node[codeword] (c101) at (p101) {};
                    \node[codeword] (c110) at (p110) {};
                    \node[codeword] (c011) at (p011) {};

                    % Polytope Edges & Faces

                    \draw[line width=1pt, color=KITblue] (c000) -- (c101);
                    \draw[line width=1pt, color=KITblue] (c000) -- (c110);
                    \draw[line width=1pt, color=KITblue] (c000) -- (c011);

                    \draw[line width=1pt, color=KITblue] (c101) -- (c110);
                    \draw[line width=1pt, color=KITblue] (c101) -- (c011);

                    \draw[line width=1pt, color=KITblue] (c011) -- (c110);
                    
                    \fill[KITblue, opacity=0.15] (p000) -- (p101) -- (p011) -- cycle;
                    \fill[KITblue, opacity=0.15] (p000) -- (p110) -- (p101) -- cycle;
                    \fill[KITblue, opacity=0.15] (p110) -- (p011) -- (p101) -- cycle;

                    % Polytope Annotations

                    \node[color=KITblue, below=0cm of c000]    {$\left( 0, 0, 0 \right) $};
                    \node[color=KITblue, right=0.07cm of c101] {$\left( 1, 0, 1 \right) $};
                    \node[color=KITblue, right=0cm of c110]    {$\left( 1, 1, 0 \right) $};
                    \node[color=KITblue, above=0cm of c011]    {$\left( 0, 1, 1 \right) $};

                    \node[color=KITblue, align=center] at (-4,1)
                        {$j=1$\\ $\left( c_1 + c_2+ c_3 = 0 \right) $};
                \end{tikzpicture}
            \end{minipage}

            \vspace{5mm}

            \begin{minipage}{\textwidth}
                \centering

                \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                    draw, circle, inner sep=0pt, minimum size=4pt]

                \tdplotsetmaincoords{60}{25}
                \begin{tikzpicture}[scale=0.7, tdplot_main_coords]
                    \tikzstyle{every node}=[font=\normalsize]

                    % Cube

                    \coordinate (p000) at (0, 0, 0);
                    \coordinate (p001) at (0, 0, 2);
                    \coordinate (p010) at (0, 2, 0);
                    \coordinate (p011) at (0, 2, 2);
                    \coordinate (p100) at (2, 0, 0);
                    \coordinate (p101) at (2, 0, 2);
                    \coordinate (p110) at (2, 2, 0);
                    \coordinate (p111) at (2, 2, 2);

                    \draw[] (p000) -- (p100);
                    \draw[] (p100) -- (p101);
                    \draw[] (p101) -- (p001);
                    \draw[] (p001) -- (p000);

                    \draw[dashed] (p010) -- (p110);
                    \draw[]       (p110) -- (p111);
                    \draw[]       (p111) -- (p011);
                    \draw[dashed] (p011) -- (p010);

                    \draw[dashed] (p000) -- (p010);
                    \draw[]       (p100) -- (p110);
                    \draw[]       (p101) -- (p111);
                    \draw[]       (p001) -- (p011);

                    % Polytope Vertices

                    \node[codeword] (c000) at (p000) {};
                    \node[codeword] (c011) at (p011) {};
                    \node[codeword] (c100) at (p100) {};
                    \node[codeword] (c111) at (p111) {};

                    % Polytope Edges & Faces

                    \draw[line width=1pt, color=KITblue] (c000) -- (c011);
                    \draw[line width=1pt, color=KITblue] (c000) -- (c100);
                    \draw[line width=1pt, color=KITblue] (c100) -- (c111);
                    \draw[line width=1pt, color=KITblue] (c111) -- (c011);

                    \fill[KITblue, opacity=0.2] (p000) -- (p100) -- (p111) -- (p011) -- cycle;

                    % Polytope Annotations

                    \node[color=KITblue, below=0cm of c000] {$\left( 0, 0, 0 \right) $};
                    \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
                    \node[color=KITblue, below=0cm of c100] {$\left( 1, 0, 0 \right) $};
                    \node[color=KITblue, above=0cm of c111] {$\left( 1, 1, 1 \right) $};

                    \node[color=KITblue, align=center] at (-4,1)
                        {$j=2$\\ $\left(c_2 + c_3 = 0\right)$};
                \end{tikzpicture}
            \end{minipage}

            \caption{Local codeword polytopes $\mathcal{P}_{d_j}$ of the check nodes}
            \label{fig:lp:poly:local}
        \end{subfigure}%
        \begin{subfigure}[c]{0.18\textwidth}
            \centering
            \begin{tikzpicture}
                \draw[densely dashed] (0, -2) -- (0, 2);
                \draw[densely dashed] (-0.5, -2) -- (0, -2);
                \draw[densely dashed] (-0.5, 2) -- (0, 2);
                
                \node (intersection) at (1.5, 0) {Intersection};

                \draw[densely dashed] (0, 0) -- (intersection);
                \draw[densely dashed, ->] (intersection) -- (3,0);
            \end{tikzpicture}
        \end{subfigure}%
        \begin{subfigure}[c]{0.32\textwidth}
            \centering
        
            \vspace*{1.5cm}
            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]
            \tikzstyle{pseudocodeword} = [color=KITred, fill=KITred,
                                draw, circle, inner sep=0pt, minimum size=4pt]

            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.9, tdplot_main_coords]    
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                \node[pseudocodeword] (cpseudo) at (2, 1, 1) {};
 
                % Polytope Edges & Faces
                
                \draw[line width=1pt, color=KITblue] (c000) -- (c011);
                \draw[line width=1pt, color=KITred] (cpseudo) -- (c000);
                \draw[line width=1pt, color=KITred] (cpseudo) -- (c011);

                \fill[KITred, opacity=0.2] (p000) -- (p011) -- (2,1,1) -- cycle;

                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000]   {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
                \node[color=KITred, right=0cm of cpseudo]
                    {$\left( 1, \frac{1}{2}, \frac{1}{2} \right) $};
            \end{tikzpicture}
           
            \vspace*{-5mm}

            \begin{gather*}
                \boldsymbol{T}_j\tilde{\boldsymbol{c}} \in \mathcal{P}_{d_j}, \hspace{2mm}
                \forall j\in \mathcal{J} \\[0.5em]
                    \boldsymbol{T}_j \in \mathbb{F}_2^{d_j \times n}
            \end{gather*}
        
            \vspace*{-2mm}

            \caption{Relaxed codeword polytope $\overline{Q}$}
            \label{fig:lp:poly:relaxed}
        \end{subfigure}
    \end{figure}
\end{frame}


\begin{frame}[t]
    \frametitle{LP Decoding: Relaxation}
  
    \vspace{-5mm}

    \begin{figure}[H]
        \centering

        \begin{subfigure}[t]{0.3\textwidth}
            \centering
            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]
            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.8, tdplot_main_coords]
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                
                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000] {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
            \end{tikzpicture}

            \begin{align*}
                \text{minimize}\hspace{2mm} &\boldsymbol{\gamma}^\text{T} \boldsymbol{c} \\
                \text{subject to}\hspace{2mm} &\boldsymbol{c} \in \mathcal{C}
            \end{align*}

            \caption{\textit{Integer linear program} (ILP)}
        \end{subfigure}%
        \hfill%
        \begin{subfigure}[t]{0.3\textwidth}
            \centering
            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]
            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.8, tdplot_main_coords]
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                
                % Polytope Edges

                \draw[line width=1pt, color=KITblue] (c000) -- (c011);
                
                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000] {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
            \end{tikzpicture}

            \begin{align*}
                \text{minimize}\hspace{2mm} &\boldsymbol{\gamma}^\text{T} \tilde{\boldsymbol{c}} \\
                \text{subject to}\hspace{2mm} &\tilde{\boldsymbol{c}} \in
                    \text{poly}\left( \mathcal{C} \right) &\
            \end{align*}

            \caption{Motivation}
        \end{subfigure}%
        \hfill%
        \begin{subfigure}[t]{0.3\textwidth}
            \centering
            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
                                draw, circle, inner sep=0pt, minimum size=4pt]
            \tikzstyle{pseudocodeword} = [color=KITred, fill=KITred,
                                draw, circle, inner sep=0pt, minimum size=4pt]
            \tdplotsetmaincoords{60}{25}
            \begin{tikzpicture}[scale=0.8, tdplot_main_coords]
                \tikzstyle{every node}=[font=\normalsize]

                % Cube

                \coordinate (p000) at (0, 0, 0);
                \coordinate (p001) at (0, 0, 2);
                \coordinate (p010) at (0, 2, 0);
                \coordinate (p011) at (0, 2, 2);
                \coordinate (p100) at (2, 0, 0);
                \coordinate (p101) at (2, 0, 2);
                \coordinate (p110) at (2, 2, 0);
                \coordinate (p111) at (2, 2, 2);

                \draw[] (p000) -- (p100);
                \draw[] (p100) -- (p101);
                \draw[] (p101) -- (p001);
                \draw[] (p001) -- (p000);

                \draw[dashed] (p010) -- (p110);
                \draw[]       (p110) -- (p111);
                \draw[]       (p111) -- (p011);
                \draw[dashed] (p011) -- (p010);

                \draw[dashed] (p000) -- (p010);
                \draw[]       (p100) -- (p110);
                \draw[]       (p101) -- (p111);
                \draw[]       (p001) -- (p011);

                % Polytope Vertices

                \node[codeword] (c000) at (p000) {};
                \node[codeword] (c011) at (p011) {};
                \node[pseudocodeword] (cpseudo) at (2, 1, 1) {};
 
                % Polytope Edges & Faces
                
                \draw[line width=1pt, color=KITblue] (c000) -- (c011);
                \draw[line width=1pt, color=KITred] (cpseudo) -- (c000);
                \draw[line width=1pt, color=KITred] (cpseudo) -- (c011);

                \fill[KITred, opacity=0.2] (p000) -- (p011) -- (2,1,1) -- cycle;

                % Polytope Annotations

                \node[color=KITblue, below=0cm of c000]   {$\left( 0, 0, 0 \right) $};
                \node[color=KITblue, above=0cm of c011] {$\left( 0, 1, 1 \right) $};
                \node[color=KITred, right=0cm of cpseudo]
                    {$\left( 1, \frac{1}{2}, \frac{1}{2} \right) $};
            \end{tikzpicture}
            
            \begin{align*}
                \text{minimize}\hspace{2mm} &\boldsymbol{\gamma}^\text{T} \tilde{\boldsymbol{c}} \\
                \text{subject to}\hspace{2mm} &
                    \boldsymbol{T}_j\tilde{\boldsymbol{c}} \in \mathcal{P}_{d_j}, \hspace{2mm}
                        \forall j\in \mathcal{J}
            \end{align*}

            \caption{\textit{Linear code linear program} (LCLP)}
        \end{subfigure}%
    \end{figure}

    \vspace*{-5.75cm}
    \begin{figure}[H]
        \centering
        
        \begin{subfigure}[t]{0.36\textwidth}
            \centering

            \begin{tikzpicture}
                \node (relaxation) at (0, 0) {Relaxation};

                \draw[->] (-1, -0.25) -- (1, -0.25);
%                \draw (-1.5, 0) -- (relaxation);
%                \draw[->] (relaxation) -- (1.5, 0);
            \end{tikzpicture}
        \end{subfigure}%
        \begin{subfigure}[t]{0.31\textwidth}
            \centering
            \begin{tikzpicture}
                \node (relaxation) at (0, 0) {Relaxation};

                \draw[->] (-1, -0.25) -- (1, -0.25);
%                \draw (-1.5, 0) -- (relaxation);
%                \draw[->] (relaxation) -- (1.5, 0);
            \end{tikzpicture}
        \end{subfigure}%
    \end{figure}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
    \frametitle{LP Decoding using ADMM}

    \vspace*{-4mm}

    \begin{itemize}
        \item Solution using the \textit{alternating direction method of multipliers} (ADMM)
            \citereference{$\text{Bar}^+\text{13}$}
        \item Slight reformulation of the LCLP:
            \begin{align*}
                \begin{aligned}
                    \text{minimize}\hspace{2mm} &\boldsymbol{\gamma}^\text{T}
                        \tilde{\boldsymbol{c}}
                        + \sum_{j\in\mathcal{J}} g_j\left( \boldsymbol{z}_j \right) \\
                    \text{subject to}\hspace{2mm} &
                        \boldsymbol{T}_j\tilde{\boldsymbol{c}} = \boldsymbol{z}_j, \hspace{2mm}
                            \forall j\in \mathcal{J}
                \end{aligned}\hspace{2mm},\hspace{1cm}
                g_j\left( \boldsymbol{t} \right)  := \begin{cases}
                        0, & \boldsymbol{t} \in \mathcal{P}_{d_j} \\
                        +\infty, & \boldsymbol{t} \not\in \mathcal{P}_{d_j}
                    \end{cases}
            \end{align*}
        \item Iterative algorithm:
            \begin{alignat*}{3}
                \tilde{\boldsymbol{c}} &\leftarrow \argmin_{\tilde{\boldsymbol{c}}}
                    \boldsymbol{\gamma}^\text{T}\tilde{\boldsymbol{c}}
                    + \frac{\mu}{2}\sum_{j\in\mathcal{J}} \left\Vert
                        \boldsymbol{T}_j\tilde{\boldsymbol{c}} - \boldsymbol{z}_j
                        + \boldsymbol{u}_j \right\Vert \\
                \boldsymbol{z}_j &\leftarrow \argmin_{\boldsymbol{z}_j}
                    g\left( \boldsymbol{z}_j \right)
                    + \frac{\mu}{2} \left\Vert \boldsymbol{T}_j \tilde{\boldsymbol{c}}
                    - \boldsymbol{z}_j + \boldsymbol{u}_j \right\Vert,
                    \hspace{5mm} &&\forall j\in\mathcal{J} \\
                \boldsymbol{u}_j &\leftarrow \boldsymbol{u}_j
                    + \boldsymbol{T}_j\tilde{\boldsymbol{c}} - \boldsymbol{z}_j,
                    \hspace{5mm} &&\forall j\in\mathcal{J}
%                    \left( g\left( \boldsymbol{\boldsymbol{z}_j} \right)
%                    + \frac{\mu}{2} \left\Vert \boldsymbol{T}_j\tilde{\boldsymbol{c}}
%                    - \boldsymbol{z}_j + \boldsymbol{u}_j\right\Vert \right) 
            \end{alignat*}
    \end{itemize} 

    \bigskip

    \addreference{$\text{Bar}^+\text{13}$}{Siddharth Barman et al.:
        \emph{Decomposition Methods for Large Scale LP Decoding}.
        IEEE Transactions on Information Theory 59.12 (2013), pp. 7870–7886.}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
    \frametitle{LP Decoding using ADMM}
   
    \vspace*{-7mm}

    \begin{itemize}
        \item Convergence properties enhanced by over-relaxation with parameter $\rho$
        \item Simplified rules:
%            \footnote{$\left( \boldsymbol{z}_j \right)_i $ is a slight abuse of notation.
%            What is actually meant is the component of $\boldsymbol{z}_j$ that is associated
%            with the VN $i$, i.e., $\left( \boldsymbol{T}_j^\text{T}
%                \boldsymbol{z}_j \right)_i$.\\
%            The same is true for $\left( \boldsymbol{u}_j \right)_i$}:

            \vspace*{-4mm}

            \begin{alignat*}{3}
                \tilde{c}_i &\leftarrow \frac{1}{\left| N_v\left( i \right) \right|} \left( 
                    \sum_{j\in N_v\left( i \right) } \Big( \left( \boldsymbol{z}_j \right)_i
                        - \left( \boldsymbol{u}_j \right)_i \Big)
                    - \frac{\gamma_i}{\mu} \right)
                \hspace{5mm} && \forall i\in\mathcal{I} \\
                \boldsymbol{z}_j &\leftarrow \Pi_{\mathcal{P}_{d_j}}\left(
                    \rho \boldsymbol{T}_j\tilde{\boldsymbol{c}} - \boldsymbol{z}_j
                    \left( 1-\rho \right) + \boldsymbol{u}_j \right)
                \hspace{5mm} && \forall j\in\mathcal{J} \\
                \boldsymbol{u}_j &\leftarrow \boldsymbol{u}_j
                    + \rho \boldsymbol{T}_j\tilde{\boldsymbol{c}}
                    - \left( 1-\rho \right) \boldsymbol{z}_j
                    - \boldsymbol{z}_j
                \hspace{5mm} && \forall j\in\mathcal{J}
            \end{alignat*}

            \vspace*{2mm}

        \item The projections $\Pi_{\mathcal{P}_{d_j}}, \hspace{1mm} j\in\mathcal{J}$
            are the main computational effort
        \item Many approaches exist \citereference{$\text{Bar}^+\text{13}$},
            \citereference{ZS13}, \citereference{$\text{Gen}^+\text{20}$}
        \item The approach chosen here is the one described in
            \citereference{$\text{Bar}^+\text{13}$}
    \end{itemize}
    
    \bigskip
    \bigskip

    \addreferences
        {$\text{Bar}^+\text{13}$}{Siddharth Barman et al.:
            \emph{Decomposition Methods for Large Scale LP Decoding}.
            IEEE Transactions on Information Theory 59.12 (2013), pp. 7870–7886.}
        {ZS13}{Xiaojie Zhang; Paul H. Siegel: \emph{Efficient iterative LP decoding
            of LDPC codes with alternating direction method of multipliers}.
            2013 IEEE International Symposium on Information Theory. 2013, pp. 1501–1505.}
        {$\text{Gen}^+\text{20}$}{Florian Gensheimer et al.:
            \emph{A Reduced-Complexity Projection Algorithm for ADMM-Based LP Decoding}. 
            IEEE Transactions on Information Theory 66.8 (2020), pp. 4819–4833.}
    \stopreferences
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%    \frametitle{LP Relaxation}
%
%    \begin{minipage}[c]{0.6\linewidth}
%        \begin{itemize}
%            \item Set of all variable nodes incident to a check node:
%                \begin{align*}
%                    N\left( j \right) \equiv \left\{
%                        i | i\in \mathcal{I},
%                        \boldsymbol{H}_{j,i} = 1
%                    \right\},
%                    j \in \mathcal{J}
%                \end{align*}
%                \begin{align*}
%                    S \subseteq N\left( j \right), \left| S \right| \text{odd}
%                \end{align*}
%            \item Relaxed polytope representation:
%                \begin{align*}
%                    \sum_{i\in \left( N\left( j \right) \setminus S\right) } f_i
%                        + \sum_{i\in S} \left( 1 - f_i \right) \ge 1
%                \end{align*}
%                ``$\boldsymbol{f}$ is separated by at least one bitflip
%                from all illegal configurations''
%        \end{itemize}
%    \end{minipage}%
%    \hfill%
%    \begin{minipage}[c]{0.4\linewidth}
%        \begin{figure}[H]
%            \centering
%
%            \tikzstyle{codeword} = [color=KITblue, fill=KITblue,
%                                    draw, circle, inner sep=0pt, minimum size=4pt]
%
%            \tdplotsetmaincoords{60}{245}
%            \begin{tikzpicture}[scale=1, transform shape, tdplot_main_coords]
%                % Cube
%
%                \draw[dashed] (0, 0, 0) -- (2, 0, 0);
%                \draw[dashed] (2, 0, 0) -- (2, 0, 2);
%                \draw[] (2, 0, 2) -- (0, 0, 2);
%                \draw[] (0, 0, 2) -- (0, 0, 0);
%
%                \draw[] (0, 2, 0) -- (2, 2, 0);
%                \draw[] (2, 2, 0) -- (2, 2, 2);
%                \draw[] (2, 2, 2) -- (0, 2, 2);
%                \draw[] (0, 2, 2) -- (0, 2, 0);
%
%                \draw[] (0, 0, 0) -- (0, 2, 0);
%                \draw[dashed] (2, 0, 0) -- (2, 2, 0);
%                \draw[] (2, 0, 2) -- (2, 2, 2);
%                \draw[] (0, 0, 2) -- (0, 2, 2);
%
%                % Codeword Polytope
%
%                \draw[line width=1pt, color=KITblue] (0, 0, 0) -- (2, 0, 2);
%                \draw[line width=1pt, color=KITblue] (0, 0, 0) -- (2, 2, 0);
%                \draw[line width=1pt, color=KITblue] (0, 0, 0) -- (0, 2, 2);
%
%                \draw[line width=1pt, color=KITblue] (2, 0, 2) -- (2, 2, 0);
%                \draw[line width=1pt, color=KITblue] (2, 0, 2) -- (0, 2, 2);
%
%                \draw[line width=1pt, color=KITblue] (0, 2, 2) -- (2, 2, 0);
%
%                % Polytope Annotations
%
%                \node[codeword, color=KITred] (c111) at (2, 2, 2) {};% {$\left( 0, 0, 0 \right) $};
%                \node[codeword, color=KITred] (c001) at (0, 0, 2) {};% {$\left( 1, 0, 1 \right) $};
%                \node[codeword, color=KITred] (c100) at (2, 0, 0) {};% {$\left( 1, 1, 0 \right) $};
%                \node[codeword, color=KITred] (c010) at (0, 2, 0) {};% {$\left( 0, 1, 1 \right) $};
%
%                \node[color=KITred, left=0cm of c111] {$\left( 1, 1, 1 \right) $};
%                \node[color=KITred, right=0cm of c001] {$\left( 0, 0, 1 \right) $};
%                \node[color=KITred, right=0.35cm of c100] {$\left( 1, 0, 0 \right) $};
%                \node[color=KITred, below=0cm of c010] {$\left( 0, 1, 0 \right) $};
%            \end{tikzpicture}
%            \caption{Relaxed polytope for $n=3$}
%        \end{figure}
%    \end{minipage}
%    \todo{How is this a relaxation and not just an alternative formulation?
%        We have just switched out valid codewords for invalid ones}
%    \todo{Is LP Relaxation relevant as theoretical background?}
%\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Analysis of Simulation Results}%
\label{sub:Analysis of Simulation Results}

\begin{frame}[t]
    \frametitle{LP Decoding using ADMM: Frame Error Rate}

    \vspace*{-6mm}

    \begin{itemize}
        \item ``Margulis'' LDPC code with $n = 2640$, $k = 1320$  
            \citereference{Mac23, Margulis2640.1320.3}
        \item Comparison of simulation with results from Barman et al.
            \citereference{$\text{Bar}^+\text{13}$}
    \end{itemize}

    \bigskip

    \begin{figure}[H]
        \centering

        \begin{tikzpicture}
            \begin{axis}[
                grid=both,
                xlabel={$E_b / N_0 \left( \text{dB} \right) $}, ylabel={FER},
                ymode=log,
                width=0.45\textwidth,
                height=0.325\textwidth,
                %legend style={at={(0.03,0.04)},anchor=south west},
                legend pos=outer north east,
                legend cell align={left},
            ]
                \addplot[Emerald, line width=1pt, mark=*]
                    table [col sep=comma, x=SNR, y=FER,
                           discard if gt={SNR}{2.2},
                           ]
                        {res/admm/fer_paper_margulis.csv};
                \addlegendentry{ADMM \citereference{$\text{Bar}^+\text{13}$}}
                \addplot[NavyBlue, mark=*, line width=1pt, densely dashed]
                    table [col sep=comma, x=SNR, y=FER,]
                        {res/admm/ber_margulis264013203.csv};
                \addlegendentry{ADMM (Own results)}
                \addplot[RoyalPurple, line width=1pt, mark=*]
                    table [col sep=comma, x=SNR, y=FER, discard if gt={SNR}{2.2},]
                        {res/generic/fer_bp_mackay_margulis.csv};
                \addlegendentry{BP \citereference{$\text{Bar}^+\text{13}$}}
            \end{axis}
        \end{tikzpicture}
    \end{figure}%
   
    \smallskip

    \addreferences
        {Mac23}{David J.C. MacKay: \emph{Encyclopedia of Sparse Graph Codes}.
            Jan. 2023. URL: \url{http://www.inference.org.uk/mackay/codes/data.html}.}
        {$\text{Bar}^+\text{13}$}{Siddharth Barman et al.:
            \emph{Decomposition Methods for Large Scale LP Decoding}.
            IEEE Transactions on Information Theory 59.12 (2013), pp. 7870–7886.}
    \stopreferences
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
    \frametitle{LP Decoding using ADMM: Choice of Penalty\\
        Parameters}

    \vspace*{-5mm}

    \begin{itemize}
        \item (3,6) regular LDPC code with $n=204, k=102$ \citereference{Mac23, 204.33.484}
        \item Similar to $\gamma$ with proximal decoding: no clear optimum
    \end{itemize}

    \bigskip

    \begin{figure}[H]
        \centering

        \begin{subfigure}[c]{0.48\textwidth}
            \centering
        
            \begin{tikzpicture}
                \begin{axis}[
                    grid=both,
                    xlabel={$\mu$}, ylabel={FER},
                    ymode=log,
                    width=0.8\textwidth,
                    height=0.6\textwidth,
                ]
                    \addplot[ForestGreen, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=FER,
                               discard if not={SNR}{2.0},]
                            {res/admm/ber_2d_20433484.csv};
                    \addplot[NavyBlue, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=FER,
                               discard if not={SNR}{3.0},]
                            {res/admm/ber_2d_20433484.csv};
                    \addplot[RedOrange, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=FER,
                               discard if not={SNR}{4.0},]
                            {res/admm/ber_2d_20433484.csv};
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}%
        \begin{subfigure}[c]{0.48\textwidth}
            \centering
        
            \begin{tikzpicture}
                \begin{axis}[
                    grid=both,
                    xlabel={$\rho$}, ylabel={FER},
                    ymode=log,
                    width=0.8\textwidth,
                    height=0.6\textwidth,
                ]
                    \addplot[ForestGreen, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=FER,
                               discard if not={SNR}{2.0},]
                            {res/admm/ber_2d_20433484_rho.csv};
                    \addplot[NavyBlue, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=FER,
                               discard if not={SNR}{3.0},]
                            {res/admm/ber_2d_20433484_rho.csv};
                    \addplot[RedOrange, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=FER,
                               discard if not={SNR}{4.0},]
                            {res/admm/ber_2d_20433484_rho.csv};
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}%

        \begin{subfigure}[t]{\textwidth}
            \centering

            \begin{tikzpicture}
                \begin{axis}[hide axis,
                             xmin=10, xmax=50,
                             ymin=0, ymax=0.4,
                             legend columns=3,
                             legend style={draw=white!15!black,legend cell align=left}]

                    \addlegendimage{ForestGreen, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{2}{dB}$}
                    \addlegendimage{RedOrange, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{3}{dB}$}
                    \addlegendimage{NavyBlue, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{4}{dB}$}
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}
    \end{figure}%

    \bigskip

    \addreference{Mac23}{David J.C. MacKay: \emph{Encyclopedia of Sparse Graph Codes}.
        Jan. 2023. URL: \url{http://www.inference.org.uk/mackay/codes/data.html}.}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
    \frametitle{LP Decoding using ADMM: Choice of Penalty\\
        Parameters}
   
    \vspace*{-5mm}

    \begin{itemize}
        \item (3,6) regular LDPC code with $n=204, k=102$ \citereference{Mac23, 204.33.484}
        \item For lower decoding time, choose low $\mu$ and high $\rho$
    \end{itemize}

    \bigskip

    \begin{figure}[H]
        \centering

        \begin{subfigure}[c]{0.48\textwidth}
            \centering
        
            \begin{tikzpicture}
                \begin{axis}[
                    grid=both,
                    xlabel={$\mu$}, ylabel={Average \# of iterations},
                    width=0.8\textwidth,
                    height=0.6\textwidth,
                ]
                    \addplot[ForestGreen, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=k_avg,
                               discard if not={SNR}{2.0},]
                            {res/admm/mu_kavg_20433484.csv};
                    \addplot[NavyBlue, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=k_avg,
                            discard if not={SNR}{3.0},]
                            {res/admm/mu_kavg_20433484.csv};
                    \addplot[RedOrange, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=mu, y=k_avg,
                               discard if not={SNR}{4.0},]
                            {res/admm/mu_kavg_20433484.csv};
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}%
        \begin{subfigure}[c]{0.48\textwidth}
            \centering
        
            \begin{tikzpicture}
                \begin{axis}[
                    grid=both,
                    xlabel={$\rho$}, ylabel={Average \# of iterations},
                    width=0.8\textwidth,
                    height=0.6\textwidth,
                ]
                    \addplot[ForestGreen, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=k_avg,
                               discard if not={SNR}{2.0},]
                            {res/admm/rho_kavg_20433484.csv};
                    \addplot[NavyBlue, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=k_avg,
                               discard if not={SNR}{3.0},]
                            {res/admm/rho_kavg_20433484.csv};
                    \addplot[RedOrange, line width=1pt, densely dashed, mark=*]
                        table [col sep=comma, x=rho, y=k_avg,
                               discard if not={SNR}{4.0},]
                            {res/admm/rho_kavg_20433484.csv};
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}%
        
        \begin{subfigure}[t]{\textwidth}
            \centering

            \begin{tikzpicture}
                \begin{axis}[hide axis,
                             xmin=10, xmax=50,
                             ymin=0, ymax=0.4,
                             legend columns=3,
                             legend style={draw=white!15!black,legend cell align=left}]

                    \addlegendimage{ForestGreen, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{2}{dB}$}
                    \addlegendimage{RedOrange, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{3}{dB}$}
                    \addlegendimage{NavyBlue, line width=1pt, densely dashed, mark=*}
                    \addlegendentry{$E_b / N_0 = \SI{4}{dB}$}
                \end{axis}
            \end{tikzpicture}
        \end{subfigure}
    \end{figure}%
    
    \smallskip
    \smallskip
    \smallskip

    \addreference{Mac23}{David J.C. MacKay: \emph{Encyclopedia of Sparse Graph Codes}.
        Jan. 2023. URL: \url{http://www.inference.org.uk/mackay/codes/data.html}.}
\end{frame}

