答案1
可以吗?可以。我现在设计四棵不同的树是不是很有创意?不。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tabular}{cp{2cm}c}
\begin{tikzpicture}[remember picture,grow=west]
\node[circle,fill] (TL) {}
child{ node[circle, fill = black] {}}
child{ node[circle, fill = black] {}
};
\node[circle,draw,dashed,fit=(TL)(TL-1)(TL-2)]{};
\end{tikzpicture}
& &
\begin{tikzpicture}[remember picture,grow=east]
\node[circle,fill] (TR) {}
child{ node[circle, fill = black] {}}
child{ node[circle, fill = black] {}
};
\node[circle,draw,dashed,fit=(TR)(TR-1)(TR-2)]{};
\end{tikzpicture} \\
\begin{tikzpicture}[remember picture,grow=west]
\node[circle,fill] (BL) {}
child{ node[circle, fill = black] {}}
child{ node[circle, fill = black] {}
};
\node[circle,draw,dashed,fit=(BL)(BL-1)(BL-2)]{};
\end{tikzpicture}
& &
\begin{tikzpicture}[remember picture,grow=east]
\node[circle,fill] (BR) {}
child{ node[circle, fill = black] {}}
child{ node[circle, fill = black] {}
};
\node[circle,draw,dashed,fit=(BR)(BR-1)(BR-2)]{};
\end{tikzpicture} \\
\end{tabular}
\begin{tikzpicture}[overlay,remember picture]
\draw (TL) -- (TR) node[midway,above] {$a$};
\draw[dotted] (BL) -- (BR);
\end{tikzpicture}
\end{document}