[Tex/LaTex] How to label nodes on a tree diagram using tikz

labelstikz-trees

I have a branched tree that currently just shows nodes. I want to label it a bit more, but I’m not sure how to do that. I’ve included the code I have so far, and also a picture of what I want it to look like. How should I do this?

enter image description here

\begin{figure}[h]
\begin{center}
\begin{tikzpicture}
    \tikzstyle{every node}=[circle,inner sep=1.5pt,draw,fill]
\draw node {} child {node {}
    child {
        node {}
        child { node {} child { node {} }child {node {}} child {node {}  }}
    }
    child { node {} }}

;
\end{tikzpicture}
\caption{ Branched tree}
\end{center}
\end{figure}

Best Answer

enter image description here

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}%
   [tn/.style={circle,inner sep=1.5pt,draw,fill}% tree node
   ]
   \draw 
     node[tn] (1) {}
       child { node[tn] (11) {}
         child { node[tn] (111) {}
           child { node[tn] (1111) {}
             child { node[tn] (11111) {} }
             child { node[tn] (11112) {} }
             child { node[tn] (11113) {} }
           }
         }
         child { node[tn] (112) {}}
       };
    \node[left =of 11111] (t4) {$t=4$};
    \node      at (1    -| t4) {$t=0$};
    \node      at (11   -| t4) {$t=1$};
    \node      at (111  -| t4) {$t=2$};
    \node      at (1111 -| t4) {$t=3$};
    \node[right=of 11113] (R4) {$R_4=3$};
    \node      at (1    -| R4) {$R_0=1$};
    \node      at (11   -| R4) {$R_1=1$};
    \node      at (111  -| R4) {$R_2=2$};
    \node      at (1111 -| R4) {$R_3=1$};
\end{tikzpicture}
\end{document}
Related Question