Rewrote |C|(1,...,1) proof with sufficient condition.

This commit is contained in:
Aaron Huber 2021-04-03 12:17:55 -04:00
parent 37196c454b
commit 13f9162e6f

View file

@ -625,32 +625,32 @@ When $\gate_{k+1}.\type = \circmult$, then line ~\ref{alg:one-pass-mult} compute
It is known that $\topord(G)$ is computable in linear time. Next, each of the $\numvar$ iterations of the loop in ~\Cref{alg:one-pass-loop} take $O(1)$ time, thus yielding a runtime of $O\left(\size(\circuit)\right)$.
\paragraph{$\abs{\circuit}(1,\ldots, 1)$ is size $O(N)$}
For our runtime results to be relevant, it must be the case that the sum of the coefficients computed by \onepass is indeed size $O(N)$ since there are $O(\log{N})$ bits in the RAM model where $N$ is the size of the input. The size of the input here is \size(\circuit). We show, with the constraint that when \depth(\circuit) $\geq 1$ then \degree(\circuit) $\geq 1$, that $\abs{\circuit}(1,\ldots, 1)$ is indeed size $O(N)$ by induction on \depth(\circuit).
For our runtime results to be relevant, it must be the case that the sum of the coefficients computed by \onepass is indeed size $O(N)$ since there are $O(\log{N})$ bits in the RAM model where $N$ is the size of the input. The size of the input here is \size(\circuit). We show that when \size$(\circuit_\linput) = N_\linput = N - c$, \size$(\circuit_\rinput) = N_\rinput \leq c$, where $N > N_\linput \geq N_\rinput$ for some constant $c$, this is indeed the case. %with the constraint that when \depth(\circuit) $\geq 1$ then \degree(\circuit) $\geq 1$, that $\abs{\circuit}(1,\ldots, 1)$ is indeed size $O(N)$ by induction on \depth(\circuit).
\begin{proof}[Proof of $\abs{\circuit}(1,\ldots, 1)$ is size $O(N)$]
To prove this result, we start by proving that $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k - 1}$ for \degree(\circuit) $= k$.
For the base case, we have that \depth(\circuit) $= 0$, and there can only be one node which must contain a coefficient (or constant) of $1$. In this case, $\abs{\circuit}(1,\ldots, 1) = 1$, and \size(\circuit) $= 1$, and it is true that $\abs{\circuit}(1,\ldots, 1) = 1 \leq N^{2^k-1} = 1^{2^0 -1} = 1$.
To prove this result, we start by proving that $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k }$ for \degree(\circuit) $= k$.
For the base case, we have that \depth(\circuit) $= 0$, and there can only be one node which must contain a coefficient (or constant) of $1$. In this case, $\abs{\circuit}(1,\ldots, 1) = 1$, and \size(\circuit) $= 1$, and it is true that $\abs{\circuit}(1,\ldots, 1) = 1 \leq N^{2^k} = 1^{2^0} = 1$.
Assume for $\ell > 0$ an arbitrary circuit \circuit of $\depth(\circuit) \leq \ell$ that it is true that $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k - 1}$ for $k \geq 1$ when \depth(C) $\geq 1$.
Assume for $\ell > 0$ an arbitrary circuit \circuit of $\depth(\circuit) \leq \ell$ that it is true that $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k }$.% for $k \geq 1$ when \depth(C) $\geq 1$.
For the inductive step we consider a circuit \circuit such that $\depth(\circuit) \leq \ell + 1$. When we consider the sink gate, it is the case that $\abs{\circuit_i}(1,\ldots, 1) \leq (N-1)^{2^k -1}$ for $i \in \{\linput, \rinput\}$. The sink can only be either a $\circmult$ or $\circplus$ gate. Consider when sink node is $\circmult$. Let $k_i, k_j$ denote \degree($\circuit_\linput$) and \degree($\circuit_\rinput$) respectively.
For the inductive step we consider a circuit \circuit such that $\depth(\circuit) \leq \ell + 1$. The sink can only be either a $\circmult$ or $\circplus$ gate. Consider when sink node is $\circmult$. Let $k_\linput, k_\rinput$ denote \degree($\circuit_\linput$) and \degree($\circuit_\rinput$) respectively. Note that this case does not require the constraint on $N_\linput$ or $N_\rinput$.
\begin{align}
\abs{\circuit}(1,\ldots, 1) &= \abs{\circuit_\linput}(1,\ldots, 1)\circmult \abs{\circuit_\rinput}(1,\ldots, 1) \leq (N-1)^{2^{k_i}-1} \circmult (N)^{2^{k_j}-1}\nonumber\\
&\leq (N-1)^{2^{k-1}-1}\label{eq:sumcoeff-times-upper}\\
&\leq N^{2^k-1}.\nonumber
\abs{\circuit}(1,\ldots, 1) &= \abs{\circuit_\linput}(1,\ldots, 1)\circmult \abs{\circuit_\rinput}(1,\ldots, 1) \leq (N-1)^{2^{k_\linput}} \circmult (N)^{2^{k_\rinput}}\nonumber\\
&\leq (N-1)^{2^{k}-1}\label{eq:sumcoeff-times-upper}\\
&\leq N^{2^k}.\nonumber
\end{align}
We derive the upperbound of \cref{eq:sumcoeff-times-upper} by noting that the maximum value of the LHS occurs when both the base and exponent are maximized.
For the case when the sink node is a $\circplus$ node, then we have (again denoting \degree($\circuit_\linput$) and \degree($\circuit_\rinput$) as $k_i, k_j$ respectively)
For the case when the sink node is a $\circplus$ node, then we have
\begin{align}
\abs{\circuit}(1,\ldots, 1) &= \abs{\circuit_\linput}(1,\ldots, 1) \circplus \abs{\circuit_\rinput}(1,\ldots, 1) \leq
(N-1)^{2^{k_i}-1} + (N-1)^{2^{k_j}-1}\nonumber\\
&\leq (N-1)^{2^k - 1} + 1\label{eq:sumcoeff-plus-upper}\\
N_\linput^{2^{k_\linput}} + N_\rinput^{2^{k_\rinput}}\nonumber\\
&\leq N_\linput^{2^k } + N_\rinput\label{eq:sumcoeff-plus-upper}\\
&\leq N^{2^k}.\nonumber
\end{align}
Similar to the $\circmult$ case, \cref{eq:sumcoeff-plus-upper} upperbounds its LHS by the fact that the maximum base and exponent combination is always greater than or equal to the sum of lower base/exponent combinations. The final equality is true given the constraint that $k\geq 1$.
Similar to the $\circmult$ case, \cref{eq:sumcoeff-plus-upper} upperbounds its LHS by the fact that the maximum base and exponent combination is always greater than or equal to the sum of lower base/exponent combinations. The final equality is true given the constraint over the inputs. Note that a symmetrical argument applies for the case when $N_\rinput > N_\linput$.
Since $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k}$ for all queries with $\degree(\circuit) \geq 1$, then $\log{N^{2^k}} = 2^k \cdot \log{N}$ which for fixed $k$ yields the desired $O(\log{N})$ bits for $O(1)$ arithmetic operations for the given query class.
Since $\abs{\circuit}(1,\ldots, 1) \leq N^{2^k}$ for all queries with the exception of subquery elimnation in recursive datalog, then $\log{N^{2^k}} = 2^k \cdot \log{N}$ which for fixed $k$ yields the desired $O(\log{N})$ bits for $O(1)$ arithmetic operations for the given query class.
\end{proof}
\subsection{\sampmon Notes}