Finished S2 pass.
parent
513b345ccb
commit
fa241123d5
|
@ -206,7 +206,7 @@
|
|||
\newcommand{\apolyqdt}{\polyqdt{\query}{\pdb}{\tup}}
|
||||
\newcommand{\tupvar}[2]{X_{#1,#2}}
|
||||
\newcommand{\atupvar}{\tupvar{\rel}{\tup}}
|
||||
\newcommand{\polyX}{\poly\inparen{\pVar}}%<---let's see if this proves handy
|
||||
\newcommand{\polyX}{\poly\inparen{\vct{\pVar}}}%<---let's see if this proves handy
|
||||
\newcommand{\rpoly}{\widetilde{\poly}}%r for reduced as in reduced 'Q'
|
||||
\newcommand{\rpolyX}{\rpoly\inparen{\pVar}}%<---if this isn't something we use much, we can get rid of it
|
||||
\newcommand{\biDisProd}{\mathcal{B}}%bidb disjoint tuple products (def 2.5)
|
||||
|
|
2
main.tex
2
main.tex
|
@ -47,7 +47,7 @@ sensitive=true
|
|||
}
|
||||
\lstset{style=psql}
|
||||
%%%%%%%%%%%%%%%%%%BORROWED FROM UADB paper^-----
|
||||
|
||||
\usepackage{wrapfig}
|
||||
\usepackage{fancyvrb}
|
||||
\usepackage{caption}
|
||||
\usepackage{subcaption}
|
||||
|
|
|
@ -149,10 +149,10 @@ Let $\pdb$ be a \abbrBIDB over $\numvar$ input tuples such that the probability
|
|||
\end{equation*}
|
||||
\end{Lemma}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
Note that in the preceding lemma, we have assigned $\vct{p}$
|
||||
%(introduced in \Cref{subsec:def-data})
|
||||
to the variables $\vct{X}$. Intuitively, \Cref{lem:exp-poly-rpoly} states that when we replace each variable $X_i$ with its probability $\prob_i$ in the reduced form of a \bi-lineage polynomial and evaluate the resulting expression in $\mathbb{R}$, then the result is the expectation of the polynomial.
|
||||
By \Cref{lem:exp-poly-rpoly} and linearity of expectation, the following corollary results.
|
||||
%Note that in the preceding lemma, we have assigned $\vct{p}$
|
||||
%%(introduced in \Cref{subsec:def-data})
|
||||
%to the variables $\vct{X}$. Intuitively, \Cref{lem:exp-poly-rpoly} states that when we replace each variable $X_i$ with its probability $\prob_i$ in the reduced form of a \bi-lineage polynomial and evaluate the resulting expression in $\mathbb{R}$, then the result is the expectation of the polynomial.
|
||||
|
||||
|
||||
|
||||
|
|
80
prob-def.tex
80
prob-def.tex
|
@ -11,11 +11,11 @@ We represent lineage polynomials via {\em arithmetic circuits}~\cite{arith-compl
|
|||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{Definition}[Circuit]\label{def:circuit}
|
||||
A circuit $\circuit$ is a Directed Acyclic Graph (DAG) whose source gates (in degree of $0$) consist of elements in either $\domN$ or $\vct{X}$. The internal gates have binary input and are either sum ($\circplus$) or product ($\circmult$) gates.
|
||||
A circuit $\circuit$ is a Directed Acyclic Graph (DAG) whose source gates (in degree of $0$) consist of elements in either $\domN$ or $\vct{X}$. For each output tuple there exists one source gate. The internal gates have binary input and are either sum ($\circplus$) or product ($\circmult$) gates.
|
||||
%
|
||||
Each gate has the following members: \type, \vpartial, \vari{input}, \degval, \vari{Lweight}, and \vari{Rweight}, where \type is the value type $\{\circplus, \circmult, \var, \tnum\}$ and \vari{input} the list of inputs. Source gates have an additional member \val storing the value. $\circuit_\linput$ ($\circuit_\rinput$) denotes the left (right) input.
|
||||
Each gate has the following members: \type, \vpartial, \vari{input}, \degval, \vari{Lweight}, and \vari{Rweight}, where \type is the value type $\{\circplus, \circmult, \var, \tnum\}$ and \vari{input} the list of inputs. Source gates have an additional member \val storing the value. $\circuit_\linput$ ($\circuit_\rinput$) denotes the left (right) input of \circuit.
|
||||
\end{Definition}
|
||||
When the underlying DAG is a tree (with edges pointing towards the root), the structure is an expression tree \etree. In such a case, the root of \etree is analogous to the sink of \circuit. We ignore the fields \vari{partial}, \degval, \vari{Lweight}, and \vari{Rweight} until \Cref{sec:algo}.\AH{\emph{I think} \degval is used only in appendix proofs.}
|
||||
When the underlying DAG is a tree (with edges pointing towards the root), the structure is an expression tree \etree. In such a case, the root of \etree is analogous to the sink of \circuit. The fields \vari{partial}, \degval, \vari{Lweight}, and \vari{Rweight} are used in the proofs of \Cref{sec:proofs-approx-alg}.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
@ -25,36 +25,38 @@ When the underlying DAG is a tree (with edges pointing towards the root), the st
|
|||
|
||||
|
||||
\begin{Example}
|
||||
The circuit \circuit in \Cref{fig:circuit-express-tree} encodes the polynomial $XY + WZ$. Note that circuit \circuit encodes a tree, with edges pointing towards the root.
|
||||
The circuits in \Cref{fig:two-step} encode their respective polynomials in column $\poly$.
|
||||
%\circuit in \Cref{fig:circuit-express-tree} encodes the polynomial $XY + WZ$.
|
||||
Note that each circuit \circuit encodes a tree, with edges pointing towards the root.
|
||||
\end{Example}
|
||||
|
||||
\begin{figure}[t]
|
||||
\begin{subfigure}[b]{0.45\linewidth}
|
||||
\centering
|
||||
\begin{tikzpicture}[thick]
|
||||
\node[tree_node] (a1) at (0, 0){$\boldsymbol{X}$};
|
||||
\node[tree_node] (b1) at (1, 0){$\boldsymbol{Y}$};
|
||||
\node[tree_node] (c1) at (2, 0){$\boldsymbol{W}$};
|
||||
\node[tree_node] (d1) at (3, 0){$\boldsymbol{Z}$};
|
||||
|
||||
\node[tree_node] (a2) at (0.5, 1){$\boldsymbol{\circmult}$};
|
||||
\node[tree_node] (b2) at (2.5, 1){$\boldsymbol{\circmult}$};
|
||||
|
||||
\node[tree_node] (a3) at (1.5, 2){$\boldsymbol{\circplus}$};
|
||||
|
||||
\draw[->] (a1) -- (a2);
|
||||
\draw[->] (b1) -- (a2);
|
||||
\draw[->] (c1) -- (b2);
|
||||
\draw[->] (d1) -- (b2);
|
||||
\draw[->] (a2) -- (a3);
|
||||
\draw[->] (b2) -- (a3);
|
||||
\draw[->] (a3) -- (1.5, 2.5);
|
||||
\end{tikzpicture}
|
||||
\caption{Circuit encoding $XY + WZ$, a special case of an expression tree}
|
||||
\label{fig:circuit-express-tree}
|
||||
\end{subfigure}
|
||||
\hspace{5mm}
|
||||
\begin{subfigure}[b]{0.45\linewidth}
|
||||
%\begin{figure}[t]
|
||||
% \begin{subfigure}[b]{0.45\linewidth}
|
||||
% \centering
|
||||
% \begin{tikzpicture}[thick]
|
||||
% \node[tree_node] (a1) at (0, 0){$\boldsymbol{X}$};
|
||||
% \node[tree_node] (b1) at (1, 0){$\boldsymbol{Y}$};
|
||||
% \node[tree_node] (c1) at (2, 0){$\boldsymbol{W}$};
|
||||
% \node[tree_node] (d1) at (3, 0){$\boldsymbol{Z}$};
|
||||
%
|
||||
% \node[tree_node] (a2) at (0.5, 1){$\boldsymbol{\circmult}$};
|
||||
% \node[tree_node] (b2) at (2.5, 1){$\boldsymbol{\circmult}$};
|
||||
%
|
||||
% \node[tree_node] (a3) at (1.5, 2){$\boldsymbol{\circplus}$};
|
||||
%
|
||||
% \draw[->] (a1) -- (a2);
|
||||
% \draw[->] (b1) -- (a2);
|
||||
% \draw[->] (c1) -- (b2);
|
||||
% \draw[->] (d1) -- (b2);
|
||||
% \draw[->] (a2) -- (a3);
|
||||
% \draw[->] (b2) -- (a3);
|
||||
% \draw[->] (a3) -- (1.5, 2.5);
|
||||
% \end{tikzpicture}
|
||||
% \caption{Circuit encoding $XY + WZ$, a special case of an expression tree}
|
||||
% \label{fig:circuit-express-tree}
|
||||
% \end{subfigure}
|
||||
% \hspace{5mm}
|
||||
\begin{wrapfigure}{l}{0.45\linewidth}
|
||||
\centering
|
||||
\begin{tikzpicture}[thick]
|
||||
\node[tree_node] (a1) at (0, 0) {$\boldsymbol{X}$};
|
||||
|
@ -87,11 +89,10 @@ The circuit \circuit in \Cref{fig:circuit-express-tree} encodes the polynomial $
|
|||
\end{tikzpicture}
|
||||
\caption{Circuit encoding of $(X + 2Y)(2X - Y)$}
|
||||
\label{fig:circuit}
|
||||
\end{subfigure}
|
||||
\caption{Example circuit encodings}
|
||||
\end{figure}
|
||||
|
||||
We next formally define the relationship of circuits with polynomials.
|
||||
\end{wrapfigure}
|
||||
% \caption{Example circuit encodings}
|
||||
%\end{figure}
|
||||
We next formally define the relationship of circuits with polynomials. While the definition assumes one sink for notational convenience, it easily generalizes to the multiple sinks case.
|
||||
\begin{Definition}[$\polyf(\cdot)$]\label{def:poly-func}
|
||||
Denote $\polyf(\circuit)$ to be the function from circuit $\circuit$ to its corresponding polynomial (in \abbrSMB).\footnote{Recall our assumption that unless otherwise mentioned, all polynomials are considered in $\abbrSMB$.} $\polyf(\cdot)$ is recursively defined on $\circuit$ as follows, with addition and multiplication following the standard interpretation for polynomials:
|
||||
\begin{equation*}
|
||||
|
@ -119,11 +120,12 @@ The circuit of \Cref{fig:circuit} is an element of $\circuitset{2X^2+3XY-2Y^2}$.
|
|||
\noindent We are now ready to formally state our \textbf{main problem}.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{Definition}[The Expected Result Multiplicity Problem]\label{def:the-expected-multipl}
|
||||
Let $\vct{X} = (X_1, \ldots, X_n)$ and $\pdb$ be an arbitrary \abbrBIDB-PDB over $\vct{X}$ with probability distribution $\pd$ over assignments $\vct{X} \to \{0,1\}^\numvar$. Fix a query $\query$ and an output tuple $\tup$.
|
||||
Let $\pdb$ be an arbitrary \abbrBIDB-PDB and $\vct{X}$ be the set of variables annotating tuples in $\dbbase$. Fix a query $\query$ and an output tuple $\tup$.
|
||||
The \expectProblem is defined as follows:\\[-7mm]
|
||||
\begin{center}
|
||||
\textbf{Input}: A circuit $\circuit \in \circuitset{\polyX}$ for $\polyX = \query(\pxdb)(t)$
|
||||
\hspace*{5mm}\textbf{Output}: $\expct_{\vct{W} \sim \pd}[\poly(\vct{W})]$
|
||||
\textbf{Input}: $\circuit \in \circuitset{\polyX}$ for $\polyX = \apolyqdt$
|
||||
\hspace*{2mm}
|
||||
\textbf{Output}: $\expct_{\vct{W} \sim \pdassign}[\apolyqdt(\vct{W})]$
|
||||
\end{center}
|
||||
\end{Definition}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
\end{tabular}
|
||||
};
|
||||
%label below rectangle
|
||||
\node[below=0.2cm of rect]{{\LARGE $\query(\pdb)\inparen{\tup}\equiv \poly_\tup\inparen{\vct{X}}$}};
|
||||
\node[below=0.2cm of rect]{{\LARGE $\query(\pdb)\inparen{\tup}\equiv \poly\inparen{\vct{X}}$}};
|
||||
%Second arrow
|
||||
\node[single arrow, right=0.25 of rect, draw=black, fill=black!65, text=white, minimum height=0.75cm, minimum width=0.25cm](arrow2) {\textbf{\abbrStepTwo}};
|
||||
%Expectation computation; (output of step 2)
|
||||
|
|
Loading…
Reference in New Issue