paper-BagRelationalPDBsAreHard/poly-form.tex

519 lines
43 KiB
TeX
Raw Normal View History

%root: main.tex
2020-06-26 17:27:52 -04:00
%!TEX root = ./main.tex
2020-07-14 11:45:57 -04:00
%\onecolumn
\section{Polynomial Formulation}
2020-07-08 16:48:37 -04:00
We can think of $\poly(\vct{w})$ as a function whose input are the variables $X_1,\ldots, X_M$ as in $\poly(X_1,\ldots, X_M)$. Denote the sum of products expansion of $\poly(X_1,\ldots, X_\numTup)$ as $\poly(X_1,\ldots, X_\numTup)_{\Sigma}$
\begin{Definition}\label{def:qtilde}
Define $\rpoly(X_1,\ldots, X_\numTup)$ as the reduced version of $\poly(X_1,\ldots, X_\numTup)_{\Sigma}$, of the form
$\rpoly(X_1,\ldots, X_\numTup) = $
\[\poly(X_1,\ldots, X_\numTup)_{\Sigma} \mod \wbit_1^2-\wbit_1\cdots\mod \wbit_\numTup^2 - \wbit_\numTup.\]
\end{Definition}
2020-06-23 10:16:57 -04:00
2020-06-29 12:04:05 -04:00
Intuitively, $\rpoly(\textbf{X})$ is the expanded sum of products form of $\poly(\textbf{X})$ such that if any $X_j$ term has an exponent $e > 1$, it is reduced to $1$, i.e. $X_j^e\mapsto X_j$ for any $e > 1$.
Alternatively, one can gain intuition for $\rpoly$ by thinking of $\rpoly$ as the resulting sum of product expansion of $\poly$ when $\poly$ is in a factorized form such that none of its terms have an exponent $e > 1$, with an idempotent product operator.
2020-06-26 17:27:52 -04:00
2020-06-29 12:04:05 -04:00
The usefulness of this reduction will be seen shortly.
\begin{Lemma}\label{lem:pre-poly-rpoly}
2020-07-08 16:48:37 -04:00
When $\poly(X_1,\ldots, X_\numTup) = \sum\limits_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}} \cdot \prod\limits_{\substack{i = 1\\s.t. d_i\geq 1}}^{\numTup}X_i^{d_i}$, we have then that $\rpoly(X_1,\ldots, X_\numTup) = \sum\limits_{\vct{d} \in \{0,\ldots, D\}^\numTup} q_{\vct{d}}\cdot\prod\limits_{\substack{i = 1\\s.t. d_i\geq 1}}^{\numTup}X_i$.
\end{Lemma}
2020-07-08 16:48:37 -04:00
\begin{proof}
Follows by the construction of $\rpoly$ in \cref{def:qtilde}.
\end{proof}
\qed
2020-07-08 16:48:37 -04:00
Note the following fact:
\begin{Proposition}
\[\text{For all } (\wbit_1,\ldots, \wbit_\numTup) \in \{0, 1\}^\numTup, \poly(\wbit_1,\ldots, \wbit_\numTup) = \rpoly(\wbit_1,\ldots, \wbit_\numTup).\]
\end{Proposition}
\begin{proof}
2020-07-08 16:48:37 -04:00
Note that any $\poly$ in factorized form is equivalent to its sum of product expansion. For each term in the expanded form, further note that for all $b \in \{0, 1\}$ and all $e \geq 1$, $b^e = 1$.
\end{proof}
2020-07-08 16:48:37 -04:00
\qed
2020-06-29 12:04:05 -04:00
Define all variables $X_i$ in $\poly$ to be independent.
\begin{Lemma}\label{lem:exp-poly-rpoly}
The expectation of a possible world in $\poly$ is equal to $\rpoly(\prob_1,\ldots, \prob_\numTup)$.
\begin{equation*}
\expct_{\wVec}\pbox{\poly(\wVec)} = \rpoly(\prob_1,\ldots, \prob_\numTup).
\end{equation*}
\end{Lemma}
\begin{proof}
%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}).\]
2020-06-23 10:30:36 -04:00
Let $\poly$ be the generalized polynomial, i.e., the polynomial of $\numTup$ variables with highest degree $= D$: %, in which every possible monomial permutation appears,
2020-06-29 12:04:05 -04:00
\[\poly(X_1,\ldots, X_\numTup) = \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup X_i^{d_i}\].
Then for expectation we have
\begin{align}
\expct_{\wVec}\pbox{\poly(\wVec)} &= \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}}\cdot \expct_{\wVec}\pbox{\prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup w_i^{d_i}}\label{p1-s1}\\
&= \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup \expct_{\wVec}\pbox{w_i^{d_i}}\label{p1-s2}\\
&= \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup \expct_{\wVec}\pbox{w_i}\label{p1-s3}\\
&= \sum_{\vct{d} \in \{0,\ldots, D\}^\numTup}q_{\vct{d}}\cdot \prod_{\substack{i = 1\\s.t. d_i \geq 1}}^\numTup \prob_i\label{p1-s4}\\
&= \rpoly(\prob_1,\ldots, \prob_\numTup)\label{p1-s5}
\end{align}
2020-07-08 16:48:37 -04:00
In steps \cref{p1-s1} and \cref{p1-s2}, by linearity of expectation (recall the variables are independent), the expecation can be pushed all the way inside of the product. In \cref{p1-s3}, note that $w_i \in \{0, 1\}$ which further implies that for any exponent $e \geq 1$, $w_i^e = w_i$. Next, in \cref{p1-s4} the expectation of a tuple is indeed its probability.
2020-06-26 17:27:52 -04:00
%\OK{
% You don't need to tie this to TI-DBs if you define the variables ($X_i$) to be independent.
% Annotations
% Boolean expressions over uncorrelated boolean variables are sufficient to model TI-, BI-, and
% PC-Tables. This should still hold for arithmetic over the naturals.
%}
2020-06-26 17:27:52 -04:00
Finally, observe \cref{p1-s5} by construction in \cref{lem:pre-poly-rpoly}, that $\rpoly(\prob_1,\ldots, \prob_\numTup)$ is exactly the product of probabilities of each variable in each monomial across the entire sum.
\qed
2020-06-15 18:38:10 -04:00
\end{proof}
2020-06-17 10:58:02 -04:00
\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}
2020-06-24 11:58:14 -04:00
\begin{proof}
Note that \cref{lem:exp-poly-rpoly} shows that $\ex{\poly} = \rpoly(\prob_1,\ldots, \prob_\numTup)$. Therefore, if $\poly$ is already in sum of products form, one only needs to compute $\poly(\prob_1,\ldots, \prob_\numTup)$ ignoring exponent terms (note that such a polynomial is $\rpoly(\prob_1,\ldots, \prob_\numTup)$), which is indeed has $O(|\poly|)$ compututations.\qed
\end{proof}
2020-06-17 10:58:02 -04:00
\subsection{When $\poly$ is not in sum of monomials form}
2020-06-23 10:30:36 -04:00
2020-06-17 10:58:02 -04:00
We would like to argue that in the general case there is no computation of expectation in linear time.
2020-06-24 11:58:14 -04:00
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(X_1,\ldots, X_\numTup) = \sum\limits_{(i, j) \in E} X_i \cdot X_j$.
2020-06-23 10:57:17 -04:00
\AR{The two lemmas need to be re-written once notation for representing a query is finalized in Section 1.}
2020-07-08 16:48:37 -04:00
\AH{I think that we are okay with this now. We can use both polynomial and query notation interchangably. Does it matter which we use in the lemmas, i.e. $\poly(\vct{w})$ vs. $\poly(\wElem_1,\ldots, \wElem_N)$. Please let me know.}
2020-06-22 15:45:34 -04:00
\begin{Lemma}\label{lem:const-p}
2020-07-08 16:48:37 -04:00
If we can compute $\poly(\wElem_1,\ldots, \wElem_\numTup) = q_E(\wElem_1,\dots, \wElem_\numTup)^3$ in T(m) time for $\wElem_1 =\cdots= \wElem_\numTup = \prob$, then we can count the number of 3-matchings in $G$ in $T(m) + O(m)$ time.
2020-06-24 11:58:14 -04:00
\end{Lemma}
\begin{Lemma}\label{lem:gen-p}
2020-06-23 09:46:38 -04:00
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-matchings) in $G$ in O(T(m) + m) time.
2020-06-17 10:58:02 -04:00
\end{Lemma}
\begin{Lemma}\label{lem:qE3-exp}
2020-07-08 16:48:37 -04:00
When we expand $\poly(\wElem_1,\ldots, \wElem_N) = q_E(\wElem_1,\ldots, \wElem_\numTup)^3$ out and assign all exponents $e \geq 1$ a value of $1$, we have the following,
\begin{align}
2020-07-13 19:16:19 -04:00
&\rpoly(\prob,\ldots, \prob) = \numocc{G}{\ed}\prob^2 + 6\numocc{G}{\twopath}\prob^3 + 6\numocc{G}{\twodis} + 6\numocc{G}{\tri}\prob^3 +\nonumber\\
&\qquad\qquad6\numocc{G}{\oneint}\prob^4 + 6\numocc{G}{\threepath}\prob^4 + 6\numocc{G}{\twopathdis}\prob^5 + 6\numocc{G}{\threedis}\prob^6.\label{claim:four-one}
\end{align}
\end{Lemma}
\AH{\cref{lem:qE3-exp} needs to be proven. I think I might need a gentle nudge on this, I can understand intuitively, but I think there is a combinatorics argument to prove this formally, I'm just a bit unsure.}
2020-06-24 11:58:14 -04:00
\AH{The warm-up below is fine for now, but will need to be removed for the final draft}
2020-07-13 19:16:19 -04:00
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{G}{H}$ denote the number of occurrences that $H$ occurs in $G$. So, e.g., $\numocc{G}{\ed}$ is the number of edges ($m$) in $G$.
2020-06-18 15:19:59 -04:00
2020-06-24 11:58:14 -04:00
\AH{We need to make a decision on subgraph notation, and number of occurrences notation. Waiting to hear back from Oliver before making a decision.}
\AH{UPDATE: I did a quick google, and it \textit{appears} that there is a bit of a learning curve to implement node/edge symbols in LaTeX. So, maybe, if time is of the essence, we go with another notation.}
2020-06-26 17:27:52 -04:00
2020-06-18 15:19:59 -04:00
\begin{Claim}
2020-07-08 16:48:37 -04:00
We can compute $\rpoly(\prob,\ldots, \prob)^2$ in O(m) time.
2020-06-23 10:57:17 -04:00
\end{Claim}
2020-06-18 15:19:59 -04:00
\begin{proof}
2020-07-13 19:16:19 -04:00
The proof basically follows by definition. When we expand $\poly^2$, and make all exponents $e = 1$, substituting $\prob$ for all $\wElem_i$ we get $\rpoly_2(\prob,\ldots, \prob) = \numocc{G}{\ed} \cdot \prob^2 + 2\cdot \numocc{G}{\twopath}\cdot \prob^3 + 2\cdot \numocc{G}{\twodis}\cdot \prob^4$.
2020-06-18 15:19:59 -04:00
\begin{enumerate}
\item First note that
\begin{align*}
2020-07-08 16:48:37 -04:00
\poly^2(\wVec) &= \sum_{(i, j) \in E} (\wElem_i\wElem_j)^2 + \sum_{(i, j), (k, \ell) \in E s.t. (i, j) \neq (k, \ell)} \wElem_i\wElem_j\wElem_k\wElem_\ell\\
2020-06-18 15:19:59 -04:00
&= \sum_{(i, j) \in E} (\wElem_i\wElem_j)^2 + \sum_{\substack{(i, j), (j, \ell) \in E\\s.t. i \neq \ell}}\wElem_i
\wElem_j^2\wElem_\ell + \sum_{\substack{(i, j), (k, \ell) \in E\\s.t. i \neq j \neq k \neq \ell}} \wElem_i\wElem_j\wElem_k\wElem_\ell\\
\end{align*}
2020-06-24 11:58:14 -04:00
By definition of $\rpoly$,
2020-06-18 15:19:59 -04:00
\begin{equation*}
2020-07-08 16:48:37 -04:00
\rpoly^2(\wVec) = \sum_{(i, j) \in E} \wElem_i\wElem_j + \sum_{\substack{(i, j), (j, \ell) \in E\\s.t. i \neq \ell}}\wElem_i\wElem_j\wElem_\ell + \sum_{\substack{(i, j), (k, \ell) \in E\\s.t. i \neq j \neq k \neq \ell}} \wElem_i\wElem_j\wElem_k\wElem_\ell\label{eq:part-1}
2020-06-18 15:19:59 -04:00
\end{equation*}
2020-07-13 19:16:19 -04:00
Notice that the first term is $\numocc{G}{\ed}\cdot \prob^2$, the second $\numocc{G}{\twopath}\cdot \prob^3$, and the third $\numocc{G}{\twodis}\cdot \prob^4.$
2020-06-22 15:45:34 -04:00
\item Note that
2020-06-24 11:58:14 -04:00
\AH{We need the correct formula for two-matchings below.}
2020-07-21 12:16:46 -04:00
\begin{align}
&\numocc{G}{\ed} = m, \label{eq:1e}\\
&\numocc{G}{\twopath} = \sum_{u \in V} \binom{d_u}{2} \text{where $d_u$ is the degree of vertex $u$}\label{eq:2p}\\ &\numocc{G}{\twodis} = \textbf{\textit{a correct formula}}\label{eq:2m}
\end{align}
2020-06-18 15:19:59 -04:00
\end{enumerate}
2020-06-22 15:45:34 -04:00
Thus, since each of the summations can be computed in O(m) time, this implies that by \cref{eq:part-1} $\rpoly(\prob,\ldots, \prob)$ can be computed in O(m) time.\qed
\end{proof}
2020-06-24 11:58:14 -04:00
\AH{END of the 'warm-up'}
We are now ready to state the claim we need to prove \cref{lem:const-p} and \cref{lem:gen-p}.
2020-06-22 15:45:34 -04:00
2020-07-08 16:48:37 -04:00
Let $\poly(\wVec) = q_E(\wVec)^3$.
2020-06-24 11:58:14 -04:00
\begin{Claim}\label{claim:four-two}
2020-07-08 16:48:37 -04:00
If one can compute $\rpoly(\prob,\ldots, \prob)$ in time T(m), then we can compute the following in O(T(m) + m):
2020-07-13 19:16:19 -04:00
\[\numocc{G}{\tri} + \numocc{G}{\threepath} \cdot \prob - \numocc{G}{\threedis}\cdot(\prob^2 - \prob^3).\]
2020-06-23 10:57:17 -04:00
\end{Claim}
2020-06-22 15:45:34 -04:00
2020-06-24 11:58:14 -04:00
\begin{proof}
2020-07-08 16:48:37 -04:00
We have either shown or will show that the following subgraph cardinalities can be computed in $O(m)$ time:
2020-07-13 19:16:19 -04:00
\[\numocc{G}{\ed}, \numocc{G}{\twopath}, \numocc{G}{\twodis}, \numocc{G}{\oneint}, \numocc{G}{\twopathdis} + \numocc{G}{\threedis}.\]
2020-06-24 11:58:14 -04:00
2020-06-22 15:45:34 -04:00
By definition we have that
2020-07-08 16:48:37 -04:00
\[\poly(\wElem_1,\ldots, \wElem_\numTup) = \sum_{\substack{(i_1, j_1),\\ (i_2, j_2),\\ (i_3, j_3) \in E}} \prod_{\ell = 1}^{3}\wElem_{i_\ell}\wElem_{j_\ell}.\]
2020-06-22 15:45:34 -04:00
Rather than list all the expressions in full detail, let us make some observations regarding the sum. Let $e_1 = (i_1, j_1), e_2 = (i_2, j_2), e_3 = (i_3, j_3)$. Notice that each expression in the sum consists of a triple $(e_1, e_2, e_3)$. There are three forms the triple $(e_1, e_2, e_3)$ can take.
\underline{case 1:} $e_1 = e_2 = e_3$, where all edges are the same. There are exactly $m$ such triples, each with a $\prob^2$ factor.
2020-07-08 16:48:37 -04:00
\underline{case 2:} This case occurs when there are two distinct edges of the three. All 6 combinations of two distinct values consist of the same monomial in $\rpoly$, i.e. $(e_1, e_1, e_2)$ is the same as $(e_2, e_1, e_2)$. This case produces the following edge patterns: $\twodis, \twopath$.
2020-06-22 15:45:34 -04:00
\underline{case 3:} $e_1 \neq e_2 \neq e_3$, i.e., when all edges are distinct. This case consists of the following edge patterns: $\threedis, \twopathdis, \threepath, \oneint, \tri$.
2020-07-08 16:48:37 -04:00
\AH{This proof I think could some reorganization. We really don't need the warm-up anymore, but we can use the formulas for case 1 and case 2.}
2020-07-13 19:16:19 -04:00
It has already been shown previously that $\numocc{G}{\ed}, \numocc{G}{\twopath}, \numocc{G}{\twodis}$ can be computed in O(m) time. Here are the arguments for the rest.
2020-07-21 12:16:46 -04:00
\begin{equation}
\numocc{G}{\oneint} = \sum_{u \in V} \binom{d_u}{3}\label{eq:3s}
\end{equation}
2020-07-13 19:16:19 -04:00
$\numocc{G}{\twopathdis} + \numocc{G}{\threedis} = $ the number of occurrences of three distinct edges with five or six vertices. This can be counted in the following manner. For every edge $(u, v) \in E$, throw away all neighbors of $u$ and $v$ and pick two more distinct edges.
2020-07-21 12:16:46 -04:00
\begin{equation}
\numocc{G}{\twopathdis} + \numocc{G}{\threedis} = \sum_{(u, v) \in E} \binom{m - d_u - d_v + 1}{2}\label{eq:2pd-3d}
\end{equation}
The implication in \cref{claim:four-two} follows by the above and \cref{lem:qE3-exp}.
2020-07-08 16:48:37 -04:00
\AH{Justify the last sentence.}
2020-06-18 15:19:59 -04:00
\end{proof}
2020-06-23 09:46:38 -04:00
2020-07-08 16:48:37 -04:00
\qed
2020-06-24 11:58:14 -04:00
\begin{proof}[Proof of \cref{lem:gen-p}]
2020-06-23 09:46:38 -04:00
2020-06-24 11:58:14 -04:00
%\AR{Also you can modify the text of \textsc{Proof} by using the following latex command \texttt{\\begin\{proof\}[Proof of Lemma 2]} and Latex will typeset this as \textsc{Proof of Lemma 2}, which is what you really want.}
\cref{claim:four-two} says that if we know $\rpoly_3(\prob,\ldots, \prob)$, then we can know in O(m) additional time
2020-07-13 19:16:19 -04:00
\[\numocc{G}{\tri} + \numocc{G}{\threepath} \cdot \prob - \numocc{G}{\threedis}\cdot(\prob^2 - \prob^3).\] We can think of each term in the above equation as a variable, where one can solve a linear system given 3 distinct $\prob$ values, assuming independence of the three linear equations. In the worst case, without independence, 4 distince values of $\prob$ would suffice...because Atri said so, and I need to ask him for understanding why this is the case, of which I suspect that it has to do with basic result(s) in linear algebra.\AR{Follows from the fact that the corresponding coefficient matrix is the so called Vandermonde matrix, which has full rank.}
2020-07-08 16:48:37 -04:00
\AH{This Vandermonde matrix I need to research.}
2020-06-17 10:58:02 -04:00
\end{proof}
2020-07-08 16:48:37 -04:00
\qed
\AH{{\Huge\bf Changes start here.}}
2020-06-24 11:58:14 -04:00
\begin{proof}[Proof of \cref{lem:const-p}]
2020-06-23 09:46:38 -04:00
Here is the outline of the proof.
2020-07-13 11:17:58 -04:00
Let us show that for arbitrary graph $G$, which we refer to as $\graph{1}$, that we can construct graphs $\graph{2}$ and $\graph{3}$, which we will define later.
We then show that for any subgraph $S$ for which $\numocc{G}{S}$ is known to be hard to compute, we can use linear combinations in terms of $\graph{1}$ to compute $\numocc{\graph{i}}{S}$, where $i$ in $\{2, 3\}$. Then, we can combine all three linear combinations into a linear system, solving for $\numocc{\graph{1}}{S}$.
2020-07-16 11:46:30 -04:00
First, let us introduce some useful definitions.
2020-07-20 12:50:13 -04:00
\subsubsection{$f_k$ and $\graph{k}$}
2020-07-16 11:46:30 -04:00
2020-07-17 20:26:45 -04:00
\begin{Definition}\label{def:Gk}
2020-07-20 12:50:13 -04:00
For $k > 1$, let graph $\graph{k}$ be a graph generated from an arbitrary graph $\graph{1}$, by replacing every edge $e$ of $\graph{1}$ with a $k$-path, such that all $k$-path replacement edges are disjoint in the sense that they only intersect at the original intersection endpoints as seen in $\graph{1}$.
2020-07-17 20:26:45 -04:00
\end{Definition}
The set of edges in $\graph{k}$ is written as $E_k$. For any graph $\graph{k}$, we denote its edges to be a pair $(e, b)$, such that $b \in \{0,\ldots, k-1\}$ and $e\in E_1$.
Before defining $f_k$, the following notation will be useful. Let $\binom{S}{t}$ denote the set of subsets in $S$ with exactly $t$ edges. In a similar manner, $\binom{S}{\leq t}$ is used to mean the subsets of $S$ with size $\leq t$.
2020-07-17 20:26:45 -04:00
\begin{Definition}\label{def:fk}
2020-07-20 15:23:15 -04:00
Define $f_k: \binom{E_k}{3} \mapsto \binom{E_1}{\leq3}$. For $S \in \binom{E_3}{3}$, such that $S = \pbrace{(e_1, b_1), (e_2, b_2), (e_3, b_3)}$, $f_k\left(\pbrace{(e_1, b_1), (e_2, b_2), (e_3, b_3)}\right) = \pbrace{e_1, e_2, e_3}$.
2020-07-17 20:26:45 -04:00
\end{Definition}
2020-07-20 12:50:13 -04:00
The function $f_k$ is a mapping from every $3$-edge shape in $\graph{k}$ to its `projection' in $\graph{1}$.
2020-07-17 20:26:45 -04:00
\begin{Lemma}
$f_k$ is a function.
\end{Lemma}
\begin{proof}
2020-07-20 12:50:13 -04:00
Note that $f_k$ is properly defined. For any $S \in \binom{E_k}{3}$, $|f(S)| \leq 3$, since it has to be the case that any subset of $3$ edges in $E_k$ will map to at most 3 edges in $\graph{1}$. All mappings are in the required range. Then, since for any $b \in \{0,\ldots, k-1\}$ the edge $(e, b) \mapsto e$ is a mapping for which $(e, b)$ maps to no other edge than $e$, and this implies that $f_k$ is a function.
\end{proof}
\qed
2020-07-17 20:26:45 -04:00
\subsubsection{Subgraph patterns with 3 edges}
We wish to briefly state the possible subgraphs $S$ containing exactly three edges.
\begin{itemize}
2020-07-17 20:26:45 -04:00
\item Triangle ($\tri$)
\item 3-path ($\threepath$)
\item 3-star ($\oneint$)--this is the graph that results when all three edges share exactly one common endpoint. The remaining endpoint for each edge is disconnected from any endpoint of the three edges.
\item Disjoint Two-Path ($\twopathdis$)--this subgraph consists of a two path and a remaining disjoint edge.
\item 3-matching ($\threedis$)--this subgraph is composed of three disjoint edges.
\end{itemize}
2020-07-20 12:50:13 -04:00
\subsection{Three Matchings in $\graph{2}$}
2020-07-17 20:26:45 -04:00
2020-07-20 12:50:13 -04:00
\begin{Lemma}\label{lem:3m-G2}
The number of $3$-matchings in graph $\graph{2}$ satisfies the following identity,
\[\numocc{\graph{2}}{\threedis} = 8 \cdot \numocc{\graph{1}}{\threedis} + 6 \cdot \numocc{\graph{1}}{\twopathdis} + 4 \cdot \numocc{\graph{1}}{\oneint} + 4 \cdot \numocc{\graph{1}}{\threepath} + 2 \cdot \numocc{\graph{1}}{\tri}.\]
2020-07-17 20:26:45 -04:00
\end{Lemma}
\begin{proof}
2020-07-18 23:15:35 -04:00
\AR{TODO for {\em later}: I think the proof will be much easier to follow with figures: just drawing out $S\times \{0,1\}$ along with the $(e_i,b_i)$ explicity notated on the edges will make the proof much easier to follow.}
2020-07-16 12:38:29 -04:00
Given any $S \in \binom{E_1}{\leq3}$, we consider $f_2^{-1}(S)$, which is the set of all possible sets of $3$-edge subgraphs in $S \times \{0, 1\}$ which $f_2$ maps to $S$. Then we count the number of $3$-matchings in the $3$-edge subgraphs of $\graph{2}$ in $f_2^{-1}(S)$. We start with $S \in \binom{E_1}{3}$, where $S$ is composed of the edges $e_1, e_2, e_3$ and $f_2^{-1}(S)$ is set of all $3$-edge subsets of the set $\{(e_1, 0), (e_1, 1), (e_2, 0), (e_2, 1), (e_3, 0), (e_3, 1)\}$.
2020-07-16 12:38:29 -04:00
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-matching ($\threedis$)
\end{itemize}
Consider the $S = \threedis$ pattern. Note that edges in $f_2^{-1}(S)$ are {\em not} disjoint only for the pairs $(e_i, 0), (e_i, 1)$ for $i\in \{1,2\}$.. All subsets for $b_1, b_2, b_3 \in \{0, 1\}$, $(e_1, b_1), (e_2, b_2), (e_3, b_3)$ will compose a 3-matching. One can see that we have a total of two possible choices for each edge $e$ in $\graph{1}$ yielding $2^3 = 8$ possible 3-matchings in $f_2^{-1}(S)$.
%\AH{The comment below is an important comment.}
2020-07-20 12:50:13 -04:00
%\AR{I think your argument seems to implicitly assume that $\graph{1}$ is the subset $S$ and $\graph{2}$ is the corresponding mapping under $f^{-1}$. This is {\bf not} correct. You should present the argument as in the outline above above. I.e. fix an $S\in\binom{E_1}{\le 3}$ in $\graph{1}$ and then consider all possible subgraphs in $\graph{2}$ in $f^{-1}(S)$. {\bf Propagate} this change to the rest of the proof.}
2020-07-17 20:26:45 -04:00
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item Disjoint Two-Path ($\twopathdis$)
\end{itemize}
For $S = \twopathdis$ edges $e_2, e_3$ form a $2$-path with $e_3$ being disjoint. This means that $(e_2, 0), (e_2, 1), (e_3, 0), (e_3, 1)$ form a $4$-path while $(e_1, 0), (e_1, 1)$ is its own disjoint $2$-path. We can only pick $(e_1, 0)$ or $(e_1, 1)$ from $f_2^{-1}(S)$, and then we need to pick a $2$-matching from the mapping of the $e_1, e_2$ under $f_2^{-1}(S).$ Note that a four path allows there to be 3 possible 2 matchings, specifically, $\pbrace{(e_2, 0), (e_3, 0)}, \pbrace{(e_2, 0), (e_3, 1)}, \pbrace{(e_2, 1), (e_3, 1)}$. Since these two selections can be made independently, there are $2 \cdot 3 = 6$ choices for $3$-matchings in $f_2^{-1}(S)$.
2020-07-17 20:26:45 -04:00
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-star ($\oneint$)
\end{itemize}
2020-07-18 23:15:35 -04:00
When $S = \oneint$, in $f_2^{-1}$, the inner edges $(e_i, 1)$ are all connected, and the outer edges $(e_i, 0)$ are all disjoint. Note that for a valid 3 matching it must be the case that at most one inner edge can be part of the set of disjoint edges. When exactly one inner edge is chosen, there are 3 such possibilities. The remaining possible 3-matching occurs when all 3 outer edges are chosen. Thus, there are $3 + 1 = 4$ 3-matchings in $f_2^{-1}(S)$.
2020-07-16 12:38:29 -04:00
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-path ($\threepath$)
\end{itemize}
When $S =\threepath$ it is the case that all edges beginning with $e_1$ and ending with $e_3$ are successively connected. This translates to a $6$-path in the edges of $f_2^{-1}(S)$, where all edges from $(e_1, 0),\ldots,(e_3, 1)$ are successively connected. For a $3$-matching to exist, there must be at least one edge separating edges picked from a sequence. There are four such possibilities: $\pbrace{(e_1, 0), (e_2, 0), (e_3, 0)}, \pbrace{(e_1, 0), (e_2, 0), (e_3, 1)}, \pbrace{(e_1, 0), (e_2, 1), (e_3, 1)},$\newline $\pbrace{(e_1, 1), (e_2, 1), (e_3, 1)}$ . Thus, there are four possible 3-matchings in $f_2^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item Triangle ($\tri$)
\end{itemize}
For $S = \tri$, note that it is the case that the edges in $f_2^{-1}(S)$ are connected in a successive manner, but this time in a cycle, such that $(e_1, 0)$ and $(e_3, 1)$ are also connected. While this is similar to the discussion of the six path above, one must use caution not to consider the first and last edges as disjoint, since they are connected. This rules out both subsets of $(e_1, 0), (e_2, 0), (e_3, 1)$ and $(e_1, 0), (e_2, 1), (e_3, 1)$ leaving us with $2$ remaining edge combinations that produce a 3 matching.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $2$-matching ($\twodis$), $2$-path ($\twopath$), $1$ edge ($\ed$)
\end{itemize}
Let us also consider when $S \in \binom{E_1}{\leq 2}$. When $|S| = 2$, we can only pick one from each of two pairs, $\pbrace{(e_0, 0), (e_0, 1)}$ and $\pbrace{(e_1, 0), (e_1, 1)}$. This implies that a $3$-matching cannot exist in $f_2^{-1}(S)$. The same argument holds for $|S| = 1$, where we can only pick one edge from the pair $\pbrace{(e_0, 0), (e_0, 1)}$, thus no $3$-matching exists in $f_2^{-1}(S)$.
2020-07-17 20:26:45 -04:00
Observe that all of the arguments above focused solely on the shape/pattern of $S$. In other words, all $S$ of a given shape yield the same number of $3$-matchings, and this is why we get the required identity.
\end{proof}
\qed
2020-07-20 12:50:13 -04:00
\subsection{Three matchings in $\graph{3}$}
2020-07-13 19:16:19 -04:00
\begin{Lemma}\label{lem:3m-G3}
2020-07-20 12:50:13 -04:00
The number of 3-matchings in $\graph{3}$ satisfy the following identity,
2020-07-13 19:16:19 -04:00
\begin{align*}
2020-07-20 12:50:13 -04:00
\numocc{\graph{3}}{\threedis} = &4\pbrace{\numocc{\graph{1}}{\twopath}} + 6\pbrace{\numocc{\graph{1}}{\twodis}} + 18\pbrace{\numocc{\graph{1}}{\tri}} + 21\pbrace{\numocc{\graph{1}}{\threepath}}\\
&+ 24\pbrace{\numocc{\graph{1}}{\twopathdis}} + 20\pbrace{\numocc{\graph{1}}{\oneint}} + 27\pbrace{\numocc{\graph{1}}{\threedis}}.
2020-07-13 19:16:19 -04:00
\end{align*}
\end{Lemma}
\begin{proof}
2020-07-20 15:23:15 -04:00
For any $S \in \binom{E_1}{\leq3}$, we now consider $f_3^{-1}(S)$, which lists all possible subsets of $3$ edges in $S \times \{0, 1, 2\}$ to which $f_3$ maps to $S$. We again then count the number of $3$-matchings in $f_3^{-1}(S)$. Let $S'$ be all the edges of $\graph{3}$ which 'project' down to any edge in $S$, formally, for $|S| = 1$, then $S = \{e_1\}$ and $S' = \pbrace{(e_1, 0), (e_1, 1), (e_1, 2)}$. Similarly, when $|S| = 2$, then $S = \pbrace{e_1, e_2}$ and $S' = \pbrace{(e_1, 0),\ldots, (e_2, 2)}$, and so on for $|S| = 3$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $1$ edge ($\ed$)
\end{itemize}
When $S = \ed$, $f_3^{-1}(S)$ gives one result, $(e_1, 0), (e_1, 1), (e_1, 2)$, which clearly does not contain a $3$-matching. Thus there are no $3$-matchings in $f_3^{-1}(S)$ for this case.% All edges in the subset are a $3$-path, and it is the case as alluded in $\graph{2}$ discussion that no 3-matching can exist in a single $3$-path.
\begin{itemize}
\item $2$-path ($\twopath$)
\end{itemize}
Fix then $S = \twopath$ and now we have $f_3^{-1}(S)$ yielding all $3$-edged subsets of $S'$. All edges in $S'$ form a $6$-path, and as discussed in \cref{lem:3m-G2}, this leads to $4$ $3$-matchings in $f_3^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $2$-matching ($\twodis$)
\end{itemize}
2020-07-18 23:15:35 -04:00
For $S = \twodis$, then all subsets in the output of $f_3^{-1}(S)$ are predicated on the fact that $(e_i, b)$ is disjoint with $(e_j, b)$ for $i \neq j\in \{1,2\}$ and $b \in \{0, 1, 2\}$. Pick an aribitrary $e_i$ and note, that $(e_i, 0), (e_i, 2)$ is a $2$-matching, which can combine with any of the $3$ edges in $(e_j, 0),\ldots, (e_j, 2)$ again for $i \neq j$. Since the selections are independent, it follows that there exist $2 \cdot 3 = 6$ $3$-matchings in $f_3^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item Triangle ($\tri$)
\end{itemize}
Now, we consider the 3-edge subgraphs of $\graph{1}$, starting with $S = \tri$. As discussed in \cref{lem:3m-G2} for the case of $\tri$, $f_3^{-1}(S)$ subsets are conditioned on the fact that all the edges in $S'$ are a cyclic sequence, and we must be careful not to pair $(e_1, 0)$ with $(e_3, 2)$ in a $3$-matching. For any $s \in f_3^{-1}(S)$, $s$ is a $3$-matching when we have that for the edges $(e_1, b_1), (e_2, b_2), (e_3, b_3)$ where $b_1, b_2, b_3 \in \{0, 1, 2\}$, such that, for all $i \in [3]$ it is the case that if $b_i = 2$ then $b_{i + 1 \mod{4}} = 0$. Iterating through all possible combinations producing 3-matchings, i.e. $\pbrace{(e_1, 0), (e_2, 0), (e_3, 0)}, \pbrace{(e_1, 0), (e_2, 0), (e_3, 1)}, \pbrace{(e_1, 0), (e_2, 1), (e_3, 0)},\pbrace{(e_1, 0), (e_2, 1), (e_3, 1)}, \pbrace{(e_1, 0), (e_2, 2), (e_3, 1)}, \pbrace{(e_1, 1), (e_2, 0), (e_3, 0)}$\newline$\ldots, \pbrace{(e_1, 1), (e_2, 1), (e_3, 2)} \pbrace{(e_1, 1), (e_2, 2), (e_3, 1)}, \pbrace{(e_1, 1), (e_2, 2), (e_3, 2)}, \pbrace{(e_1, 2), (e_2, 1), (e_3, 0)},\ldots, \pbrace{(e_1, 2), (e_2, 2), (e_3, 1)}, \pbrace{(e_1, 2), (e_2, 2), (e_3, 2)}$, giving a total of 18 3-matchings in $f_3^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-path ($\threepath$)
\end{itemize}
2020-07-20 15:23:15 -04:00
Consider when $S = \threepath$ and $f_3^{-1}(S)$ has the constraint that all edges are successively connected to form a $9$-path. Since $(e_1, 0)$ is disjoint to $(e_3, 2)$, both of these edges can exist in a $3$-matching. This relaxation yields 3 other 3-matchings that couldn't be counted in the case of the $S = \tri$, namely $\pbrace{(e_1, 0), (e_2, 0), (e_3, 2)},\pbrace{(e_1, 0), (e_2, 1), (e_3, 2)}, \pbrace{(e_1, 0), (e_2, 2), (e_3, 2)}$. There are therefore $18 + 3 = 21$ three-matchings.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item Disjoint Two-Path ($\twopathdis$)
\end{itemize}
Assume $S = \twopathdis$, then $f_3^{-1}(S)$ has successive connectivity from $(e_1, 0)$ through $(e_1, 2)$, and successive connectivity from $(e_2, 0)$ through $(e_3, 2)$. It is the case that the edges in $S'$ form a 6-path with a disjoint 3-path. There exist $8$ distinct two matchings (with at least one $(e_2,\cdot)$ and at least one $(e_3,\cdot)$ edge) in the $6$-path $(e_2, 0),\ldots, (e_3, 2)$ of the form $\pbrace{(e_2, 0), (e_3, 0)},\ldots, \pbrace{(e_2, 1), (e_3, 2)}, \pbrace{(e_2, 2), (e_3, 1)}, \pbrace{(e_2, 2), (e_3, 2)}$. These matchings can be paired independently with either of the $3$ remaining edges of $(e_1, b)$, for a total of $8 \cdot 3 = 24$ 3-matchings in $f_3^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-star ($\oneint$)
\end{itemize}
Given $S = \oneint$, the subsets of $f_3^{-1}(S)$ are restricted such that the outer edges $(e_i, 0)$ are disjoint from another, the middle edges $(e_i, 1)$ are also disjoint to each other, and only the inner edges $(e_i, 2)$ intersect with one another at exactly one common endpoint. To be precise, any outer edge $(e_i, 0)$ is disjoint to every middle edge $(e_j, 1)$ for $i \neq j$. As previously mentioned in \cref{lem:3m-G2}, at most one inner edge may appear in a $3$-matching. For arbitrary inner edge $(e_i, 2)$, we have $4$ combinations of the middle and outer edges of $e_j, e_k$, where $i \neq j \neq k$. These choices are independent and we have $4 \cdot 3 = 12$ 3-matchings. We are not done yet, as we need to consider the middle and outer edge combinations. Notice that for each $e_i$, we have $2$ choices, i.e. a middle or outer edge, contributing $2^3 = 8$ additional $3$-matchings, for a total of $8 + 12 = 20$ $3$-matchings in $f_3^{-1}(S)$.
2020-07-20 12:50:13 -04:00
\begin{itemize}
\item $3$-matching ($\threedis$)
\end{itemize}
2020-07-18 23:15:35 -04:00
Given $S = \threedis$ subgraph, we have the case that all subsets in $f_3^{-1}(S)$ have the property that $(e_i, b)$ is disjoint to $(e_j, b)$ for $i \neq j$. For each $e_i$, there are then $3$ choices, independent of each other, and it results that there are $3^3 = 27$ 3-matchings in $f_3^{-1}(S)$.
All of the observations above focused only on the shape of $S$, and since we see that for fixed $S$, we have a fixed number of $3$-matchings, this implies the identity.
\end{proof}
\qed
\subsection{Three Paths}
2020-07-20 12:50:13 -04:00
Computing the number of 3-paths in $\graph{2}$ and $\graph{3}$ consists of much simpler linear combinations.
\subsubsection{$\graph{2}$}
2020-07-21 12:16:46 -04:00
\begin{Lemma}\label{lem:3p-G2}
2020-07-20 12:50:13 -04:00
The number of $3$-paths in $\graph{2}$ is computed by the following linear combination,
\[\numocc{\graph{2}}{\threepath} = 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{proof}
For $s \subseteq S'$ such that $s$ is a $3$-path, it \textit{must} be the case by definition of $f$ that all edges in $f_2(s)$ have at least one mapping from an edge in $s$. \AR{Here you mean to talk about edges in $E_2$ but the states talking about edges in $E_1$}\AH{Not sure if I have understood this comment, but hopefully fixed the problem.} This constraint rules out every pattern $S \in \graph{1}$ consisting of $3$ edges, as well as when $S = \twodis$. For $S = \ed$, note that $S$ doesn't have enough edges to have any output in $f_2^{-1}(S)$, i.e., there exists no $s \in \binom{E_2}{3}$ such that $f_2(s) = S$.\AR{Technically the argument for $\ed$ is different from the others in that $f_2^{-1}(\ed)$ has not have enough edges in total.}\AH{I'm slightly confused by the above comment...intuitively I understand, but doesn't $f_2^{-1}(S) = \emptyset$ technically?} The only surviving pattern is $S = \twopath$, where it can be seen in $f_2^{-1}(S)$ that each subset has successive connectivity from $(e_1, 0)$ to $(e_2, 1)$. There are then $2$ $3$-paths sharing edges $e_1$ and $e_2$ in $f_2^{-1}(S), \pbrace{(e1, 0), (e_1, 1), (e_2, 0)} \text{ and }\pbrace{(e_1, 1), (e_2, 0), (e_2, 1)}$.
\end{proof}
\qed
%we have two 3-paths generated: $\pbox{(e_1, 0), (e_1, 1), (e_2, 0)}$ and $\pbox{(e_1, 1), (e_2, 0), (e_2, 1)}$. Thus,
2020-07-20 12:50:13 -04:00
\subsubsection{$\graph{3}$}
\begin{Lemma}\label{lem:3p-G3}
2020-07-20 12:50:13 -04:00
The number of $3$-paths in $\graph{3}$ is computed by the following linear combination,
\[\numocc{\graph{3}}{\threepath} = \numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{proof}
2020-07-20 15:23:15 -04:00
The argument follows along the same lines as above. Given $s \subseteq S'$, it \textit{must} be that every edge in $f_3(s)$ has at least one edge in $s$ mapped to it. Notice again that this cannot be the case for any $S \in \binom{E_1}{3}$, nor is it the case when $S = \twodis$. This leaves us with two patterns, $S = \twopath$ and $S = \ed$. For the former, it is the case that we have $2$ $3$-paths across $e_1$ and $e_2$, $\pbrace{(e_1, 1), (e_1, 2), (e_2, 0)}$ and $\pbrace{(e_1, 2), (e_2, 0), (e_2, 1)}$. For the latter pattern $\ed$, it it trivial to see that a $1$-path in $\graph{1}$ becomes a $3$-path in $\graph{3}$, and this proves the identity.
\end{proof}
\qed
\subsection{Triangle}
2020-07-21 12:16:46 -04:00
\begin{Lemma}\label{lem:tri}
2020-07-20 12:50:13 -04:00
For any graph $\graph{k}$, $\numocc{\graph{k}}{\tri} = 0$.
\end{Lemma}
\begin{proof}
2020-07-20 12:50:13 -04:00
The number of triangles in $\graph{k}$ for $k \geq 2$ will always be $0$ for the simple fact that all cycles in $\graph{k}$ will have at least six edges.
\end{proof}
\qed
\AH{\LARGE \bf Newest material starts here.}
2020-07-21 12:16:46 -04:00
\subsection{Developing a Linear System}
In \cref{lem:qE3-exp} is the identity for $\rpoly(\prob,\ldots, \prob)$ when $\poly(\wElem_1,\ldots, \wElem_N) = q_E(\wElem_1,\ldots, \wElem_\numTup)^3$. (This lemma still needs a proof, but for now we will pretend the proof is there.)
All of \cref{eq:1e}, \cref{eq:2p}, \cref{eq:2m}, \cref{eq:3s}, \cref{eq:2pd-3d} show that we can compute the respective edge patterns in $O(m)$ time. Rearrange $\rpoly$ with all linear time computations on one side, leaving only the hard computations,
2020-07-21 12:16:46 -04:00
\begin{align}
&\rpoly(\prob,\ldots, \prob) = \numocc{G}{\ed}\prob^2 + 6\numocc{G}{\twopath}\prob^3 + 6\numocc{G}{\twodis}\prob^4 + 6\numocc{G}{\tri}\prob^3 + 6\numocc{G}{\oneint}\prob^4 + 6\numocc{G}{\threepath}\prob^4 + 6\numocc{G}{\twopathdis}\prob^5 + 6\numocc{G}{\threedis}\prob^6\nonumber\\
&\rpoly(\prob,\ldots, \prob) - \numocc{G}{\ed}\prob^2 - 6\numocc{G}{\twopath}\prob^3 - 6\numocc{G}{\twodis}\prob^4 - 6\numocc{G}{\oneint}\prob^4 = 6\numocc{G}{\tri}\prob^3 + 6\numocc{G}{\threepath}\prob^4 + 6\numocc{G}{\twopathdis}\prob^5 + 6\numocc{G}{\threedis}\prob^6\label{eq:LS-rearrange}\\
&\frac{\rpoly(\prob,\ldots, \prob)}{6\prob^3} - \frac{\numocc{G}{\ed}}{6\prob} - \numocc{G}{\twopath} - \numocc{G}{\twodis}\prob - \numocc{G}{\oneint}\prob = \numocc{G}{\tri} + \numocc{G}{\threepath}\prob + \numocc{G}{\twopathdis}\prob^2 + \numocc{G}{\threedis}\prob^3\label{eq:LS-reduce}\\
&\frac{\rpoly(\prob,\ldots, \prob)}{6\prob^3} - \frac{\numocc{G}{\ed}}{6\prob} - \numocc{G}{\twopath} - \numocc{G}{\twodis}\prob - \numocc{G}{\oneint}\prob - \big(\numocc{G}{\twopathdis} + \numocc{G}{\threedis}\big)\prob^2 = \numocc{G}{\tri} + \numocc{G}{\threepath}\prob - \numocc{G}{\threedis}\left(\prob^2 - \prob^3\right)\label{eq:LS-subtract}
\end{align}
\cref{eq:LS-rearrange} is the result of simply subtracting from both sides terms that have $O(m)$ complexity. Reducing all terms by the common factor of $6\prob^3$ gives \cref{eq:LS-reduce}. The final equation, \cref{eq:LS-subtract}, is the result of subtracting the term $\left(\numocc{G}{\twopathdis} + \numocc{G}{\threedis}\right)\prob^2$ from both sides. Equation \ref{eq:LS-subtract} holds for $\rpoly$ over any graph $G$
2020-07-21 12:16:46 -04:00
As previously outlined, assume graph $\graph{1}$ to be an arbitrary graph, with $\graph{2}, \graph{3}$ constructed from $\graph{1}$ as defined in \cref{def:Gk}.
\subsubsection{$\graph{2}$}
Using \cref{lem:3m-G2}, \cref{lem:3p-G2}, and \cref{lem:tri}, construct now a linear equation for $\graph{2}$ in \textit{terms} of $\graph{1}$ for $\tri$, $\threepath$, and $\threedis$.
Refer to the RHS of \cref{eq:LS-subtract} as $LS^G$, i.e., $\linsys{2} = \numocc{\graph{2}}{\tri} + \numocc{\graph{2}}{\threepath}\prob - \numocc{\graph{2}}{\threedis}\left(\prob^2 - \prob^3\right)$.
Let the LHS of \cref{eq:LS-subtract} for $\graph{2}$ be $\aug{2}$.
2020-07-21 12:16:46 -04:00
By \cref{lem:tri}, the first term of $\linsys{2}$ is $0$, and then $\linsys{2} = \numocc{\graph{2}}{\threepath}\prob - \numocc{\graph{2}}{\threedis}\left(\prob^2 - \prob^3\right)$.
2020-07-21 12:16:46 -04:00
Replace the next term with the identity of \cref{lem:3p-G2} and the last term with the identity of \cref{lem:3m-G2},
\begin{equation*}
\linsys{2} = 2 \cdot \numocc{\graph{1}}{\twopath}\prob - \pbrace{8 \cdot \numocc{\graph{1}}{\threedis} + 6 \cdot \numocc{\graph{1}}{\twopathdis} + 4 \cdot \numocc{\graph{1}}{\oneint} + 4 \cdot \numocc{\graph{1}}{\threepath} + 2 \cdot \numocc{\graph{1}}{\tri}}\left(\prob^2 - \prob^3\right).
\end{equation*}
Rearrange terms into groups of those patterns that can be computed in $O(m)$ and those that are 'hard' to compute,
\begin{equation*}
\linsys{2} = -\pbrace{2 \cdot \numocc{\graph{1}}{\tri} + 4 \cdot \numocc{\graph{1}}{\threepath} + \left(8 \cdot \numocc{\graph{1}}{\threedis} + 6 \cdot \numocc{\graph{1}}{\twopathdis}\right)}\left(\prob^2 - \prob^3\right) + \pbrace{2 \cdot \numocc{\graph{1}}{\twopath}\prob - 4 \cdot \numocc{\graph{1}}{\oneint}\left(\prob^2 - \prob^3\right)}.
2020-07-21 12:16:46 -04:00
\end{equation*}
Let $\lintime{2}$ represent all the terms we wish to remove from $\linsys{2}$. Then, the following are true.
\begin{align}
\lintime{2} &= -6\cdot\left(\numocc{\graph{1}}{\threedis} + \numocc{\graph{1}}{\twopathdis}\right)\left(\prob^2 - \prob^3\right) - 4 \cdot \numocc{\graph{1}}{\oneint}\left(\prob^2 - \prob^3\right) + 2\cdot \numocc{\graph{1}}{\twopath}\prob\nonumber\\
\linsys{2'} = \linsys{2} -\lintime{2} &= -\pbrace{2 \cdot \numocc{\graph{1}}{\tri} + 4 \cdot \numocc{\graph{1}}{\threepath} + 2 \cdot \numocc{\graph{1}}{\threedis}}\left(\prob^2 - \prob^3\right)\label{eq:LS-G2'}\\
\aug{2'} = \aug{2} - \lintime{2} &= \frac{\rpoly(\prob,\ldots, \prob)}{6\prob^3} - \frac{\numocc{\graph{2}}{\ed}}{6\prob} - \numocc{\graph{2}}{\twopath} - \numocc{\graph{2}}{\twodis}\prob - \numocc{\graph{2}}{\oneint}\prob - \big(\numocc{\graph{2}}{\twopathdis} + \numocc{\graph{2}}{\threedis}\big)\prob^2 +\nonumber \\
&6\cdot\left(\numocc{\graph{1}}{\threedis} + \numocc{\graph{1}}{\twopathdis}\right)\left(\prob^2 - \prob^3\right) + 4 \cdot \numocc{\graph{1}}{\oneint}\left(\prob^2 - \prob^3\right) - 2\cdot \numocc{\graph{1}}{\twopath}\prob\nonumber\\
\implies \aug{2'} &= \linsys{2'}\nonumber
\end{align}
We now have a linear equation in terms of $\graph{1}$ for $\graph{2}$ where $\linsys{2'}$ is the linear combination and $\aug{2}$ is the augmented side of the matrix, or the constant value, as all of the terms in $\aug{2}$ can be solved in $O(m)$ time.
\subsubsection{$\graph{3}$}
Following the same reasoning for $\graph{3}$, using \cref{lem:3m-G3}, \cref{lem:3p-G3}, and \cref{lem:tri}, substitute the identities into $\linsys{3}$,
\begin{align}
\linsys{3} =& \pbrace{\numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}}\prob - \left\{4 \cdot \numocc{\graph{1}}{\twopath} + 6 \cdot \numocc{\graph{1}}{\twodis} + 18 \cdot \numocc{\graph{1}}{\tri} + 21 \cdot \numocc{\graph{1}}{\threepath} + 24 \cdot \numocc{\graph{1}}{\twopathdis} +\right.\nonumber\\
&\left.20 \cdot \numocc{\graph{1}}{\oneint} + 27 \cdot \numocc{\graph{1}}{\threedis}\right\}\left(\prob^2 - \prob^3\right)\label{eq:LS-G3-sub}\\
=&\pbrace{ -18\numocc{\graph{1}}{\tri} - 21 \cdot \numocc{\graph{1}}{\threepath} - 24 \cdot \numocc{\graph{1}}{\twopathdis} - 27 \cdot \numocc{\graph{1}}{\threedis}}\left(\prob^2 - \prob^3\right) + \left\{\pbrace{-20 \cdot \numocc{\graph{1}}{\oneint} - 4\cdot \numocc{\graph{1}}{\twopath} - 6 \cdot \numocc{\graph{1}}{\twodis}}\left(\prob^2 - \prob^3\right) +\right.\nonumber\\
&\left.\numocc{\graph{1}}{\ed}\prob + 2 \cdot \numocc{\graph{1}}{\twopath}\prob\right\}. \label{eq:LS-G3-rearrange}
\end{align}
Equation \ref{eq:LS-G3-sub} follows from simple substitution of all lemma identities. We then get \cref{eq:LS-G3-rearrange} by simply rearranging the operands into a formation that is more organized for our purposes.
Collecting terms we would like to send to the other side, the following equations are true,
\begin{align}
\lintime{3} =& \pbrace{- 24 \cdot \left(\numocc{\graph{1}}{\twopathdis} + \numocc{\graph{1}}{\threedis}\right) - 20 \cdot \numocc{\graph{1}}{\oneint} - 4\cdot \numocc{\graph{1}}{\twopath} - 6 \cdot \numocc{\graph{1}}{\twodis}}\left(\prob^2 - \prob^3\right) + \pbrace{\numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}}\prob\nonumber\\
\linsys{3'} =& \linsys{3} - \lintime{3} = \pbrace{- 18 \cdot \numocc{\graph{1}}{\tri} - 21 \cdot \numocc{\graph{1}}{\threepath} - 3 \cdot \numocc{\graph{1}}{\threedis}}\left(p^2 - p^3\right)\label{eq:LS-G3'} \\
\aug{3'} =& \aug{3} - \lintime{3} = \frac{\rpoly(\prob,\ldots, \prob)}{6\prob^3} - \frac{\numocc{\graph{3}}{\ed}}{6\prob} - \numocc{\graph{3}}{\twopath} - \numocc{\graph{3}}{\twodis}\prob - \numocc{\graph{3}}{\oneint}\prob - \big(\numocc{\graph{3}}{\twopathdis} + \numocc{\graph{3}}{\threedis}\big)\prob^2 + \nonumber\\
& \pbrace{24 \cdot \left(\numocc{\graph{1}}{\twopathdis} + \numocc{\graph{1}}{\threedis}\right) + 20 \cdot \numocc{\graph{1}}{\oneint} + 4\cdot \numocc{\graph{1}}{\twopath} + 6 \cdot \numocc{\graph{1}}{\twodis}}\left(\prob^2 - \prob^3\right) - \pbrace{\numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}}\prob\nonumber\\
&\implies \aug{3'} = \linsys{3'}\nonumber
\end{align}
We now have a linear system consisting of three linear combinations, for $\graph{1}, \graph{2}, \graph{3}$ in terms of $\graph{1}$. To make it easier, use the following variable representations: $x = \numocc{\graph{1}}{\tri}, y = \numocc{\graph{1}}{\threepath}, z = \numocc{\graph{1}}{\threedis}$. Using $\linsys{2'}$ and $\linsys{3'}$, \cref{eq:LS-G2'}, \cref{eq:LS-G3'} respectively, the following matrix is obtained,
\[ \mtrix{\rpoly} = \begin{pmatrix}
x & (\prob)y & z(\prob^2 - \prob^3)\\
-2(\prob^2 - \prob^3)x & -4(\prob^2 - \prob^3)y & -2(\prob^2 - \prob^3)z\\
-18(\prob^2 - \prob^3)x & -21(\prob^2 - \prob^3)y & -3(\prob^2 - \prob^3)z
\end{pmatrix}.\]
Now we seek to show that all rows of the system are indeed independent.
The method of minors can be used to compute the determinant, $\dtrm{\mtrix{\rpoly}}$, giving
\begin{equation*}
\begin{vmatrix}
x & (\prob)y & z(\prob^2 - \prob^3)\\
-2(\prob^2 - \prob^3)x & -4(\prob^2 - \prob^3)y & -2(\prob^2 - \prob^3)z\\
-18(\prob^2 - \prob^3)x & -21(\prob^2 - \prob^3)y & -3(\prob^2 - \prob^3)z
\end{vmatrix}
=
\begin{vmatrix}
-4(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-21(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
\end{vmatrix}
~ - ~ \prob~ \cdot
\begin{vmatrix}
-2(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
\end{vmatrix}
+ ~(\prob^2 - \prob^3)~ \cdot
\begin{vmatrix}
-2(\prob^2 - \prob^3) & -4(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -21(\prob^2 - \prob^3)
\end{vmatrix}.
\end{equation*}
Compute each RHS term starting with the left and working to the right,
\begin{equation}
-4(\prob^2 - \prob^3)\cdot -3(\prob^2 - \prob^3) - \left(-21(\prob^2 - \prob^3) \cdot -2(\prob^2 - \prob^3)\right) =
12(\prob^2 - \prob^3)^2 - 42(\prob^2 - \prob^3)^2 = -30(\prob^2 - \prob^3)^2.\label{eq:det-1}
\end{equation}
The middle term then is
\begin{equation}
-\prob\left(\left(-2(\prob^2 - \prob^3)\cdot -3(\prob^2 - \prob^3)\right) - \left(-18(\prob^2 - \prob^3) \cdot -2(\prob^2 - \prob^3)\right)\right) =
-\prob\left(6\cdot (\prob^2 - \prob^3)^2 - 36(\prob^2 - \prob^3)^2\right) = -\prob\left(-30(\prob^2 - \prob^3)^2\right).\label{eq:det-2}
\end{equation}
Finally, the rightmost term,
\begin{equation}
\left(\prob^2 - \prob^3\right) \left(\left(-2(\prob^2 - \prob^3)\cdot -21(\prob^2 - \prob^3)\right) - \left(-18(\prob^2 - \prob^3) \cdot -4(\prob^2 - \prob^3)\right)\right) = \left(\prob^2 - \prob^3\right)\left(42\cdot (\prob^2 - \prob^3)^2 - 72(\prob^2 - \prob^3)^2\right) = \left(\prob^2 - \prob^3\right)\left(-30(\prob^2 - \prob^3)^2\right).\label{eq:det-3}
\end{equation}
Putting \cref{eq:det-1}, \cref{eq:det-2}, \cref{eq:det-3} together, we have,
\[\dtrm{\mtrix{\rpoly}} = -30(\prob^2 - \prob^3)^2-\prob\left(-30(\prob^2 - \prob^3)^2\right) + \left(\prob^2 - \prob^3\right)\left(-30(\prob^2 - \prob^3)^2\right)\]
Expanding out $\left(\prob^2 - \prob^3\right)^2$ gives
\begin{equation*}
\dtrm{\mtrix{\rpoly}} = -30\left(\prob^4 - 2\prob^5 + \prob^6\right)-\prob\left(-30\left(\prob^4 - 2\prob^5 + \prob^6\right)\right) + \left(\prob^2 - \prob^3\right)\left(-30\left(\prob^4 - 2\prob^5 + \prob^6\right)\right).
\end{equation*}
Further algebraic manipulations result in
\begin{align}
\dtrm{\mtrix{\rpoly}} &= \left(30\prob^4\right)\left(\left(-1 + 2\prob - \prob^2\right) -\prob\left(-1\left(1 - 2\prob + \prob^2\right)\right) + \left(\prob^2 - \prob^3\right)\left(-1\left(1 - 2\prob + \prob^2\right)\right)\right)\label{eq:det-factor}\\
&=\left(30\prob^4\right)\left(\left(-1 + 2\prob - \prob^2\right) + \left(\prob - 2\prob^2 + \prob^3\right) + \left( - \prob^2 + 2\prob^3 - \prob^4 + \prob^3 - 2\prob^4 + \prob^5\right)\right)\label{eq:det-mult}\\
&= \left(30\prob^4\right)\left(\prob^5 - 3\prob^4 + 4\prob^3 - 4\prob^2 + 3\prob - 1\right)\label{eq:det-combine}.
\end{align}
\cref{eq:det-factor} results from factoring out common terms. \cref{eq:det-mult} is the case when multiplying terms in the right hand factor. We arrive at \cref{eq:det-combine} through a simple rearranging and combining of like terms.
2020-07-20 12:50:13 -04:00
The roots for \cref{eq:det-combine} are $p = 0, p = 1$, and $p = i$. Thus, we have proved the lemma for fixed $p \in (0, 1)$.
\end{proof}
\qed