
Responder1
Você pode usar o poderosoforest
pacote; você pode até deixar os cálculos de conteúdo por conta do pacote:
O código:
\documentclass[border=5pt]{standalone}
\usepackage{amsmath}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
parent anchor=south,
s sep=2pt
},
delay={for descendants={
if n=1
{draw,content/.wrap 2 pgfmath args=
{$c\binom{n}{#2}^{2}$}{content}{int(2^level)}}
{if n'=1{draw,content/.wrap 2 pgfmath args=
{$c\binom{n}{#2}^{2}$}{content}{int(2^level)}}{}
},
where n children={0}{draw,content=c}{}
}
}
[$cn^{2}$,draw
[
[
[
[]
[]
[]
]
[
[,phantom]
]
[
[,phantom]
]
[
[]
[]
[]
]
]
[
[,phantom]
]
[
[,phantom]
]
[
[
[]
[]
[]
]
[
[,phantom]
]
[
[,phantom]
]
[
[]
[]
[]
]
]
]
[
[,phantom [,phantom]]
]
[
[,phantom [,phantom]]
]
[
[
[
[]
[]
[]
]
[
[,phantom]
]
[
[,phantom]
]
[
[]
[]
[]
]
]
[
[,phantom]
]
[
[,phantom]
]
[
[
[]
[]
[]
]
[
[,phantom]
]
[
[,phantom]
]
[
[]
[]
[]
]
]
]
]
\end{forest}
\end{document}
Responder2
forest
permite que você especifique uma árvore usando a notação de colchetes padrão. Verminha resposta a uma pergunta anteriorpara obter uma explicação de como transformar uma árvore em uma especificação usando notação de colchetes. Outras respostas abrangem outros pacotes adequados para desenhar árvores simples (conforme especificado na pergunta). Então, se você não gosta forest
, talvez um dos outros sirva.
Para forest
, aqui está um protótipo para você começar:
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
draw,
align=center
}
[root
[child
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
[grandchild, calign with current]
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
]
[child
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
[grandchild, calign with current]
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
]
[child
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
[grandchild, calign with current]
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
]
[child
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
[grandchild, calign with current]
[grandchild
[great\\-grandchild]
[great\\-grandchild]
[great\\-grandchild]
]
]
]
\end{forest}
\end{document}