How to plot a tree with sidebar?

I'm trying to draw a picture like this:

Can we done it with tikz?

-
In its current form, your question might not receive many answers. Please take a look at the How to Ask-page and try to improve your question according to the guidance found there. This may require you to show some effort on your part in terms of attempting a solution. – percusse Oct 14 '12 at 8:10
– Torbjørn T. Oct 14 '12 at 9:13

You can use this as a starting point:

\documentclass{article}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{tikz}
\usetikzlibrary{positioning,trees,calc,decorations.pathreplacing}

\newcommand\dotstheta{\overset{\vdots}{\Theta(1)}}
\begin{document}

\begin{sidewaysfigure}
\centering
\begin{tikzpicture}[
level 1/.style={sibling distance=45mm},
level 2/.style={sibling distance=15mm},
level 3/.style={sibling distance=4mm,level distance=8mm},
]

% the tree
\node (r1) {$f(n)$}
child { node (l2) {$f(n/b)$}
{ child {node (l3) {$f(n/b^2)$} child child child}
child {node {$f(n/b^2)$} child child child}
child {node (ll3) {$f(n/b^2)$} child child child}
}
}
child { node (c2) {$f(n/b)$}
{ child {node  {$f(n/b^2)$} child child child}
child {node (cc2) {$f(n/b^2)$} child child child}
child {node  {$f(n/b^2)$} child child child}
}
}
child { node (r2) {$f(n/b)$}
{ child {node (rr3) {$f(n/b^2)$} child child child}
child {node {$f(n/b^2)$} child child child}
child {node (r3) {$f(n/b^2)$} child child child}
}
};
% the last line of thetas
\node[anchor=north,inner sep=0pt] (theta) at ([yshift=-1cm]cc2) {$\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta% \dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta\dotstheta% \dotstheta\dotstheta$};

% two auxiliary coordinates
\coordinate (aux1) at ( $(r1) + (8.5,0)$ );
\coordinate (aux2) at ( $(r1) + (-7,0)$ );

% the nodes to the right of the tree
\node(t1) at (aux1) {$f(n)$};
\node(t2) at (r2-|aux1) {$af(n/b)$};
\node(t3) at (r3-|aux1) {$a^2f(n/b^2)$};
\node(t4) at (theta.184-|aux1) {$\Theta\bigl(n^{\log_{b}n}\bigr)$};

% arrows from the tree to the nodes on the right
\foreach \i in {1,2,3}
\draw[->,line width=1pt,dashed] (r\i) -- (t\i);
\draw[->,line width=1pt,dashed,shorten <=2pt] (theta.-4) -- (t4);

% the arrow to the left of the tree
\draw[<->] (aux2) -- node[fill=white] {$\log_{b}n$} (aux2|-theta.184);

% the brace at the bottom
\draw[decorate,decoration={brace,raise=2pt}] (theta.south east) -- node[label={[label distance=4pt]below:$n^{\log_{b}n}$}]{}  (theta.south west);

% the rule with the total
\draw ([yshift=-1cm]t4.east) -- +(-4cm,0);
\node[below = 2cm of t4.east,anchor=east] {Total: $\Theta\bigl(n^{\log_{b}n}\bigr) + \displaystyle\sum_{j=0}^{\log_{b}n-1}a^{j}f(n/b^{j})$};
\end{tikzpicture}
\end{sidewaysfigure}

\end{document}


-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5725182890892029, "perplexity": 11106.502525608403}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-30/segments/1469257828010.15/warc/CC-MAIN-20160723071028-00223-ip-10-185-27-174.ec2.internal.warc.gz"}