File: binarytree-ex1.tex

package info (click to toggle)
texlive-base 2018.20190227-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 680,080 kB
  • sloc: perl: 39,836; sh: 6,386; makefile: 3,708; ruby: 2,412; ansic: 2,266; xml: 1,686; cpp: 695; awk: 606; python: 583; tcl: 541; lisp: 86; php: 65; sed: 8
file content (16 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
\documentclass{standalone}
\usepackage{binarytree}
\usetikzlibrary{graphs}

\begin{document}
\btreeset{math labels,scale=0.7}
\begin{tikzpicture}
  \BinaryTree[local bounding box=INIT]{%
    :1!l:w!r:x:red!l:\sigma,ll!l:\sigma,lr!r:\sigma,
    r:w!r:y!r:\sigma,rr!l:\sigma,rl!l:\sigma}{3}
  \BinaryTree[local bounding box=FINAL,xshift=10cm]{
    :1!l:w!l:x':red!l:\sigma,lr!r:\sigma,ll!r:\sigma,
    r:w!r:y!r:\sigma,rr!l:\sigma,rl!l:\sigma}{3}
  \graph[use existing nodes]{ INIT -> FINAL};
\end{tikzpicture}
\end{document}