diff --git a/bilder/heap_array_representation.tex b/bilder/heap_array_representation.tex new file mode 100644 index 0000000000000000000000000000000000000000..f702eed71b9752278d7125d516f64c7f78dd33a6 --- /dev/null +++ b/bilder/heap_array_representation.tex @@ -0,0 +1,20 @@ +\tikzsetnextfilename{heap_array_representation} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}] + \node [common] (k_0) {$5$} + child {node [common] (k_1) {$7$} + child {node [common] (k_3) {$1$}} + child {node [common] (k_4) {$8$}} + } + child {node [common] (k_2) {$3$} + child {node [common] (k_5) {$2$}} + } + ; + \node [above left = 0.1mm of k_0] (l_0) {$\scriptstyle{0}$}; + \node [above left = 0.1mm of k_1] (l_1) {$\scriptstyle{1}$}; + \node [above right = 0.1mm of k_2] (l_2) {$\scriptstyle{2}$}; + \node [above left = 0.1mm of k_3] (l_3) {$\scriptstyle{3}$}; + \node [above right = 0.1mm of k_4] (l_4) {$\scriptstyle{4}$}; + \node [above left = 0.1mm of k_5] (l_5) {$\scriptstyle{5}$}; +\end{tikzpicture} diff --git a/bilder/heap_tree_representation.tex b/bilder/heap_tree_representation.tex new file mode 100644 index 0000000000000000000000000000000000000000..84da683dd64a6820427d906721f1c0b244d1bca4 --- /dev/null +++ b/bilder/heap_tree_representation.tex @@ -0,0 +1,27 @@ +\tikzsetnextfilename{heap_tree_representation} +\begin{tikzpicture}[ + level/.style={sibling distance=35mm/#1}, + common/.style={circle, draw, minimum size=7mm}] + \node [common] (k_0) {$9$} + child {node [common] (k_1) {$7$} + child {node [common] (k_3) {$4$} + child {node [common] (k_7) {$0$}} + child[missing] {node (e) {}} + } + child {node [common] (k_4) {$1$}} + } + child {node [common] (k_2) {$8$} + child {node [common] (k_5) {$3$}} + child {node [common] (k_6) {$2$}} + } + ; + \node [above left = -0.8mm of k_0] (l_0) {$\scriptscriptstyle{\mathcal{A}[0]}$}; + \node [above left = -0.8mm of k_1] (l_1) {$\scriptscriptstyle{\mathcal{A}[1]}$}; + \node [above right = -0.8mm of k_2] (l_2) {$\scriptscriptstyle{\mathcal{A}[2]}$}; + \node [above left = -0.8mm of k_3] (l_3) {$\scriptscriptstyle{\mathcal{A}[3]}$}; + \node [above right = -0.8mm of k_4] (l_4) {$\scriptscriptstyle{\mathcal{A}[4]}$}; + \node [above left = -0.8mm of k_5] (l_5) {$\scriptscriptstyle{\mathcal{A}[5]}$}; + \node [above right = -0.8mm of k_6] (l_6) {$\scriptscriptstyle{\mathcal{A}[6]}$}; + \node [above left = -0.8mm of k_7] (l_7) {$\scriptscriptstyle{\mathcal{A}[7]}$}; + +\end{tikzpicture} diff --git a/bilder/heapsort_1.tex b/bilder/heapsort_1.tex new file mode 100644 index 0000000000000000000000000000000000000000..5264a6be292a5495ee65a13066c271d0703caa29 --- /dev/null +++ b/bilder/heapsort_1.tex @@ -0,0 +1,26 @@ +\tikzsetnextfilename{heapsort_1} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [common] (k_0) {$5$} + child {node [common] (k_1) {$7$} + child {node [shaded] (k_3) {$1$}} + child {node [shaded] (k_4) {$8$}} + } + child {node [common] (k_2) {$3$} + child {node [shaded] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; + \node [above left = -0.8mm of k_0] (l_0) {$\scriptscriptstyle{\mathcal{A}[0]}$}; + \node [above left = -0.8mm of k_1] (l_1) {$\scriptscriptstyle{\mathcal{A}[1]}$}; + \node [above right = -0.8mm of k_2] (l_2) {$\scriptscriptstyle{\mathcal{A}[2]}$}; + \node [above left = -0.8mm of k_3] (l_3) {$\scriptscriptstyle{\mathcal{A}[3]}$}; + \node [above right = -0.8mm of k_4] (l_4) {$\scriptscriptstyle{\mathcal{A}[4]}$}; + \node [above left = -0.8mm of k_5] (l_5) {$\scriptscriptstyle{\mathcal{A}[5]}$}; +\end{tikzpicture} + + + diff --git a/bilder/heapsort_2.tex b/bilder/heapsort_2.tex new file mode 100644 index 0000000000000000000000000000000000000000..1b330e1e6ddec1c5f412275819d4ce8eca1f209d --- /dev/null +++ b/bilder/heapsort_2.tex @@ -0,0 +1,20 @@ +\tikzsetnextfilename{heapsort_2} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [common] (k_0) {$5$} + child {node [common] (k_1) {$7$} + child {node [common] (k_3) {$1$}} + child {node [common] (k_4) {$8$}} + } + child {node [shaded] (k_2) {$3$} + child {node [shaded] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; +\end{tikzpicture} + + + diff --git a/bilder/heapsort_3.tex b/bilder/heapsort_3.tex new file mode 100644 index 0000000000000000000000000000000000000000..f0187aec2368ab24be48588c957f705394915ae6 --- /dev/null +++ b/bilder/heapsort_3.tex @@ -0,0 +1,20 @@ +\tikzsetnextfilename{heapsort_3} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [common] (k_0) {$5$} + child {node [shaded] (k_1) {$7$} + child {node [shaded] (k_3) {$1$}} + child {node [shaded] (k_4) {$8$} edge from parent[<->, thick]} + } + child {node [common] (k_2) {$3$} + child {node [common] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; +\end{tikzpicture} + + + diff --git a/bilder/heapsort_4.tex b/bilder/heapsort_4.tex new file mode 100644 index 0000000000000000000000000000000000000000..d4e0cee8abfa22ae61f9378520dd228dd48ae148 --- /dev/null +++ b/bilder/heapsort_4.tex @@ -0,0 +1,20 @@ +\tikzsetnextfilename{heapsort_4} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [shaded] (k_0) {$5$} + child {node [shaded] (k_1) {$8$} edge from parent[<->, thick] + child {node [common] (k_3) {$1$} edge from parent[-, thin]} + child {node [common] (k_4) {$7$} edge from parent[-, thin]} + } + child {node [shaded] (k_2) {$3$} + child {node [common] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; +\end{tikzpicture} + + + diff --git a/bilder/heapsort_5.tex b/bilder/heapsort_5.tex new file mode 100644 index 0000000000000000000000000000000000000000..ddec3e92ea81612f31000d299a01720488ce8f00 --- /dev/null +++ b/bilder/heapsort_5.tex @@ -0,0 +1,20 @@ +\tikzsetnextfilename{heapsort_5} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [common] (k_0) {$8$} + child {node [shaded] (k_1) {$5$} + child {node [shaded] (k_3) {$1$}} + child {node [shaded] (k_4) {$7$} edge from parent[<->, thick]} + } + child {node [common] (k_2) {$3$} + child {node [common] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; +\end{tikzpicture} + + + diff --git a/bilder/heapsort_6.tex b/bilder/heapsort_6.tex new file mode 100644 index 0000000000000000000000000000000000000000..d79361f3586c9d3fc4da242c78607483f18c05a1 --- /dev/null +++ b/bilder/heapsort_6.tex @@ -0,0 +1,26 @@ +\tikzsetnextfilename{heapsort_6} +\begin{tikzpicture}[ + level/.style={sibling distance=30mm/#1}, + common/.style={circle, draw, minimum size=7mm}, + shaded/.style={common, fill=gray!50} +] + \node [common] (k_0) {$8$} + child {node [common] (k_1) {$7$} + child {node [shaded] (k_3) {$1$}} + child {node [shaded] (k_4) {$5$}} + } + child {node [common] (k_2) {$3$} + child {node [shaded] (k_5) {$2$}} + child[missing] {node (e) {}} + } + ; + \node [above left = -0.8mm of k_0] (l_0) {$\scriptscriptstyle{\mathcal{A}[0]}$}; + \node [above left = -0.8mm of k_1] (l_1) {$\scriptscriptstyle{\mathcal{A}[1]}$}; + \node [above right = -0.8mm of k_2] (l_2) {$\scriptscriptstyle{\mathcal{A}[2]}$}; + \node [above left = -0.8mm of k_3] (l_3) {$\scriptscriptstyle{\mathcal{A}[3]}$}; + \node [above right = -0.8mm of k_4] (l_4) {$\scriptscriptstyle{\mathcal{A}[4]}$}; + \node [above left = -0.8mm of k_5] (l_5) {$\scriptscriptstyle{\mathcal{A}[5]}$}; +\end{tikzpicture} + + +