Finished implementing Atri's changes 073120.

master
Aaron Huber 2020-08-04 15:30:57 -04:00
parent d08d2ae212
commit ff81e092d3
4 changed files with 179 additions and 130 deletions

3
approx_alg.tex Normal file
View File

@ -0,0 +1,3 @@
%root: main.tex
\section{$1 \pm \epsilon$ Approximation Algorithm}
\AH{There are things in the poly write up for this section which \textit{I am not exactly sure on how to verify as of yet}, and with Atri being gone this week, I may not be able to verify everything, so my approach will be to \LaTeX this section up, and {\Large \bf leave notes for things that need to be verified.}}

View File

@ -23,7 +23,7 @@
\newcommand{\sch}{sch}
\newcommand{\rw}{\textbf{W}}%\rw for random world
\newcommand{\graph}[1]{G^{(#1)}}
\newcommand{\linsys}[1]{LS^{\graph{#1}}}
\newcommand{\linsys}[1]{LS(G_{#1})}
\newcommand{\lintime}[1]{LT^{\graph{#1}}}
\newcommand{\aug}[1]{AUG^{\graph{#1}}}
\newcommand{\mtrix}[1]{M_{#1}}

View File

@ -140,7 +140,7 @@
%\input{davidscheme}
\input{ra-to-poly}
\input{poly-form}
%\input{}
\input{approx_alg}

View File

@ -119,18 +119,18 @@ For any graph $G$, the following formulas compute $\numocc{G}{H}$ for their resp
A quick argument to why \cref{eq:2pd-3d} is true. Note that for each edge connecting arbitrary vertices $u$ and $v$, we can get rid of all neighbors, and choose two distinct edges. The sum over all such edge combinations is precisely then $\numocc{G}{\twopathdis} + \numocc{G}{\threedis}$.
For the following discussion, set $\poly(\vct{X}) = \left(q_E(X_1,\ldots, X_\numTup)\right)^3$.
For the following discussion, set $\poly_{G}(\vct{X}) = \left(q_E(X_1,\ldots, X_\numTup)\right)^3$.
\begin{Lemma}\label{lem:qE3-exp}
When we expand $\poly(\vct{X}) = q_E(X_1,\ldots, X_\numTup)^3$ out and assign all exponents $e \geq 1$ a value of $1$, we have the following,
When we expand $\poly_{G}(\vct{X}) = q_E(X_1,\ldots, X_\numTup)^3$ out and assign all exponents $e \geq 1$ a value of $1$, we have the following,
\begin{align}
&\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 + 6\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}
&\rpoly_{G}(\prob,\ldots, \prob) = \numocc{G}{\ed}\prob^2 + 6\numocc{G}{\twopath}\prob^3 + 6\numocc{G}{\twodis} + 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.\label{claim:four-one}
\end{align}
\end{Lemma}
\begin{proof}[Proof of \cref{lem:qE3-exp}]
By definition we have that
\[\poly(\vct{X}) = \sum_{\substack{(i_1, j_1),\\ (i_2, j_2),\\ (i_3, j_3) \in E}} \prod_{\ell = 1}^{3}X_{i_\ell}X_{j_\ell}.\]
\[\poly_{G}(\vct{X}) = \sum_{\substack{(i_1, j_1),\\ (i_2, j_2),\\ (i_3, j_3) \in E}} \prod_{\ell = 1}^{3}X_{i_\ell}X_{j_\ell}.\]
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.
\textsc{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.
@ -142,7 +142,7 @@ By definition we have that
\qed
\begin{Claim}\label{claim:four-two}
If one can compute $\rpoly(\prob,\ldots, \prob)$ in time T(m), then we can compute the following in O(T(m) + m):
If one can compute $\rpoly_{G}(\prob,\ldots, \prob)$ in time T(m), then we can compute the following in O(T(m) + m):
\[\numocc{G}{\tri} + \numocc{G}{\threepath} \cdot \prob - \numocc{G}{\threedis}\cdot(\prob^2 - \prob^3).\]
\end{Claim}
\begin{proof}[Proof of Claim \ref{claim:four-two}]
@ -152,12 +152,12 @@ It has already been shown previously that $\numocc{G}{\ed}, \numocc{G}{\twopath}
Using the result of \cref{lem:qE3-exp}, let us show a derivation to the identity of the consequent in \cref{claim:four-two}.
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,
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_{G}$ with all linear time computations on one side, leaving only the hard computations,
\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}
&\rpoly_{G}(\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_{G}(\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_{G}(\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_{G}(\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.
@ -168,12 +168,12 @@ The implication in \cref{claim:four-two} follows by the above and \cref{lem:qE3-
\qed
\begin{Lemma}\label{lem:gen-p}
If we can compute $\poly(\vct{X})$ in $T(m)$ time for $O(1)$ distinct values of $\prob$ then we can count the number of triangles, 3-paths, and 3-matchings in $G$ in $T(m) + O(m)$ time.
If we can compute $\rpoly_{G}(\vct{X})$ in $T(m)$ time for $O(1)$ distinct values of $\prob$ then we can count the number of triangles, 3-paths, and 3-matchings in $G$ in $T(m) + O(m)$ time.
\end{Lemma}
\begin{proof}[Proof of \cref{lem:gen-p}]
\cref{claim:four-two} says that if we know $\rpoly_3(\prob,\ldots, \prob)$, then we can know in O(m) additional time
\cref{claim:four-two} says that if we know $\rpoly_{G}(\prob,\ldots, \prob)$, then we can know in O(m) additional time
\[\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 distinct values of $\prob$ would suffice. This follows from the fact that the corresponding coefficient matrix is the so called Vandermonde matrix, which has full rank
\end{proof}
\qed
@ -182,13 +182,13 @@ If we can compute $\poly(\vct{X})$ in $T(m)$ time for $O(1)$ distinct values of
\AH{This Vandermonde matrix I need to research. Right now, the last sentences are just parrotting Atri.}
\AR{Jul 31: Did not make a pass on anything above this.}
\AH{\Large From this point on, Atri has not made another pass on this since I have implemented his suggestions.}
\begin{Lemma}\label{lem:const-p}
If we can compute $\poly(\vct{X})$ in T(m) time for $\wElem_1 =\cdots= \wElem_\numTup = \prob$,\AR{Nope, this is not correct. Either use $\tilde{Q}(p,\dots,p)$ or $\mathbb{E}_{\vct{W}\sim P^{(\vct{p})}}[Q(\vct{W})]$ for $\vct{p}=(p,\dots,p)$. Also you have to have $G$ in the notation $Q$ as the statement as the claim is you can do the computation for {\em every} $G$ with $m$ edges in $T(m)$ then you can compute the number of triangles etc. for arbitrary $G$ as well.} then we can count the number of triangles, 3-paths, and 3-matchings in $G$ in $T(m) + O(m)$ time.
If we can compute $\rpoly_{G}(\vct{X})$ in T(m) time for $X_1 =\cdots= X_\numTup = \prob$, then we can count the number of triangles, 3-paths, and 3-matchings in $G$ in $T(m) + O(m)$ time.
\end{Lemma}
%-------------------------------------WARM-UP------------------------------
%\AH{The warm-up below is fine for now, but will need to be removed for the final draft}
%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$.
@ -231,26 +231,65 @@ If we can compute $\poly(\vct{X})$ in T(m) time for $\wElem_1 =\cdots= \wElem_\n
\begin{proof}[Proof of \cref{lem:const-p}]
Here is the outline of the proof.
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}$.
\AR{This outline is vague and pretty much useless. I would recommend do the following. First collect all the technical lemmas that you use in the proof and state them upfront here. Then show how you can combine the lemmas to provee the lemma statement-- the rest of the section would then be devoted to proving the various lemmas. Also using $S$ above generically is bit weird. Be upfront that you will be considering triangles, 3-paths and 3-matchings. Actually computing disjoint 2-path is also hard but we avoid needing that since we use the fact thet disjoint 2-path + 3-matching is easy.}
First, let us introduce some useful definitions.
\subsubsection{$f_k$ and $\graph{k}$}
\begin{Definition}\label{def:Gk}
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}$.
\end{Definition}
\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}.\]
\end{Lemma}
\begin{Lemma}\label{lem:3m-G3}
The number of 3-matchings in $\graph{3}$ satisfy the following identity,
\begin{align*}
\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}}.
\end{align*}
\end{Lemma}
\begin{Lemma}\label{lem:3p-G2}
The number of $3$-paths in $\graph{2}$ satisfies the following identity,
\[\numocc{\graph{2}}{\threepath} = 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{Lemma}\label{lem:3p-G3}
The number of $3$-paths in $\graph{3}$ satisfies the following identity,
\[\numocc{\graph{3}}{\threepath} = \numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{Lemma}\label{lem:tri}
For any graph $\graph{k}$, $\numocc{\graph{k}}{\tri} = 0$.
\end{Lemma}
\begin{Lemma}\label{lem:lin-sys}
Using the identities for computing $\numocc{G}{\threedis}, \numocc{G}{\threepath}, \numocc{G}{\tri}$ for $G \in \{\graph{2}, \graph{3}\}$, a linear system can be developed and solved for the unknown quantities of $\numocc{\graph{1}}{\threedis}, \numocc{\graph{1}}{\threepath}$, and $\numocc{\graph{1}}{\tri}$.
\end{Lemma}
Using \cref{def:Gk} we construct graphs $\graph{2}$ and $\graph{3}$ from arbitrary graph $\graph{1}$.
We then show that for any of the subgraphs $\threedis, \threepath, \tri$ which are all known to be hard to compute, we can use linear combinations in terms of $\graph{1}$ from Lemmas \ref{lem:3m-G2}, \ref{lem:3m-G3}, \ref{lem:3p-G2}, \ref{lem:3p-G3}, \ref{lem:tri} to compute $\numocc{\graph{i}}{S}$, where $i$ in $\{2, 3\}$ and $S \in \{\threedis, \threepath, \tri\}$. Then, using \cref{lem:qE3-exp} and \cref{lem:lin-sys}, we can combine all three linear combinations into a linear system, solving for $\numocc{\graph{1}}{S}$.
%$%^&*(
Before proceeding, let us introduce a few more helpful definitions.
\subsubsection{$f_k$ and $\graph{k}$}
\begin{Definition}\label{def:ed-nota}
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$.
\end{Definition}
%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$. The following function $f_k$ will be useful in our proofs.
\begin{Definition}\label{def:ed-sub}
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$.
\end{Definition}
The following function $f_k$ will be useful in our proofs.
\begin{Definition}\label{def:fk}
Let $f_k: \binom{E_k}{3} \mapsto \binom{E_1}{\leq3}$ be defined as follows. For any $S \in \binom{E_3}{3}$, such that $S = \pbrace{(e_1, b_1), (e_2, b_2), (e_3, b_3)}$, define:
\[ f_k\left(\pbrace{(e_1, b_1), (e_2, b_2), (e_3, b_3)}\right) = \pbrace{e_1, e_2, e_3}.\]
@ -259,10 +298,10 @@ Let $f_k: \binom{E_k}{3} \mapsto \binom{E_1}{\leq3}$ be defined as follows. For
The function $f_k$ is a mapping from every $3$-edge shape in $\graph{k}$ to its `projection' in $\graph{1}$.
\begin{Lemma}
\begin{Lemma}\label{lem:fk-func}
$f_k$ is a function.
\end{Lemma}
\begin{proof}
\begin{proof}[Proof of Lemma \ref{lem:fk-func}]
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
@ -277,14 +316,8 @@ Note that $f_k$ is properly defined. For any $S \in \binom{E_k}{3}$, $|f(S)| \l
% \item 3-matching ($\threedis$)--this subgraph is composed of three disjoint edges.
%\end{itemize}
\subsection{Three Matchings in $\graph{2}$}
\AH{\Large \bf The only changes in the next few subsections are regarding Atri's first pass comments. Atri has not yet made another pass after I implemented the changes.}
\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}.\]
\end{Lemma}
\begin{proof}
\begin{proof}[Proof of Lemma \ref{lem:3m-G2}]
\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.}
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)\}$.
@ -327,17 +360,10 @@ Observe that all of the arguments above focused solely on the shape/pattern of $
\subsection{Three matchings in $\graph{3}$}
\begin{Lemma}\label{lem:3m-G3}
The number of 3-matchings in $\graph{3}$ satisfy the following identity,
\begin{align*}
\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}}.
\end{align*}
Let $S'$ be all the edges of $\graph{k}$ which 'project' down to any set of edges $S$ in $\graph{1}$, formally, for $|S| = 1$, then $S = \{e_1\}$ and $S' = \pbrace{(e_1, 0),\ldots, (e_1, k-1)}$. Similarly, when $|S| = 2$, then $S = \pbrace{e_1, e_2}$ and $S' = \pbrace{(e_1, 0),\ldots, (e_2, k -1)}$, and so on for $|S| = 3$.
\end{Lemma}
\begin{proof}
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$.
\begin{proof}[Proof of Lemma \ref{lem:3m-G3}]
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)$.
@ -349,7 +375,7 @@ When $S = \ed$, $f_3^{-1}(S)$ has one subset, $(e_1, 0), (e_1, 1), (e_1, 2)$, wh
\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 the proof of \cref{lem:3m-G2}\AR{Technically this is not true since the argument is not the same since earlier there was only $e_1$ and $e_2$ but now there is $e_1,e_2,e_3$.}, this leads to $4$ $3$-matchings in $f_3^{-1}(S)$.
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 similar to the discussion in the proof of \cref{lem:3m-G2} (when $S = \threepath$ in $\graph{2}$), this leads to $4$ $3$-matchings in $f_3^{-1}(S)$.
\begin{itemize}
\item $2$-matching ($\twodis$)
@ -359,7 +385,32 @@ For $S = \twodis$, then all subsets in the output of $f_3^{-1}(S)$ are predicate
\begin{itemize}
\item Triangle ($\tri$)
\end{itemize}
Now, we consider the 3-edge subgraphs of $\graph{1}$, starting with $S = \tri$. As discussed in proof of \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$\AR{$(i+1)\mod{4}$ is not correct since e.g. the value could be $0$. The correct index is $i\mod{3}+1$}. Iterating through all possible combinations, $18$ of them produce 3-matchings, i.e.\AR{This is very hard to parse. It would be better to break up this into three sub-lists based on which edge corresponding to $e_1$ is chosen. Also for $(e_1,2)$ choice it is easiest to just list all five-- using $\dots$ for one missing term is kind of confusing/unnecessary.} $\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)$.
Now, we consider the 3-edge subgraphs of $\graph{1}$, starting with $S = \tri$. As discussed in proof of \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 \mod{3} + 1} \neq 0$. Iterating through all possible combinations, we have
\begin{itemize}
\item \textsc{$(e_1, 0)$}
\begin{itemize}
\item $\pbrace{(e_1, 0), (e_2, 0), (e_3, 0)}$
\item $\pbrace{(e_1, 0), (e_2, 0), (e_3, 1)}$
\item $\pbrace{(e_1, 0), (e_2, 1), (e_3, 0)}$
\item $\pbrace{(e_1, 0), (e_2, 1), (e_3, 1)}$
\item $\pbrace{(e_1, 0), (e_2, 2), (e_3, 1)}$
\end{itemize}
\item \textsc{$(e_1, 1)$}
\begin{itemize}
\item $\pbrace{(e_1, 1), (e_2, 0), (e_3, 0)}, \ldots\pbrace{(e_1, 1), (e_2, 1), (e_3, 2)}$
\item $\pbrace{(e_1, 1), (e_2, 2), (e_3, 1)}$
\item $\pbrace{(e_1, 1), (e_2, 2), (e_3, 2)}$
\end{itemize}
\item \textsc{$(e_1, 2)$}
\begin{itemize}
\item $\pbrace{(e_1, 2), (e_2, 1), (e_3, 0)}$
\item $\pbrace{(e_1, 2), (e_2, 1), (e_3, 1)}$
\item $\pbrace{(e_1, 2), (e_2, 1), (e_3, 2)}$
\item $\pbrace{(e_1, 2), (e_2, 2), (e_3, 1)}$
\item $\pbrace{(e_1, 2), (e_2, 2), (e_3, 2)}$
\end{itemize}
\end{itemize}
for a total of 18 3-matchings in $f_3^{-1}(S)$.
\begin{itemize}
\item $3$-path ($\threepath$)
@ -388,56 +439,52 @@ All of the observations above focused only on the shape of $S$, and since we see
\subsection{Three Paths}
Computing the number of 3-paths in $\graph{2}$ and $\graph{3}$ consists of much simpler linear combinations.
\subsubsection{$\graph{2}$}
\begin{Lemma}\label{lem:3p-G2}
The number of $3$-paths in $\graph{2}$ satisfies the following identity,
\[\numocc{\graph{2}}{\threepath} = 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{proof}
For $s \subseteq S'$ \AR{$S'$ was defined inside the proof of another lemma so you cannot use it's definition here-- either define $S'$ in the text outside of a proof of re-define it here. Also using $s$ is confusing-- perhaps use $\mathcal{P}$ for {\em path}? \textbf{PROPAGATE} this change.}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$ (and recall that $s$ is connected). \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.}\AR{Updated the text a bit-- now it is fine.} 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?}\AR{Yep and that is what I meant by not having enough edges.} 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{(e_1, 0), (e_1, 1), (e_2, 0)} \text{ and }\pbrace{(e_1, 1), (e_2, 0), (e_2, 1)}$.
\begin{proof}[Proof of Lemma \ref{lem:3p-G2}]
For $\mathcal{P} \subseteq S'$ such that $\mathcal{P} $ is a $3$-path, it \textit{must} be the case by definition of $f$ that all edges in $f_2(\mathcal{P} )$ have at least one mapping from an edge in $\mathcal{P} $ (and recall that $\mathcal{P} $ is connected). 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(\mathcal{P} ) = S$. 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{(e_1, 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,
\subsubsection{$\graph{3}$}
\begin{Lemma}\label{lem:3p-G3}
The number of $3$-paths in $\graph{3}$ satisfies the following identity,
\[\numocc{\graph{3}}{\threepath} = \numocc{\graph{1}}{\ed} + 2 \cdot \numocc{\graph{1}}{\twopath}.\]
\end{Lemma}
\begin{proof}
The argument follows along the same lines as in the proof of \cref{lem:3p-G2}. 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 (and $s$ is connected). 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 an edge in $\graph{1}$ becomes a $3$-path in $\graph{3}$, and this proves the identity.
\begin{proof}[Proof of Lemma \ref{lem:3p-G3}]
The argument follows along the same lines as in the proof of \cref{lem:3p-G2}. Given $\mathcal{P} \subseteq S'$, it \textit{must} be that every edge in $f_3(\mathcal{P})$ has at least one edge in $\mathcal{P}$ mapped to it (and $\mathcal{P}$ is connected). 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 an edge in $\graph{1}$ becomes a $3$-path in $\graph{3}$, and this proves the identity.
\end{proof}
\qed
\subsection{Triangle}
\begin{Lemma}\label{lem:tri}
For any graph $\graph{k}$, $\numocc{\graph{k}}{\tri} = 0$.
\end{Lemma}
\begin{proof}
\begin{proof}[Proof of Lemma \ref{lem:tri}]
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. Atri has not made a pass on this yet.}
\subsection{Developing a Linear System}
\AR{This section is bit too rambly and there is no ``purpose" in the sense that what the section definitely needs is a technical lemma that captures what this section is proving.}
\AR{Also this section has more notation then necessary-- instead of defining the LHS and RHS of an equation separately and then talking about it, just talk about the equation as a whole and when you make changes, just stated the full updated equation. The latter would be easier to follow. Currently, this section has more notation than needed.}
In \cref{lem:qE3-exp} is the identity for $\rpoly(\prob,\ldots, \prob)$ when $\poly(\vct{X}) = q_E(X_1,\ldots, X_\numTup)^3$.
\subsection{Developing a Linear System}
\begin{proof}[Proof of Lemma \ref{lem:lin-sys}]
In \cref{lem:qE3-exp} is the identity for $\rpoly_{G}(\prob,\ldots, \prob)$ when $\poly_{G}(\vct{X}) = q_E(X_1,\ldots, X_\numTup)^3$.
Let us maintain a vector $\vct{b}(G_1)$ to hold the entries for the terms that are computable in $O(m)$ time, for each of $G_1, G_2,$ and $G_3$. From \cref{eq:LS-subtract}, $\vct{b}(G_1)[0] = \frac{\rpoly_{G}(\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$.
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}$}
Let us call the linear equation for graph $\graph{2}$ $\linsys{2}$. Starting out, $\linsys{2} = \numocc{\graph{2}}{\tri} + \numocc{\graph{2}}{\threepath}\prob - \numocc{\graph{2}}{\threedis}\left(\prob^2 - \prob^3\right)$. By \cref{claim:four-two} we can compute $\linsys{2}$ in $O(T(m) + m)$ time with $m = |E_2|$, and more generally, $m = |E_k|$ for a graph $\graph{k}$.
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}$.\AR{Just state that the eqution is $\linsys{2} = \numocc{\graph{2}}{\tri} + \numocc{\graph{2}}{\threepath}\prob - \numocc{\graph{2}}{\threedis}\left(\prob^2 - \prob^3\right)$, where we can compute $\linsys{2}$ in blah (figure out the exact expression for blah) time-- and the rest of the argument show how this equation can be simplified etc.. If you prefer $\aug{2}$, then use that but to define two notation, $\aug{2}$ and $\linsys{2}$ to define the same thing is one notation too many. Also use $LS(G)$ instead if $\linsys{2}$-- or similarly for $AUG$ if you decide to use that instead.}
\AR{All of the rest of the argument should be made in terms of the equation as a whole and you should {\em not} need to introduce any more new notation. Same comment holds for the argument for $\graph{3}$ as well.}
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)$.
Replace the next term with the identity of \cref{lem:3p-G2} and the last term with the identity of \cref{lem:3m-G2},
@ -449,16 +496,17 @@ Rearrange terms into groups of those patterns that can be computed in $O(m)$ and
\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)}.
\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}
Note that there are terms computable in $O(m)$ time which can removed from $\linsys{2}$ and placed on the other side of \cref{eq:LS-subtract}. This leaves us with
\begin{equation}
\linsys{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'}\\
\end{equation}
and
\begin{align*}
\vct{b}(G_1)[1] &= \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 +\\
&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
\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.
We now have a linear equation in terms of $\graph{1}$ for $\graph{2}$.
\subsubsection{$\graph{3}$}
@ -466,89 +514,87 @@ Following the same reasoning for $\graph{3}$, using \cref{lem:3m-G3}, \cref{lem:
\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}
=&\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}
Removing terms to the other side of \cref{eq:LS-subtract}, we get
\begin{equation}
\linsys{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'}
\end{equation}
and
\begin{align*}
\vct{b}(G_1)[2] =& \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 + \\
& \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
\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}.\]
\AR{Two issues. First there should be no $x,y,z$ inside the matrix. You define the matrix as above without the variables and then state the liner equation as (where $T$ denotes the transpose operation):
\[\mtrix{\rpoly}\cdot (x~ y~ z)^T=blah.\]
1 & \prob & -(\prob^2 - \prob^3)\\
-2(\prob^2 - \prob^3) & -4(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -21(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
\end{pmatrix},\]
and the following linear equation
\begin{equation}
\mtrix{\rpoly}\cdot (x~ y~ z~)^T = \vct{b}(G_1).
\end{equation}
\AR{
Also the top right entry should be $-(p^2-p^3)$-- the negative sign is missing. This changes the rest of the calculations and has to be propagated. If my calculations are correct the final polynomial should be $-30p^2(1-p)^2(1-p-p^2+p^3)$. This still has no root in $(0,1)$}
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
\AR{You can simplify some of the expression by noting that the determinant of the matrix with entries $ab,ac,ad,ae$ is $a^2$ times the determinant of the matrix with entries $b,c,d,e$. Also this allows us to factor the term $p^2(1-p)^2$ immediately and makes the expressions less unwieldy.}
We make use of the fact that for a matrix with entries $ab, ac, ad,$ and $ae$, the determinant is $a^2be - a^2cd = a^2(be - cd)$.
\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
1 & \prob & -(\prob^2 - \prob^3)\\
-2(\prob^2 - \prob^3) & -4(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -21(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
\end{vmatrix}
=
= (\prob^2 - \prob^3) \cdot
\begin{vmatrix}
-4(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-21(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
-4 & -2\\
-21 & -3
\end{vmatrix}
~ - ~ \prob~ \cdot
~ - ~ \prob(\prob^2 - \prob^3)~ \cdot
\begin{vmatrix}
-2(\prob^2 - \prob^3) & -2(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -3(\prob^2 - \prob^3)
-2 & -2\\
-18 & -3
\end{vmatrix}
+ ~(\prob^2 - \prob^3)~ \cdot
- ~(\prob^2 - \prob^3)^2~ \cdot
\begin{vmatrix}
-2(\prob^2 - \prob^3) & -4(\prob^2 - \prob^3)\\
-18(\prob^2 - \prob^3) & -21(\prob^2 - \prob^3)
-2 & -4\\
-18 & -21
\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}
(\prob^2 - \prob^3)\cdot \left((-4 \cdot -3) - (-21 \cdot -2)\right) = (\prob^2 - \prob^3)\cdot(12 - 42) = -30(\prob^2 - \prob^3).\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}
-\prob(\prob^2 - \prob^3) \cdot \left((-2 \cdot -3) - (-18 \cdot -2)\right) = -\prob(\prob^2 - \prob^3) \cdot ( 6 - 36) = 30\prob(\prob^2 - \prob^3).\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}
-\left(\prob^2 - \prob^3\right)^2 \cdot \left((-2 \cdot -21) - (-18 \cdot -4)\right) = -\left(\prob^2 - \prob^3\right)^2 \cdot (42 - 72) = 30\left(\prob^2 - \prob^3\right)^2.\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)\]
\begin{equation}
\dtrm{\mtrix{\rpoly}} = -30(\prob^2 - \prob^3) + 30\prob(\prob^2 - \prob^3) + 30(\prob^2 - \prob^3)^2 = 30(\prob^2 - \prob^3)\left(-1 + \prob + (\prob^2 - \prob^3)\right).\label{eq:det-final}
\end{equation}
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}
Equation \cref{eq:det-final} has no roots in $(0, 1)$.
\end{proof}\AH{End proof of Lemma \ref{lem:lin-sys}}
\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.
\qed
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)$.
Thus, we have proved the lemma for fixed $p \in (0, 1)$.
\AH{End proof of Lemma \ref{lem:const-p}.}
\end{proof}
\qed