File:Binary Splitting.svg

Uploaded by MarcMezzarobba
Upload date 2013-05-06T21:56:10Z
MIME type image/svg+xml
Dimensions 398 × 160 px
File size 9.8 KB

Summary

Description
English: A product tree.
Date
Source Own work
Author MarcMezzarobba

TeX/TikZ source:

% Compile with:
% htlatex Binary_Splitting.tex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\begin{document}
    \begin{tikzpicture}
      \begin{scope}
        [
            every node/.style={rectangle, draw, minimum height=1.4em},
            level distance=8mm,
            level 1/.style={nodes={minimum width=4cm}, sibling distance=48mm},
            level 2/.style={nodes={minimum width=2cm}, sibling distance=24mm},
            level 3/.style={nodes={minimum width=10mm}, sibling distance=12mm},
            edge from parent/.style={draw=none}
        ]
        \node[minimum width=8cm] (r) {}
          child { node {}
            child { node {}
              child { node (a) {\scriptsize{$C(N)$}} }
              child { node {} }}
            child { node {}
              child { node[fill=blue] (n) {} }
              child { node {} }}}
          child { node {}
            child { node {}
              child { node {} }
              child { node {} }}
            child { node {}
              child { node {\scriptsize{$C(1)$}} }
              child { node (z) {\scriptsize{$C(0)$}} }}};
      \end{scope}
      \node[below=1mm of n] {$O(\log N)$};
      \draw[<->]
        ($ (r.north east) + (0.5,0) $)
        -- node[right] (t) {$O(\log N)$}
        ($ (z.south east) + (0.5,0) $);
      \draw[<->]
        ($ (r.north west) + (0,0.3) $)
        -- node[above] {$O(N \log N)$}
        ($ (r.north east) + (0,0.3) $);
    \end{tikzpicture}
\end{document}

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

6 May 2013

image/svg+xml

37e3ac34aaa03bfdfdaa14bb1a695eb249a7cf7a

9,997 byte

160 pixel

398 pixel

Category:Algorithms Category:CC-Zero Category:Images with LaTeX source code Category:Self-published work Category:TikZ graphics Category:Tree diagrams