Done till Sec 2.1

This commit is contained in:
Atri Rudra 2020-06-23 10:30:36 -04:00
parent de85ce5dc8
commit a1a8e7edfb

View file

@ -52,8 +52,9 @@ The expectation of a possible world in $\poly$ is equal to $\rpoly(\prob_1,\ldot
%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}).\]
Let $\poly$ be the generalized polynomial, i.e., the polynomial of $\numTup$ variables with highest degree $= D$, in which every possible monomial permutation appears,
Let $\poly$ be the generalized polynomial, i.e., the polynomial of $\numTup$ variables with highest degree $= D$: %, in which every possible monomial permutation appears,
\[\poly(X_1,\ldots, X_\numTup) = \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{d_i}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup X_i^{d_i}\].
\AR{It should be $q_{\vct{d}}$ and not $q_{d_i}$ and this change needs to be a propagated.}
Then for expectation we have
\begin{align*}
@ -63,8 +64,8 @@ Then for expectation we have
&= \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{d_i}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup \prob_i\\
&= \rpoly(\prob_1,\ldots, \prob_\numTup)
\end{align*}
First, by linearity of expectation, the expecation can be pushed all the way inside of the product. Second, note that $w_i \in \{0, 1\}$ which further implies that for any exponent $e \geq 1$, $w_i^e = w_i$. Next, by definition of TIDB, the expectation of a tuple across all possible worlds is indeed its probability. Finally, observe by construction, that $\rpoly(\prob_1,\ldots, \prob_\numTup)$ is exactly the product of probabilities of each variable in each monomial across the entire sum.
\AR{General comment on when you have a sequence of equalities/inequalities. Always number them and when you are trying to justify them refer to tge specific number. Also I think the 2nd and 3rrd justification in the para below probably need to be switched?}
First, by linearity of expectation, the expecation can be pushed all the way inside of the product. Second, note that $w_i \in \{0, 1\}$ which further implies that for any exponent $e \geq 1$, $w_i^e = w_i$. Next, by definition of TIDB, the expectation of a tuple across all possible worlds is indeed its probability. Finally, observe by construction, that $\rpoly(\prob_1,\ldots, \prob_\numTup)$ is exactly the product of probabilities of each variable in each monomial across the entire sum.\AR{The last claim needs more argument-- but this should be easy once you put in the lemma for $\rpoly$ that I asked you to put in one of the comments above.}
%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(\prob_1,\ldots, \prob_\numTup)$.
%
@ -100,9 +101,12 @@ First, by linearity of expectation, the expecation can be pushed all the way ins
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 immediately by \cref{prop:l1-rpoly-numTup}.
The corollary follows immediately by \cref{prop:l1-rpoly-numTup}.\AR{It does not follow from the statement of \cref{prop:l1-rpoly-numTup} but rather its proof. So this atatement needs its proof as well.}
\subsection{When $\poly$ is not in sum of monomials form}
\AR{I made my pass on a printout when this section has a partial proof of Claim 1. So this section will not have much comments beyond that. However my comments have implications for rest of the section, so will make my pass once the comments below have been propagated to the rest of the section.}
We would like to argue that in the general case there is no computation of expectation in linear time.
To this end, consider the following 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$.