More poly-formulation.

master
Aaron Huber 2020-06-17 10:58:02 -04:00
parent 9c59544bef
commit 48afe29b9c
2 changed files with 36 additions and 5 deletions

View File

@ -9,6 +9,16 @@
\newcommand{\poly}{Q}
\newcommand{\rpoly}{\widetilde{Q}}%r for reduced as in reduced 'Q'
\newcommand{\out}{output}%output aggregation over the output vector
\newcommand{\numocc}[1]{\#\left(G, #1\right)}
%Graph Symbols
\newcommand{\ed}{|}
\newcommand{\twodis}{\|}
\newcommand{\twopath}{\land}
\newcommand{\threedis}{| | |}
\newcommand{\tri}{\triangle}
\newcommand{\twopathdis}{| \land}
\newcommand{\threepath}{\sqcap}
\newcommand{\oneint}{\Upilson}
%David's Scheme
\newcommand{\vecform}[1]{\textbf{#1}}%auxiliary cmd to use only with macros, so that we can change the format easily if need be
\newcommand{\sone}{\vecform{x}}

View File

@ -26,7 +26,7 @@ First, note the following fact:
For all $b \in \{0, 1\}$ and all $e \geq 1$, $b^e = 1$.\qed
\end{proof}
Assuming each tuple has a probability $\prob = 0.5$, we note that
Assuming each tuple has a probability $\prob = \frac{1}{2}$, we note that
\begin{Property}\label{prop:l1-rpoly-numTup}
The L-1 norm of Q is equal to $\rpoly$ times the number of possible worlds, $|\wSet| = 2^\numTup$.
\begin{equation*}
@ -38,12 +38,12 @@ The L-1 norm of Q is equal to $\rpoly$ times the number of possible worlds, $|\w
Using the fact above, we need to compute \[\sum_{(\wbit_1,\ldots, \wbit_\numTup) \in \{0, 1\}}\rpoly(\wbit_1,\ldots, \wbit_\numTup)\]. We therefore argue that
\[\sum_{(\wbit_1,\ldots, \wbit_\numTup) \in \{0, 1\}}\rpoly(\wbit_1,\ldots, \wbit_\numTup) = 2^\numTup \cdot \rpoly(\frac{1}{2},\ldots, \frac{1}{2}).\]
Note that for any single monomial, this is indeed the case since 1) each tuple appears in a possible world with probability of $\frac{1}{2}$, 2) the value $2^\numTup$ is the number of worlds, and 3) the product of expectation and total number of worlds yields and exact result.
Note that for any single monomial, this is indeed the case since the variables in a single monomial are independent and their joint probability equals the product of the probabilities of each variable in the monomial, i.e., for monomial $M$, $\prob[M] = \prod_{x_i \in M}\prob[x_i].$ This is equivalent to the sum of all probabilities of worlds where each variable in $M$ is a $1$. Since $1$ is the identity element, it is also the case that $\prod_{x_i \in M}\prob[x_i] = \ex{M}$. (Note all other terms in the expectation will not contribute since $M$ will equal $0$, and a product containing a factor of $0$ always equals $0$.) It follows then that $\ex{M} = \rpoly(\wElem_1,\ldots, \wElem_\numTup)$. Next, observe that the value $2^\numTup$ is the number of worlds, and finally, that the product of expectation and total number of worlds yields the exact sum.
The final result follows by noting that $\rpoly$ is a sum of monomials, and we can, by rearranging the sum, equivlently push the sum into the monomials.\qed
The final result follows by the fact that $\rpoly$ is a sum of monomials, and we can, by linearity of expectation, equivlently push the expectation through the sum and into the monomials.\qed
\end{proof}
\begin{Property}
\begin{Property}\label{prop:exp-rpoly}
For the case of general $\prob$, where each tuple in the TIDB is present with probability $\prob$, the expectation of polynomial $\poly$ is equal to $\rpoly(\prob,\ldots, \prob).$
\end{Property}
@ -64,7 +64,28 @@ For any $M_i$,
&\implies \ex{M_1} +\cdots+\ex{M_t} = \prod_{i_1 \in \{j | x_j \in M_1\}}\prob_{i_1} +\cdots+\prod_{i_v \in \{j | x_j \in M_v\}} \prob_{i_v}\\
&=\rpoly(\prob_1,\ldots, \prob_\numTup).\qed
\end{align*}
I just realized, that I could have saved a lot of time by noting that for the case of TIDB, all monomial variables in $M_i$ are independent, and then using linearity of expectation to conclude the proof.
\AH{I just realized, that I could have saved a lot of time by noting that for the case of TIDB, all monomial variables in $M_i$ are independent, and then using linearity of expectation to conclude the proof.}
\end{proof}
\begin{Corollary}
If $\poly$ is given to us in a sum of monomials form, the expectation of $\poly$ ($\ex{\poly}$) can be computed in $O(|\poly|)$, where $|\poly|$ denotes the total number of multiplication/addition operators.
\end{Corollary}
The corollary follows by \cref{prop:l1-rpoly-numTup} and \cref{prop:exp-rpoly}, and by the fact that the total number of operations in sum of monomials form is exactly the number of addition/multiplication operations.
\subsection{When $\poly$ is not in sum of monomials form}
We would like to argue that in the general case there is no computation of expectation in linear time.
To this end, consider the follow graph $G(V, E)$, where $|E| = m$, $|V| = \numTup$, and $i, j \in [\numTup]$. Consider the query $q_E(\wElem_1,\ldots, \wElem_\numTup) = \sum\limits_{(i, j) \in E} \wElem_i \cdot \wElem_j$.
\begin{Lemma}
If we can compute $\poly(\wElem_1,\ldots, \wElem_\numTup) = q_E(\wElem_1,\ldots, \wElem_\numTup)^3$ in T(m) time for fixed $\prob$, then we can count the number of triangles in $G$ in T(m) + O(m) time.
\end{Lemma}
\begin{Lemma}
If we can compute $\poly(\wElem_1,\ldots, \wElem_\numTup) = q_E(\wElem_1,\ldots, \wElem_\numTup)^3$ in T(m) time for O(1) distinct values of $\prob$ then we can count the number of triangles (and the number of 3-paths, the number of 3-mathcings) in $G$ in O(T(m) + m) time.
\end{Lemma}
\begin{proof}
First, let us do a warm-up by computing $\rpoly(\wElem_1,\dots, \wElem_\numTup)$ when $\poly = q_E(\wElem_1,\ldots, \wElem_\numTup)$. Before doing so, we introduce a notation. Let $\numocc{H}$ denote the number of occurrences that $H$ occurs in $G$. So, e.g., $\numocc{\ed}$ is the number of edges ($m$) in $G$.
\end{proof}