%root: main.tex \begin{proof} The proof consists of two parts. First we need to show that a vector $\vct{b}$ satisfying the linear system exists and further can be computed in $O(m)$ time. Second we need to show that $\numocc{G}{\tri}, \numocc{G}{\threedis}$ can indeed be computed in time $O(1)$. The lemma claims that for $\vct{M} = \begin{pmatrix} 1 - 3p & -(3\prob^2 - \prob^3)\\ 10(3\prob^2 - \prob^3) & 10(3\prob^2 - \prob^3) \end{pmatrix}$, $\vct{x} = \begin{pmatrix} \numocc{G}{\tri}]\\ \numocc{G}{\threedis} \end{pmatrix}$ satisfies the linear system $\vct{M} \cdot \vct{x} = \vct{b}$. To prove the first step, we use \Cref{lem:qE3-exp} to derive the following equality (dropping the superscript and referring to $G^{(1)}$ as $G$): \begin{align} \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 \nonumber\\ &+ 6\numocc{G}{\threepath}\prob^4 + 6\numocc{G}{\twopathdis}\prob^5 + 6\numocc{G}{\threedis}\prob^6 = \rpoly_{G}^3(\prob,\ldots, \prob)\label{eq:lem-qE3-exp}\\ \numocc{G}{\tri}&+\numocc{G}{\threepath}\prob+\numocc{G}{\twopathdis}\prob^2+\numocc{G}{\threedis}\prob^3\nonumber\\ &= \frac{\rpoly_{G}^3(\prob,\ldots, \prob)}{6\prob^3} - \frac{\numocc{G}{\ed}}{6\prob} - \numocc{G}{\twopath}-\numocc{G}{\twodis}\prob-\numocc{G}{\oneint}\prob\label{eq:b1-alg-1}\\ \numocc{G}{\tri}(1-3p) &- \numocc{G}{\threedis}(3\prob^2 -\prob^3) = \nonumber\\ \frac{\rpoly_{G}^3(\prob,\ldots, \prob)}{6\prob^3} &- \frac{\numocc{G}{\ed}}{6\prob} - \numocc{G}{\twopath}-\numocc{G}{\twodis}\prob-\numocc{G}{\oneint}\prob\nonumber\\ &-\left[\numocc{G}{\threepath}\prob+3\numocc{G}{\tri}\prob\right]-\left[\numocc{G}{\twopathdis}\prob^2+3\numocc{G}{\threedis}\prob^2\right]\label{eq:b1-alg-2} \end{align} \Cref{eq:lem-qE3-exp} is the result of \Cref{lem:qE3-exp}. We obtain the remaining equations through standard algebraic manipulations. Note that the LHS of \Cref{eq:b1-alg-2} is obtained using \cref{eq:2pd-3d} and \cref{eq:3p-3tri} and is indeed the product $\vct{M}[1] \cdot \vct{x}[1]$. Further note that this product is equal to the RHS of \Cref{eq:b1-alg-2}, where every term is computable in $O(m)$ time (by equations (\ref{eq:1e})-(\ref{eq:3p-3tri})). We set $\vct{b}[1]$ to the RHS of \Cref{eq:b1-alg-2}. We follow the same process in deriving an equality for $G^{(2)}$. Replacing occurrences of $G$ with $G^{(2)}$, we obtain an equation (below) of the form of \cref{eq:b1-alg-2} for $G^{(2)}$. Substituting identities from \cref{lem:3m-G2} and \Cref{lem:tri} we obtain \begin{align} 0-\left(8\numocc{G}{\threedis}\right.&\left.+6\numocc{G}{\twopathdis}+4\numocc{G}{\oneint}+4\numocc{G}{\threepath}+2\numocc{G}{\tri}\right)(3\prob^2 -\prob^3)=\nonumber\\ &\frac{\rpoly_{\graph{2}}^3(\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\nonumber\\ &-\left[\numocc{\graph{2}}{\twopathdis}\prob^2+3\numocc{\graph{2}}{\threedis}\prob^2\right]-\left[\numocc{\graph{2}}{\threepath}\prob + 3\numocc{\graph{2}}{\tri}\prob\right]\label{eq:b2-sub-lem}\\ (10\numocc{G}{\tri} &+ 10{G}{\threedis})(3\prob^2 -\prob^3) = \nonumber\\ &\frac{\rpoly_{\graph{2}}^3(\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\nonumber\\ &-\left[\numocc{\graph{2}}{\threepath}\prob+3\numocc{\graph{2}}{\tri}\prob\right]-\left[\numocc{\graph{2}}{\twopathdis}\prob^2-3\numocc{\graph{2}}{\threedis}\prob^2\right]\nonumber\\ &+\left(4\numocc{G}{\oneint}+\left[6\numocc{G}{\twopathdis}+18\numocc{G}{\threedis}\right]+\left[4\numocc{G}{\threepath}+12\numocc{G}{\tri}\right]\right)(3\prob^2 - \prob^3)\label{eq:b2-final} \end{align} The steps to obtaining \cref{eq:b2-final} are analogous to the derivation immediately preceding. As in the previous derivation, note that the LHS of \Cref{eq:b2-final} is the same as $\vct{M}[2]\cdot \vct{x}[2]$. The RHS of \Cref{eq:b2-final} has terms all computable (by equations (\ref{eq:1e})-(\ref{eq:3p-3tri})) in $O(m)$ time. Setting $\vct{b}[2]$ to the RHS then completes the proof of step 1. Note that if $\vct{M}$ has full rank then one can compute $\numocc{G}{\tri}$ and $\numocc{G}{\threedis}$ in $O(1)$ using Gaussian elimination. To show that $\vct{M}$ indeed has full rank, we show in what follows that $\dtrm{\vct{M}}\ne 0$ for every $\prob\in (0,1)$. $\dtrm{\vct{M}} = $ \begin{align} &\begin{vmatrix} 1-3\prob &-(3\prob^2 - \prob^3)\\ 10(3\prob^2 - \prob^3) &10(3\prob^2 - \prob^3) \end{vmatrix} = (1-3\prob)\cdot 10(3\prob^2-\prob^3) +10(3\prob^2-\prob^3)\cdot(3\prob^2 - \prob^3)\nonumber\\ &=10(3\prob^2-\prob^3)\cdot(1-3\prob+3\prob^2-\prob^3) = 10(3\prob^2-\prob^3)\cdot(-\prob^3+3\prob^2-3\prob + 1)\nonumber\\ &=10\prob^2(3 - \prob)\cdot(1-\prob)^3\label{eq:det-final} \end{align} From \Cref{eq:det-final} it can easily be seen that the roots of $\dtrm{\vct{M}}$ are $0, 1,$ and $3$. Hence there are no roots in $(0, 1)$ and \Cref{lem:lin-sys} follows. \qed \end{proof} \subsection{Proof of \Cref{th:single-p}} \begin{proof} We can compute $\graph{2}$ from $\graph{1}$ in $O(m)$ time. Additionally, if in time $O(T(m))$, we have $\rpoly_{\graph{\ell}}^3(\prob,\dots,\prob)$ for $\ell\in [2]$, then the theorem follows by \Cref{lem:lin-sys}. \qed \end{proof} In other words, if \Cref{th:single-p} holds, then so must \Cref{th:single-p-hard}. \subsection{Proof of \Cref{th:single-p-hard}} \begin{proof} For the sake of contradiction, assume that for any $G$, we can compute $\rpoly_{G}^3(\prob,\dots,\prob)$ in $o\inparen{m^{1+\eps_0}}$ time. Let $G$ be the input graph. Then by \Cref{th:single-p} we can compute $\numocc{G}{\tri}$ in further time $o\inparen{m^{1+\eps_0}}+O(m)$. Thus, the overall, reduction takes $o\inparen{m^{1+\eps_0}}+O(m)= o\inparen{m^{1+\eps_0}}$ time, which violates \Cref{conj:graph}. \qed \end{proof}