Adjustments to subgraph patterns and to figures.

This commit is contained in:
Aaron Huber 2020-09-11 16:40:00 -04:00
parent 6a7f874152
commit 78d482067c
2 changed files with 62 additions and 68 deletions

View file

@ -57,7 +57,7 @@ For example, the expression $xy$ is a monomial from the term $3xy$ of $\poly(\vc
\begin{Definition}[Expression Tree]\label{def:express-tree}
An expression tree $\etree$ is a binary %an ADT logically viewed as an n-ary
tree, whose internal nodes are from the set $\{+, \times\}$, with leaf nodes being either numerical coefficients $(\tnum)$ or variables $(\var)$. The members of $\etree$ are \type, \val, \vari{partial}, \vari{children}, and \vari{weight}, where \type is the type of value stored in the root node of $\etree$, \val is the value stored, and \vari{children} is the a list of the root of $\etree$'s children. Remaining fields hold values whose semantics we will fix later. When $\etree$ is used as input of ~\cref{alg:mon-sam} and ~\cref{alg:one-pass}, the values of \vari{partial} and \vari{weight} will not be set. %SEMANTICS FOR \etree: \vari{partial} is the sum of $\etree$'s coefficients , n, and \vari{weight} is the probability of $\etree$ being sampled.
tree, whose internal nodes are from the set $\{+, \times\}$, with leaf nodes being either from the set $\mathbb{R}$ $(\tnum)$ or from the set of monomials $(\var)$. The members of $\etree$ are \type, \val, \vari{partial}, \vari{children}, and \vari{weight}, where \type is the type of value stored in the root node of $\etree$, \val is the value stored, and \vari{children} is the a list of the root of $\etree$'s children. Remaining fields hold values whose semantics we will fix later. When $\etree$ is used as input of ~\cref{alg:mon-sam} and ~\cref{alg:one-pass}, the values of \vari{partial} and \vari{weight} will not be set. %SEMANTICS FOR \etree: \vari{partial} is the sum of $\etree$'s coefficients , n, and \vari{weight} is the probability of $\etree$ being sampled.
\end{Definition}
Note that $\etree$ encodes an expression generally \textit{not} in the standard monomial basis, for example, when $\etree$ represents the expression $(x + 2y)(2x - y)$.
@ -66,13 +66,14 @@ Note that $\etree$ encodes an expression generally \textit{not} in the standard
Denote $poly(\etree)$ to be the function that takes as input expression tree $\etree$ and outputs its corresponding polynomial. Recursively defined on $\etree$ as follows, where $\etree_\lchild$ and $\etree_\rchild$ denote the left and right child of $\etree$ respectively.
\begin{align*}
&\etree.\type = +\mapsto&& \etree_\lchild + \etree_\rchild\\
&\etree.\type = \times\mapsto&& \etree_\lchild \cdot \etree_\rchild\\
&\etree.\type = +\mapsto&& \polyf(\etree_\lchild) + \polyf(\etree_\rchild)\\
&\etree.\type = \times\mapsto&& \polyf(\etree_\lchild) \cdot \polyf(\etree_\rchild)\\
&\etree.\type = \var \text{ OR } \tnum\mapsto&& \etree.\val
\end{align*}
\end{Definition}
\AH{Below seems like over-defining to me. Is this really necessary?}
\AH{1) Is $OR$ the best way to express the third case?
\par2) Below seems like over-defining to me. Is this really necessary? The first sentence I think is \textit{enough}.}
Note that addition and multiplication follow the normal interpretation over polynomials. Specifically, when adding two monomials whose variables and respective exponents agree, the coefficients corresponding to the monomials are added and their sum is multiplied to the monomial. Multiplication here is denoted by concatenation of the monomial and coefficient. When two monomials are multiplied, the product of each corresponding coefficient is computed, and the variables in each monomial are multiplied, i.e., the exponents of like variables are added. Again we notate this by the direct product of coefficient product and all disitinct variables in the two monomials, with newly computed exponents.
\begin{Definition}[Expression Tree Set]\label{def:express-tree-set}$\etreeset{\smb}$ is the set of all possible expression trees $\etree$, such that $poly(\etree) = \poly(\vct{X})$.
@ -80,15 +81,17 @@ Note that addition and multiplication follow the normal interpretation over poly
For our running example, $\etreeset{\smb} = \{2x^2 + 3xy - 2y^2, (x + 2y)(2x - y)\}$. Note that \cref{def:express-tree-set} implies that $\etree \in \etreeset{poly(\etree)}$.
\AH{Just wondering if there is a more simple way to describe ~\cref{def:expand-tree}. \par Also not sure about the notation \vari{List}.}
\begin{Definition}[Expanded T]\label{def:expand-tree}
$\expandtree{\etree}$ is the pure SOP expansion of $\etree$. The logical view of \expandtree{\etree} ~is a list of tuples $(\monom, \coef)$, recursively defined as
$\expandtree{\etree}$ is the pure SOP expansion of $\etree$. The logical view of \expandtree{\etree} ~is a list of tuples $(\monom, \coef)$, where $\monom$ is of type monomial and $\coef$ is in $\mathbb{R}$, recursively defined as
\begin{align*}
&\etree.\type = + \mapsto&& \etree_\lchild, \etree_\rchild\\
&\etree.\type = \times \mapsto&& \etree_\lchild \otimes \etree_\rchild\\
&\etree.\type = \tnum \mapsto&& (\emptyset, \etree.\val)\\
&\etree.\type = \var \mapsto&& (\etree.\val, 1)
&\etree.\type = + \mapsto&& \elist{\expandtree{\etree_\lchild}, \expandtree{\etree_\rchild}}\\
&\etree.\type = \times \mapsto&& \elist{\expandtree{\etree_\lchild} \otimes \expandtree{\etree_\rchild}}\\
&\etree.\type = \tnum \mapsto&& \elist{(\emptyset, \etree.\val)}\\
&\etree.\type = \var \mapsto&& \elist{(\etree.\val, 1)}
\end{align*}
such that tuple multiplication of $(\monom_1, \coef_1) \cdot (\monom_2, \coef_2) = (\monom_1 \cdot \monom_2, \coef_1 \times \coef_2)$ is defined as the direct product of $\monom_i$'s and the standard product of $\coef_i$'s, and $\otimes$ is defined as the cross-product tuple multiplication of all such tuples returned by both $\etree_\lchild, \etree_\rchild$ children.
such that the multiplication of two tuples %is the standard multiplication over monomials and the standard multiplication over coefficients to produce the product tuple, as in
is their direct product $(\monom_1, \coef_1) \cdot (\monom_2, \coef_2) = (\monom_1 \times \monom_2, \coef_1 \times \coef_2)$ such that monomials $\monom_1$ and $\monom_2$ are concatenated in a product operation, while the standard product operation over reals applies to $\coef_1 \times \coef_2$. The operator $\otimes$ is defined as the cross-product tuple multiplication of all such tuples returned by both $\expandtree{\etree_\lchild}$ and $\expandtree{\etree_\rchild}$.
\end{Definition}
\begin{Example}\label{example:expr-tree-T}
@ -102,7 +105,7 @@ To illustrate \cref{def:expand-tree} with an example, consider the product $(x +
\node[tree_node]{$\boldsymbol{\times}$}
child{node[tree_node]{$\boldsymbol{+}$}
child{node[tree_node]{$\boldsymbol{\times}$}
child{node[tree_node]{1}}
child[missing]{node[tree_node]{}}
child{node[tree_node]{x}}
}
child{node[tree_node]{$\boldsymbol{\times}$}
@ -133,14 +136,13 @@ To illustrate \cref{def:expand-tree} with an example, consider the product $(x +
\begin{Definition}[Positive T]\label{def:positive-tree}
Let $\abs{\etree}$ denote the resulting expression tree such that, for each leaf node $\etree'$ of $\etree$ where $\etree'.\type$ is numeric, $\etree'.\vari{value} = |\etree'.\vari{value}|$. %value $\coef$ of each coefficient leaf node in $\etree$ is set to %$\coef_i$ in $\etree$ is exchanged with its absolute value$|\coef|$.
Let $\abs{\etree}$ denote the resulting expression tree such that, for each leaf node $\etree'$ of $\etree$ where $\etree'.\type$ is $\tnum$, $\etree'.\vari{value} = |\etree'.\vari{value}|$. %value $\coef$ of each coefficient leaf node in $\etree$ is set to %$\coef_i$ in $\etree$ is exchanged with its absolute value$|\coef|$.
\end{Definition}
Using the same polynomial from the above example, $poly(\abs{\etree}) = (x + 2y)(2x + y) = 2x^2 +xy +4xy + 2y^2 = 2x^2 + 5xy + 2y^2$. Note that this \textit{is not} the same as $\poly(\vct{X})$.
\AH{Just wondering if the prose "for their corresponding variables," suffices or if it is appropriate to mention $\vct{X}$ or not?}
\begin{Definition}[Evaluation]\label{def:exp-poly-eval}
Given an expression tree $\etree$ and polynomial $poly(\etree)$, the evaluation of both expressions at $\vct{v} \in \mathbb{R}^N$ is performed by substituting values of $\vct{v}$ in for their corresponding variables and performing the indicated operations in either structure. Observe that $\etree(\vct{v}) = poly(\etree)(\vct{v})$.
Given an expression tree $\etree$ and $\vct{v} \in \mathbb{R}^\numvar$, $\etree(\vct{v}) = poly(\etree)(\vct{v})$.
\end{Definition}
In the subsequent subsections we lay the groundwork to prove the following theorem.
@ -149,13 +151,12 @@ In the subsequent subsections we lay the groundwork to prove the following theor
For any query polynomial $\poly(\vct{X})$, an approximation of $\rpoly(\prob_1,\ldots, \prob_\numvar)$ can be computed in $O\left(\treesize(\etree) + \frac{\log{\frac{1}{\conf}}\cdot \abs{\etree}^2(1,\ldots, 1)}{\error^2\cdot\rpoly^2(\prob_1,\ldots, \prob_\numvar)}\right)$, with $(\error,\delta)$-bounds, where $k$ denotes the degree of $\poly$.
\end{Theorem}
\AH{I don't know if I should use the proof environment for ~\cref{lem:approx-alg}, and if so, where to start it. I have noted at the conclusion of ~\cref{cor:adj-err} that the proof of ~\cref{lem:approx-alg} follows.}
\subsection{Approximating $\rpoly$}
\subsubsection{Description}
Algorithm ~\ref{alg:mon-sam} approximates $\rpoly$ using the following steps. First, a call to $\onepass$ on its input $\etree$ produces a non-biased weight distribution over the monomials of $\expandtree{\etree}$ and a correct count of $|\etree|(1,\ldots, 1)$, i.e., the number of monomials in $\expandtree{\etree}$. Next, ~\cref{alg:mon-sam} calls $\sampmon$ to sample one monomial and its sign from $\expandtree{\etree}$. The sampling is repeated $\ceil{\frac{2\log{\frac{2}{\delta}}}{\epsilon^2}}$ times, where each of the samples are evaluated over $\vct{p}$, multiplied by $1 \times sign$, and summed. The final result is scaled accordingly returning an estimate of $\rpoly$ with the claimed $(\error, \conf)$-bound of ~\cref{lem:mon-samp}.
Kindly recall that the notaion $[x, y]$ denotes the range of values between $x$ and $y$ inclusive. The notation $\{x, y\}$ denotes the set of values consisting of $x$ and $y$.
\subsubsection{Psuedo Code}
\begin{algorithm}[H]
@ -163,10 +164,10 @@ Algorithm ~\ref{alg:mon-sam} approximates $\rpoly$ using the following steps. F
\label{alg:mon-sam}
\begin{algorithmic}[1]
\Require \etree: Binary Expression Tree
\Require $\vct{p}$: Vector $\in [0, 1]^N$
\Require $\conf$: $\in [0, 1]$
\Require $\error$: $\in [0, 1]$
\Ensure \vari{acc}: $\in \mathbb{R}$
\Require $\vct{p} = (\prob_1,\ldots, \prob_\numvar)$ $\in [0, 1]^N$
\Require $\conf$ $\in [0, 1]$
\Require $\error$ $\in [0, 1]$
\Ensure \vari{acc} $\in \mathbb{R}$
\State $\accum \gets 0$\label{alg:mon-sam-global1}
\State $\numsamp \gets \ceil{\frac{2 \log{\frac{2}{\conf}}}{\error^2}}$\label{alg:mon-sam-global2}
\State $(\vari{\etree}_\vari{mod}, \vari{size}) \gets $ \onepass($\etree$)\label{alg:mon-sam-onepass}\Comment{$\onepass$ is ~\cref{alg:one-pass} \;and \sampmon \; is ~\cref{alg:sample}}
@ -174,7 +175,7 @@ Algorithm ~\ref{alg:mon-sam} approximates $\rpoly$ using the following steps. F
\State $(\vari{M}_\vari{i}, \vari{sgn}_\vari{i}) \gets $ \sampmon($\etree_\vari{mod}$)
\State $\vari{Y}_\vari{i} \gets 1$\label{alg:mon-sam-assign1}
\For{$\vari{x}_{\vari{j}}$ \text{ in } $\vari{M}_{\vari{i}}$}
\State $\vari{Y}_\vari{i} \gets \vari{Y}_\vari{i} \times \; \vari{\prob}_\vari{j}$\label{alg:mon-sam-product2} \Comment{$\vari{p}_\vari{j}$ is the probability of $\vari{x}_\vari{j}$ from input $\vct{p}$}
\State $\vari{Y}_\vari{i} \gets \vari{Y}_\vari{i} \times \; \vari{\prob}_\vari{j}$\label{alg:mon-sam-product2} \Comment{$\vari{p}_\vari{j}$ is the assignment to $\vari{x}_\vari{j}$ from input $\vct{p}$}
\EndFor
\State $\vari{Y}_\vari{i} \gets \vari{Y}_\vari{i} \times\; \vari{sgn}_\vari{i}$\label{alg:mon-sam-product}
\State $\accum \gets \accum + \vari{Y}_\vari{i}$\Comment{Store the sum over all samples}\label{alg:mon-sam-add}
@ -250,10 +251,11 @@ Thus we have $O(\treesize(\etree)) + O(\frac{\log{\frac{1}{\conf}}}{\error^2} \c
\qed
\begin{Corollary}\label{cor:adj-err}
\begin{proof}[Proof of Theorem \ref{lem:approx-alg}]
%\begin{Corollary}\label{cor:adj-err}
Setting $\error = \error \cdot \frac{\rpoly(\prob_1,\ldots, \prob_\numvar)}{\abs{\etree}(1,\ldots, 1)}$ achieves $1 \pm \epsilon$ multiplicative error bounds, in $O\left(\treesize(\etree) + \frac{\log{\frac{1}{\conf}}\cdot \abs{\etree}^2(1,\ldots, 1)}{\error^2\cdot\rpoly^2(\prob_1,\ldots, \prob_\numvar)}\right)$.
\end{Corollary}
\begin{proof}[Proof of Corollary \ref{cor:adj-err}]
%\end{Corollary}
Since it is the case that we have $\error \cdot \abs{\etree}(1,\ldots, 1)$ additive error, one can set $\error = \error \cdot \frac{\rpoly(\prob_1,\ldots, \prob_\numvar)}{\abs{\etree}(1,\ldots, 1)}$, yielding a multiplicative error proportional to $\rpoly(\prob_1,\ldots, \prob_\numvar)$. This only effects the runtime in the number of samples taken, changing the first factor of the second summand of the original runtime accordingly.
The derivation over the number of samples is then
@ -295,7 +297,7 @@ See algorithm ~\ref{alg:one-pass} for details.
\begin{algorithmic}[1]
\Require \etree: Binary Expression Tree
\Ensure \etree: Binary Expression Tree
\Ensure \vari{sum}: Real
\Ensure \vari{sum} $\in \mathbb{R}$
\If{$\etree.\type = +$}\label{alg:one-pass-equality1}
\State $\accum \gets 0$\label{alg:one-pass-plus-assign1}
\For{$child$ in $\etree.\vari{children}$}\Comment{Sum up all children coefficients}
@ -326,29 +328,20 @@ See algorithm ~\ref{alg:one-pass} for details.
\EndIf
\end{algorithmic}
\end{algorithm}
\AH{Figure here ---v}
For example, consider the when $\etree$ is $+\left(\times\left(+\left(\times\left(1, x_1\right), \times\left(1, x_2\right)\right), +\left(\times\left(1, x_1\right), \times\left(-1, x_2\right)\right)\right), \times\left(\times\left(1, x_2\right), \times\left(1, x_2\right)\right)\right)$, which encodes the expression $(x_1 + x_2)(x_1 - x_2) + x_2^2$. After one pass, \cref{alg:one-pass} would have computed the following weight distribution. For the two children of the root $+$ node $\etree$, $\etree_\lchild.\wght = \frac{4}{5}$ and $\etree_\rchild.\wght = \frac{1}{5}$. Similarly, $\stree \gets \etree_\lchild$, $\stree_\lchild.\wght = \stree_\rchild.\wght = \frac{1}{2}$. Note that in this example, the sampling probabilities for the children of each inner $+$ node of $\stree$ are equal to one another because both parents have the same number of children, and, in each case, the children of each parent $+$ node share the same $|\coef_i|$.
\begin{figure}[h!]
\begin{tikzpicture}[thick, level distance=1.2cm, level 1/.style={sibling distance= 5cm}, level 2/.style={sibling distance=3cm}, level 3/.style={sibling distance=1.5cm}, level 4/.style={sibling distance=0.75cm}, every child/.style={black}]
\node[tree_node] {$\boldsymbol{+}$}
child[red]{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{+}$} %edge from parent node[left]{$\boldsymbol{\etree_\lchild.\wght}$}
child[red]{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node]{$\boldsymbol{1}$}}
child{node[tree_node]{$\boldsymbol{x_1}$}}
}
child[red]{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{1}$}}
child{node[tree_node] {$\boldsymbol{x_2}$}}
}
}
\begin{tikzpicture}[thick, level distance=1.2cm, level 1/.style={sibling distance= 5cm}, level 2/.style={sibling distance=3cm}, level 3/.style={sibling distance=1.5cm}, level 4/.style={sibling distance= 1cm}, every child/.style={black}]
\node[tree_node](root) {$\boldsymbol{+}$}
child[red]{node[tree_node](tl) {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{+}$}
child{node[tree_node]{$\boldsymbol{x_1}$} }
child{node[tree_node] {$\boldsymbol{x_2}$}}
}
child{node[tree_node] {$\boldsymbol{+}$}
child[red]{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{1}$}}
child{node[tree_node] {$\boldsymbol{x_1}$}}
}
child{node[tree_node] {$\boldsymbol{x_1}$}}
%child[missing]{node[tree_node] {$\boldsymbol{1}$}}
child[red]{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{-1}$}}
child{node[tree_node] {$\boldsymbol{x_2}$}}
@ -356,12 +349,10 @@ For example, consider the when $\etree$ is $+\left(\times\left(+\left(\times\lef
}
}
child{node[tree_node] {$\boldsymbol{\times}$} edge from parent [red]
child{node[tree_node] {$\boldsymbol{1}$}}
child{node[tree_node] {$\boldsymbol{\times}$}
child{node[tree_node] {$\boldsymbol{x_2}$}}
child{node[tree_node] {$\boldsymbol{x_2}$}}
}
};
child{node[tree_node] {$\boldsymbol{x_2}$}}
child{node[tree_node] {$\boldsymbol{x_2}$}}
};
\node[font=\bfseries, red] at (-2.8, -0.2) {$\etree_\lchild.\wght \boldsymbol{= \frac{4}{5} } $};
\end{tikzpicture}
\caption{Beautiful days ahead!}
\label{fig:expr-tree-T-wght}
@ -414,7 +405,7 @@ See algorithm ~\ref{alg:sample} for the details of $\sampmon$ algorithm.
\begin{algorithmic}[1]
\Require \etree: Binary Expression Tree
\Ensure \vari{vars}: TreeSet
\Ensure \vari{sgn}: Integer in $\{-1, 1\}$
\Ensure \vari{sgn} $\in \{-1, 1\}$
\Comment{Algorithm ~\ref{alg:one-pass} should have been run before algorithm ~\ref{alg:sample}}
\State $\vari{vars} \gets new$ $TreeSet()$\label{alg:sample-global1}
\State $\vari{sgn} \gets 1$\label{alg:sample-global2}

