Main algorithm, some definitions for approx algo.

master
Aaron Huber 2020-08-14 19:22:16 -04:00
parent 2026e06669
commit 50619629a6
1 changed files with 37 additions and 11 deletions

View File

@ -27,16 +27,47 @@ Thus, it is the case, that we can approximate $\rpoly(\prob_1,\ldots, \prob_n)$
\qed
\AH{{\bf END:} Old Stuff}
Before proceeding to describe the approximation algorithm, let us intrduce notation that will be of use in the following discussion. First, when we speak of $\smb$, we are speaking of a polynomial $\poly$ of the standard monomial basis, i.e., a polynomial whose monomials are not only in SOP form, but one whose non-distinct monomials have been collapsed into one distinct monomial, with its corresponding coefficient accurately reflecting the number of monomials combined.
Before proceeding to describe the approximation algorithm, let us intrduce notation that will be of use in the following discussion. First, unless explicitly stated otherwise, when we speak of a polynomial we assume that it is of the standard monomial basis, i.e., a polynomial whose monomials are not only in SOP form, but one whose non-distinct monomials have been collapsed into one distinct monomial, with its corresponding coefficient accurately reflecting the number of monomials combined.
\begin{Definition}[Expression Tree]\label{def:express-tree}
An expression tree $\polytree$ is an ADT logically viewed as an n-ary tree, whose internal nodes are from the set $\{+, \times\}$, with leaf nodes being either numerical coefficients or variables, but not both.
\end{Definition}
Note that $\polytree$ models the input polynomial $\poly$, and is therefore not necessarily of the standard monomial basis.
\begin{Definition}\label{def:express-tree-set}
Consider input $\polytree$ and its equivalent $\smb$ in the standard monomial basis. Then $\expresstree{\smb}$ be the set of all possible polynomial expressions equivalent to $\smb$, and $\polytree \subseteq \expresstree{\smb}$.
\end{Definition}
Let $\expresstree{\smb}$ be the set of all possible polynomial expressions equivalent to $\smb$. Call the input polynomial $\polytree$, and note that $\polytree \subseteq \expresstree{\smb}$ and need not be of the standard monomial basis. Refer to the expanded SOP form of $\poly$ as $\expandtree$, which is the SOP form of $\poly$ such that all coefficients $c_i$ are in the set $\{-1, 1\}$, thus relaxing the distinct monomial requirement of the standard monomial basis. Denote $\abstree$ as the resulting polynomial when all monomial coefficients of $\polytree$ are converted to positive coefficients, and then $\polytree$ itself is converted to the standard monomial basis.
\subsection{Monomial Sample Algorithm}
\begin{Lemma}\label{lem:approx-alg}
For any query polynomial $\poly(\vct{X})$, an approximation of $\rpoly(\prob_1,\ldots, \prob_n)$ can be computed in $O\left(|\poly|\cdot k \frac{\log\frac{1}{\conf}}{\error^2}\right)$, within $1 \pm \error$ multiplicative error with probability $\geq 1 - \conf$, where $k$ denotes the product width of $\poly$.
\end{Lemma}
\subsection{Approximating $\rpoly$}
\begin{proof}[Proof of Lemma \ref{lem:approx-alg}]
\subsubsection{Description}
The algorithm that approximates $\rpoly$ takes an ADT that we will refer to as an expression tree $\polytree$ for its input. Using a few helper methods, it samples $\polytree$ $O\left(\frac{\log{\frac{1}{\delta}}}{\epsilon^2}\right)$ times, yielding an estimate of $\rpoly$ within a multiplicative error of $1 \pm \epsilon$ with a probability of $1 - \delta$.
\subsubsection{Psuedo Code}
\begin{algorithm}
\caption{\textsc{MonomialSample($\polytree$)}}
\label{alg:mon-sam}
\begin{algorithmic}
\State $acc \gets 0$
\State \textsc{OnePass($\polytree$)}
\For{$sample$ $in$ $\frac{\log{\frac{1}{\delta}}}{\epsilon^2}$}
\State $acc \gets acc + $\textsc{Sample($\polytree$)}
\EndFor
\State Return $acc$
\end{algorithmic}
\end{algorithm}
\subsubsection{Correctness}
\begin{Theorem}\label{lem:approx-alg}
For any query polynomial $\poly(\vct{X})$, an approximation of $\rpoly(\prob_1,\ldots, \prob_n)$ can be computed in $O\left(|\poly|\cdot k \frac{\log\frac{1}{\conf}}{\error^2}\right)$, within $1 \pm \error$ multiplicative error with probability $\geq 1 - \conf$, where $k$ denotes the product width of $\poly$.
\end{Theorem}
\begin{proof}[Proof of Theorem \ref{lem:approx-alg}]
Consider $\polytree$ in the standard monomial basis and let $c_i$ be the coefficient of the $i^{th}$ monomial and $\distinctvars_i$ be the number of distinct variables appearing in the $i^{th}$ monomial. Note that sampling each term $t$ in $\polytree$ with probability $\frac{|c_i|}{\abstree(1,\ldots, 1)}$ is the equivalent of sampling uniformly over $\expandtree$. Now consider $\rpoly$ and note that $\coeffitem{i}$ is the value of the $i^{th}$ monomial term in $\rpoly(\prob_1,\ldots, \prob_n)$. Let $m$ be the number of terms in $\expandtree$ and $\coeffset$ to be the set $\{c'_1,\ldots, c'_m\}$ where each $c'_i$ is in $\{-1, 1\}$.
Consider now a set of $\samplesize$ random variables $\vct{\randvar}$, where $\randvar_i \sim \unidist{\coeffset}$. Recall that we are estimating for $\rpoly(\prob,\ldots, \prob)$. Then for random variable $\randvar_i$, it is the case that $\expct\pbox{\randvar_i} = \sum_{i = 1}^{\setsize}\frac{c'_i \cdot \prob^{\distinctvars}}{\setsize} = \frac{\rpoly(\prob,\ldots, \prob)}{\abstree(1,\ldots, 1)}$. Let $\hoeffest = \frac{1}{\samplesize}\sum_{i = 1}^{\samplesize}\randvar_i$. It is also true that
@ -58,11 +89,6 @@ Solving for the number of samples $\samplesize$ we get
Equation \cref{eq:hoeff-1} results computing the sum in the denominator of the exponential. Equation \cref{eq:hoeff-2} is the result of dividing both sides by $2$. Equation \cref{eq:hoeff-3} follows from taking the reciprocal of both sides, and noting that such an operation flips the inequality sign. We then derive \cref{eq:hoeff-4} by the taking the base $e$ log of both sides, and \cref{eq:hoeff-5} results from reducing common factors. We arrive at the final result of \cref{eq:hoeff-6} by simply multiplying both sides by the reciprocal of the RHS fraction without the $\samplesize$ factor.
\end{proof}
\subsubsection{Description}
\subsubsection{Psuedo Code}
\subsubsection{Correctness}
\subsubsection{Run-time Analysis}