# Draw a counting tree with grow right and then placed on the right (or left) of page that shown on the picture [closed]

I need help about tikz (or any other latex tools) on how to draw a counting tree with grow right and then placed on the right (or left) of page that shown on the picture.

• Welcome to TeX.SE! What you try so far? Here on site are a lot of examples how to draw tree diagrams ... – Zarko Sep 19 '20 at 19:16
• Any news? You receive two answer, is any of them acceptable? – Zarko Oct 30 '20 at 15:57
• Does this answer your question? Custom horizontal tikz tree – Elad Den Feb 28 at 14:07

This is only about how to draw the counting tree, using the istgame package:

\documentclass{article}

\usepackage{istgame}

\begin{document}

%% tree
\begin{istgame}[scale=.7,font=\scriptsize]
\tikzset{oval node/.style={ellipse node,draw=none}}
\setistgrowdirection'{east}
\xtdistance{14mm}{60mm}
\istrooto(A){start}   \istb \istb \istb \endist
\xtdistance{12mm}{20mm}
\istrooto(0)(A-1){0}  \istb \istb \istb \endist
\istrooto(1)(A-2){1}  \istb \istb \istb \endist
\istrooto(2)(A-3){2}  \istb \istb \istb \endist
\xtdistance{10mm}{10mm}
\istrooto(00)(0-1){0}
\endist
\istrooto(01)(0-2){1}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(02)(0-3){2}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(10)(1-1){0}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(11)(1-2){1}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(12)(1-3){2}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(20)(2-1){0}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(21)(2-2){1}
\istb{}{0}
\istb{}{1}
\endist
\istrooto(22)(2-3){2}
\endist

\node [anchor=mid] at ([yshift=-1.3cm,xshift=-1.2cm]22) {a};
\node [anchor=mid] at ([yshift=-1.3cm]22) {b};
\node [anchor=mid] at ([yshift=-1.3cm,xshift=1.3cm]22) {c};
\end{istgame}

\end{document}

• Thank for your help. I already did this, the only thing that I don't is how to make the letters a b c at the bottom. Now you solve it completely, and I also learn about istgame (this is new for me) package in your solution, thank you very much. I hope I can solve at least one of another users qeustion. – erdos Sep 30 '20 at 23:25

with forest

\documentclass[margin=3mm]{standalone}
\usepackage{forest}
\usetikzlibrary{positioning}

\begin{document}
\begin{forest}
for tree = {font=\scriptsize,
anchor=west,
math content,
grow'=0,
s sep=2mm,
l sep=7mm
}
[start
[0
[0  [0\quad {2^{0} 3^{0} 7^{0}=1}]
]
[1  [0] [1]
]
[2  [0] [1]
]
]
[1
[0  [0] [1]
]
[1  [0] [1]
]
[2  [0] [1]
]
]
[2, name=aux1
[0  [0] [1]
]
[1  [0] [1]
]
[2, name=aux2