View file

@ -78,6 +78,7 @@
\newcommand{\smb}{\poly\left(\vct{X}\right)}%smb for standard monomial basis
\newcommand{\etreeset}[1]{\vari{ET}\left(#1\right)}
\newcommand{\expandtree}[1]{\vari{E}(#1)}
\newcommand{\elist}[1]{\vari{List}\pbox{#1}}
%expandtree tuple elements:
\newcommand{\monom}{\vari{v}}
\newcommand{\coef}{\vari{c}}
@ -109,8 +110,9 @@
%Global styles
\tikzset{
default_node/.style={align=center, inner sep=0pt},
pattern_node/.style={fill, draw, inner sep=0pt, minimum size = 2pt, circle},
tree_node/.style={default_node, draw=black, black, circle, text width=0.3cm, font=\bfseries, minimum size=0.65cm}
pattern_node/.style={fill=gray!50, draw=black, semithick, inner sep=0pt, minimum size = 2pt, circle},
tree_node/.style={default_node, draw=black, black, circle, text width=0.3cm, font=\bfseries, minimum size=0.65cm},
every path/.style={very thick, draw}
}
%Subgraph patterns
\newcommand{\ed}{
@ -118,58 +120,59 @@
%\begin{scope}[yshift=-0.1cm]
\node at (0, 0)[pattern_node](bottom){};
\node [above=0.07cm of bottom, pattern_node] (top){};
\draw[semithick] (top) -- (bottom);
\draw (top) -- (bottom);
%\end{scope}
\end{tikzpicture}
}
\newcommand{\twodis}{
\begin{tikzpicture}
\node at (0, 0) [pattern_node] (bottom1) {};
\node[above=0.07cm of bottom1, pattern_node] (top1) {} edge [semithick] (bottom1);
\node[above=0.07cm of bottom1, pattern_node] (top1) {} edge (bottom1);
\node at (0.14, 0) [pattern_node] (bottom2) {};
\node [above=0.07cm of bottom2, pattern_node] (top2) {} edge [semithick] (bottom2);
\node [above=0.07cm of bottom2, pattern_node] (top2) {} edge (bottom2);
\end{tikzpicture}
}
\newcommand{\twopath}{
\begin{tikzpicture}
\node at (0, 0.08) [pattern_node] (top){};
\node [below left=0.08cm and 0.01cm of top, pattern_node](left){};
\node[below right=0.08cm and 0.01cm of top, pattern_node](right){};
\draw[semithick](top) -- (left);
\draw[semithick](top) -- (right);
\node [below left=0.075cm and 0.05cm of top, pattern_node](left){};
\node[below right=0.075cm and 0.05cm of top, pattern_node](right){};
\draw (top) -- (left);
\draw (top) -- (right);
\end{tikzpicture}
}
\newcommand{\threedis}{
\begin{tikzpicture}
\node at (0, 0) [pattern_node] (bottom1) {};
\node[above=0.07cm of bottom1, pattern_node] (top1) {} edge [semithick] (bottom1);
\node[above=0.07cm of bottom1, pattern_node] (top1) {} edge (bottom1);
\node at (0.14, 0) [pattern_node] (bottom2) {};
\node [above=0.07cm of bottom2, pattern_node] (top2) {} edge [semithick] (bottom2);
\node [above=0.07cm of bottom2, pattern_node] (top2) {} edge (bottom2);
\node at (0.28, 0) [pattern_node] (bottom3) {};
\node [above=0.07cm of bottom3, pattern_node] (top3) {} edge [semithick] (bottom3);
\node [above=0.07cm of bottom3, pattern_node] (top3) {} edge (bottom3);
\end{tikzpicture}
}
\newcommand{\tri}{
\begin{tikzpicture}
\node at (0, 0.08) [pattern_node] (top){};
\node [below left=0.08cm and 0.01cm of top, pattern_node](left){} edge [semithick] (top);
\node[below right=0.08cm and 0.01cm of top, pattern_node](right){} edge [semithick] (top) edge [semithick] (left);
\node [below left=0.08cm and 0.01cm of top, pattern_node](left){} edge (top);
\node[below right=0.08cm and 0.01cm of top, pattern_node](right){} edge (top) edge (left);
\end{tikzpicture}
}
\newcommand{\twopathdis}{\ed~\twopath}
\newcommand{\threepath}{
\begin{tikzpicture}
\node at (0, 0) [pattern_node] (node1a) {};
\node [above=0.07cm of node1a, pattern_node] (node1b) {} edge [semithick] (node1a);
\node [above=0.07cm of node1a, pattern_node] (node1b) {} edge (node1a);
\node [right=0.099cm of node1a, pattern_node] (node2b) {}; %edge [semithick] (node1b);
\node [above=0.07cm of node2b, pattern_node] (node3b) {} edge [semithick] (node2b) edge [semithick] (node1b);
\node [above=0.07cm of node2b, pattern_node] (node3b) {} edge (node2b);
\draw (node1b) -- (node3b);
\end{tikzpicture}
}
\newcommand{\oneint}{
\begin{tikzpicture}[level/.style={sibling distance=0.14cm, level distance=0.15cm}]
\node at (0, 0) [pattern_node] {} [grow=down, semithick]
\node at (0, 0) [pattern_node] {} [grow=down]
child{node [pattern_node]{}}
child [thick] {node [pattern_node] {}}
child {node [pattern_node] {}}
child{node [pattern_node] {}};
\end{tikzpicture}
}