I need to make a branch tree in LaTeX just like in the picture below. I need some help with the code. I don't know how to make it.

I need to make a branch tree in LaTeX just like in the picture below. I need some help with the code. I don't know how to make it.

This needs some adjustment and polishing (e.g. I'm not clear what the algorithm for the labels is so mine is likely not quite right and some labels are likely explicitly specified without need) but if you use forest you can have a lot of the labelling handled automatically for you:
\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest}
\begin{document}
\tikzset{
every label/.append style={font=\scriptsize},
my edge labels/.style={font=\scriptsize},
dominant/.append style={label=below:$dominant$},
}
\begin{forest}
for tree={
circle,
draw,
minimum width=2.5em,
l sep+=1.5em,
s sep+=1em,
anchor=center,
edge path={
\noexpand\path[\forestoption{edge}](!u.parent anchor)--(.child anchor)[my edge labels]\forestoption{edge label};
},
},
delay={
where n=1{
edge label/.wrap 2 pgfmath args={
node[midway, left]{$b_{#1}={#2}$}}{level}{n}
}{
edge label/.wrap 2 pgfmath args={
node[midway, right]{$b_{#1}={#2}$}}{level}{n}
},
}
[0, label={left:$L_2=L_3=3$}
[1
[2
[3
[4
]
[12, label={below:$L_2=4$}
]
]
[,phantom]
]
[13, s sep+=1.5em, label={right:$L_3=3$}
[{\phantom{a}}, dominant
]
[14, label={below:$L_3=4$}
]
[15, label={right:$L_3=3$}
[, dominant
]
[16, label={right:$L_3=3$}
]
]
]
]
]
\end{forest}
\end{document}

Tidied up the alignment etc. a bit, and used styles to ensure some consistency in formatting of labels etc.
You can use the tikz package and generate one as follows:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzstyle{level 1}=[sibling distance=30mm]
\tikzstyle{level 2}=[sibling distance=10mm]
\tikzstyle{level 3}=[sibling distance=5mm]
\tikzstyle{level 4}=[sibling distance=5mm]
\node{A}
child
{
node{B}
child
{
node{D}
child{node{H}}
child{node{I}}
}
child
{
node{E}
child{node{J}}
child{node{K}}
}
}
child
{
node{C}
child
{
node{F}
child{node{L}}
child{node{M}}
}
child
{
node{G}
child{node{N}}
child{node{O}}
}
};
\end{tikzpicture}
\end{document}

You must read the tikz documentation in order to customize the tree according to your needs.
Also you can use the qtree package like this:
\documentclass{article}
\usepackage{qtree}
\begin{document}
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] ]
\end{document}
Again qtree documentation will help you.
Source Wikipedia

qtree in the past, but there is much it cannot do and, looking quickly over the manual, I see no ready way to draw this tree. Also, it would be better to provide links to CTAN than to documentation on another site since the latter will not necessarily be updated when the package is updated and is likely to be less stable than resources on CTAN. For example qtree.
– cfr
Oct 29 '14 at 22:58
qtree extensively yet, as I was too trying to create a tree for a document of mine yesterday. So I posted exactly the same material I was working on myself. I found in them extensive information so I wanted to give Tomas those information I spent hours searching. As I had never needed to draw large trees in the past yesterday when I had to do it I found out that it would be easier to simplify the process and produce a tree with the same information but with less "visual effects". So guessing that Tomas is in the same situation I find my answer quite proper.
– Adam
Oct 29 '14 at 23:05