paper-BagRelationalPDBsAreHard/Old Sketching Tex Files/exact.tex

52 lines
1.2 KiB
TeX
Raw Normal View History

% -*- root: main.tex -*-
2019-07-24 09:00:08 -04:00
\section{Algorithms}
\label{sec:algorithms}
\subsection{Algorithm for $\gIJ$}
\begin{algorithmic}
\ForAll{$\wVec \in \pw$}
2019-08-26 10:26:51 -04:00
\If{$\hashP{\wVec} = \buck$}
%\If{$\polP{\wVec} = 1$}
\State $\polSum \mathrel{+}=\polP{\wVec}$%+= 1$
2019-07-24 09:00:08 -04:00
%\Else
% \State $\gIJ -= 1$
%\EndIf
\EndIf
\EndFor.
2019-07-15 15:37:20 -04:00
\end{algorithmic}
%Non-general algorithm
%\begin{algorithmic}
%\If {$\matrixH' \cdot \wVec = j^{(0)}$ is consistent}
% \If {$\matrixH' \cdot \wVec = j^{(1)}$ is consistent}
% \State $\gIJ = 0$
% \Else
% \State $\gIJ = 2^{\numTup - computeRank(\matrixH')}$
% \EndIf
%\ElsIf{$\matrixH' \cdot \wVec = \buck^{(1)}$ is consistent}
% \State $\gIJ = 2^{\numTup - computeRank(\matrixH')}$
%\Else
% \State $\gIJ = 0$
%\EndIf.
%\end{algorithmic}
2019-07-24 09:00:08 -04:00
2019-07-15 15:37:20 -04:00
2019-07-16 10:42:17 -04:00
\subsection{Algorithm for Initialization}
\begin{algorithmic}
\ForAll{$\wVec \in \pw \st \kMapParam{\wVec} = 1$}
2019-08-26 10:26:51 -04:00
\State $\sketchJParam{\hashP{\wVec}} = \polP{\wVec}$
2019-07-16 10:42:17 -04:00
\EndFor.
\end{algorithmic}
%Non-generic Algorithm
%\begin{algorithmic}
%\ForAll{$\wVec \st \kMapParam{\wVec} = 1$}
% \State $\buck = \matrixH' \cdot \wVec$
% \If{$\buck(\lenB) = 0$}
% \State $\sketchIj += 1$
% \Else
% \State$\sketchIj -= 1$
% \EndIf
%\EndFor.
%\end{algorithmic}