From 360bb98903091b2d94c79ada362f162243f1b4ca Mon Sep 17 00:00:00 2001 From: Aaron Huber Date: Tue, 21 Jul 2020 12:16:46 -0400 Subject: [PATCH] Started developing linear system. --- macros.tex | 1 + poly-form.tex | 52 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/macros.tex b/macros.tex index 2985657..0f2e489 100644 --- a/macros.tex +++ b/macros.tex @@ -23,6 +23,7 @@ \newcommand{\sch}{sch} \newcommand{\rw}{\textbf{W}}%\rw for random world \newcommand{\graph}[1]{G^{(#1)}} +\newcommand{\linsys}[1]{LS^{\graph{#1}}} %PDBs \newcommand{\ti}{TIDB} diff --git a/poly-form.tex b/poly-form.tex index acaeb03..b742d4d 100644 --- a/poly-form.tex +++ b/poly-form.tex @@ -135,10 +135,10 @@ We can compute $\rpoly(\prob,\ldots, \prob)^2$ in O(m) time. 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.$ \item Note that \AH{We need the correct formula for two-matchings below.} - \begin{align*} - &\numocc{G}{\ed} = m,\\ - &\numocc{G}{\twopath} = \sum_{u \in V} \binom{d_u}{2} \text{where $d_u$ is the degree of vertex $u$}\\ &\numocc{G}{\twodis} = \textbf{\textit{a correct formula}} - \end{align*} + \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} \end{enumerate} 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} @@ -169,9 +169,14 @@ We have either shown or will show that the following subgraph cardinalities can \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.} 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. -\[\numocc{G}{\oneint} = \sum_{u \in V} \binom{d_u}{3}\] +\begin{equation} +\numocc{G}{\oneint} = \sum_{u \in V} \binom{d_u}{3}\label{eq:3s} +\end{equation} $\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. -\[\numocc{G}{\twopathdis} + \numocc{G}{\threedis} = \sum_{(u, v) \in E} \binom{m - d_u - d_v + 1}{2}\] The implication in \cref{claim:four-two} follows by the above and \cref{lem:qE3-exp}. +\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}. \AH{Justify the last sentence.} \end{proof} @@ -362,7 +367,7 @@ 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} +\begin{Lemma}\label{lem:3p-G2} 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} @@ -388,7 +393,7 @@ The argument follows along the same lines as above. Given $s \subseteq S'$, it \subsection{Triangle} -\begin{Lemma} +\begin{Lemma}\label{lem:tri} For any graph $\graph{k}$, $\numocc{\graph{k}}{\tri} = 0$. \end{Lemma} @@ -397,4 +402,35 @@ The number of triangles in $\graph{k}$ for $k \geq 2$ will always be $0$ for the \end{proof} \qed +\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 their respective edge patterns in $O(m)$ time. Rearrange $\rpoly$ 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} +\end{align} + +\cref{eq:LS-rearrange} is the result of simply subtracting from both sides terms that are not wanted on the RHS. 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$ + +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)$. + +By \cref{lem:tri}, the first term is $0$ and $\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}, +\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^2 - 4 \cdot \numocc{\graph{1}}{\oneint}\left(\prob^2 - \prob^3\right)}. +\end{equation*} +