From cc04a4088c56408ddb2213babd526c64588ef131 Mon Sep 17 00:00:00 2001 From: "paul-anton.engel@informatik.hs-fulda.de" Date: Tue, 16 Jan 2024 12:11:04 +0100 Subject: [PATCH] =?UTF-8?q?Paul:=20Hochladen=20des=20Zwischenstandes,=20RB?= =?UTF-8?q?-Tree=20funzt=20nicht,=20daf=C3=BCr=20die=20dot=20dateienerstel?= =?UTF-8?q?lung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Uebung08/Paul/IntComparable.java | 18 ++++ Uebung08/Paul/Main.java | 22 +++++ Uebung08/Paul/RBTree.java | 144 +++++++++++++++++++++++++++++++ bin/IntComparable.class | Bin 0 -> 823 bytes bin/Main.class | Bin 0 -> 1327 bytes bin/RBTree$Node.class | Bin 0 -> 678 bytes bin/RBTree.class | Bin 0 -> 5205 bytes output.svg | Bin 0 -> 37472 bytes output_step_0.dot | 11 +++ output_step_1.dot | 15 ++++ output_step_10.dot | 51 +++++++++++ output_step_11.dot | 55 ++++++++++++ output_step_12.dot | 55 ++++++++++++ output_step_13.dot | 59 +++++++++++++ output_step_14.dot | 63 ++++++++++++++ output_step_15.dot | 67 ++++++++++++++ output_step_2.dot | 19 ++++ output_step_3.dot | 23 +++++ output_step_4.dot | 27 ++++++ output_step_5.dot | 31 +++++++ output_step_6.dot | 35 ++++++++ output_step_7.dot | 39 +++++++++ output_step_8.dot | 43 +++++++++ output_step_9.dot | 47 ++++++++++ 24 files changed, 824 insertions(+) create mode 100644 Uebung08/Paul/IntComparable.java create mode 100644 Uebung08/Paul/Main.java create mode 100644 Uebung08/Paul/RBTree.java create mode 100644 bin/IntComparable.class create mode 100644 bin/Main.class create mode 100644 bin/RBTree$Node.class create mode 100644 bin/RBTree.class create mode 100644 output.svg create mode 100644 output_step_0.dot create mode 100644 output_step_1.dot create mode 100644 output_step_10.dot create mode 100644 output_step_11.dot create mode 100644 output_step_12.dot create mode 100644 output_step_13.dot create mode 100644 output_step_14.dot create mode 100644 output_step_15.dot create mode 100644 output_step_2.dot create mode 100644 output_step_3.dot create mode 100644 output_step_4.dot create mode 100644 output_step_5.dot create mode 100644 output_step_6.dot create mode 100644 output_step_7.dot create mode 100644 output_step_8.dot create mode 100644 output_step_9.dot diff --git a/Uebung08/Paul/IntComparable.java b/Uebung08/Paul/IntComparable.java new file mode 100644 index 0000000..7e2a1f0 --- /dev/null +++ b/Uebung08/Paul/IntComparable.java @@ -0,0 +1,18 @@ +class IntComparable implements Comparable { + private int value; + + IntComparable(int value) { + this.value = value; + } + + @Override + public int compareTo(IntComparable other) { + return Integer.compare(this.value, other.value); + } + + @Override + public String toString() { + // Verwenden Sie eine geeignete String-Darstellung, zum Beispiel den Wert selbst + return Integer.toString(value); + } +} \ No newline at end of file diff --git a/Uebung08/Paul/Main.java b/Uebung08/Paul/Main.java new file mode 100644 index 0000000..c5b0417 --- /dev/null +++ b/Uebung08/Paul/Main.java @@ -0,0 +1,22 @@ +import java.util.Random; + +public class Main { + public static void main(String[] args) { + RBTree rbTree = new RBTree<>(); + Random random = new Random(); + + for (int i = 0; i <= 15; i++) { + int randomValue = random.nextInt(100); + IntComparable key = new IntComparable(randomValue); + + // Füge das Element ein und aktualisiere die DOT-Datei nach jedem Schritt + rbTree.printDOTAfterInsert("output_step_" + i + ".dot", key); + } + + // Jetzt können Sie die DOT-Dateien in SVG umwandeln und anzeigen + // dot -Tsvg output_step_0.dot > output_step_0.svg + // dot -Tsvg output_step_1.dot > output_step_1.svg + // ... + } +} + diff --git a/Uebung08/Paul/RBTree.java b/Uebung08/Paul/RBTree.java new file mode 100644 index 0000000..47b84f0 --- /dev/null +++ b/Uebung08/Paul/RBTree.java @@ -0,0 +1,144 @@ +// RBTree.java + +import java.io.FileWriter; +import java.io.IOException; + +class RBTree> { + + private static final boolean RED = true; + private static final boolean BLACK = false; + private static int step = 0; + + private class Node { + T key; + Node left, right; + boolean color; + + Node(T key, boolean color) { + this.key = key; + this.color = color; + } + } + + private Node root; + + public void insert(T key) { + root = insert(root, key); + root.color = BLACK; // Ensure the root is always black + } + + private Node insert(Node root, T key) { + if (root == null) { + return new Node(key, RED); // New nodes are always red + } + + int cmp = key.compareTo(root.key); + if (cmp < 0) { + root.left = insert(root.left, key); + } else if (cmp > 0) { + root.right = insert(root.right, key); + } else { + // Duplicate key, do not insert + return root; + } + + // Fix any Red-Black tree violations + if (isRed(root.right) && !isRed(root.left)) { + root = rotateLeft(root); + } + if (isRed(root.left) && isRed(root.left.left)) { + root = rotateRight(root); + } + if (isRed(root.left) && isRed(root.right)) { + flipColors(root); + } + + return root; // Return the updated root + } + + private boolean isRed(Node node) { + if (node == null) { + return false; + } + return node.color == RED; + } + + private Node rotateLeft(Node h) { + Node x = h.right; + h.right = x.left; + x.left = h; + x.color = h.color; + h.color = RED; + return x; + } + + private Node rotateRight(Node h) { + Node x = h.left; + h.left = x.right; + x.right = h; + x.color = h.color; + h.color = RED; + return x; + } + + private void flipColors(Node h) { + h.color = RED; + h.left.color = BLACK; + h.right.color = BLACK; + } + + public void printDOTAfterInsert(String filename, T key) { + try (FileWriter writer = new FileWriter(filename)) { + writer.write("digraph G {\n"); + writer.write("\tgraph [ratio=.48];\n"); + writer.write("\tnode [style=filled, color=black, shape=circle, width=.6 \n"); + writer.write("\t\tfontname=Helvetica, fontweight=bold, fontcolor=white, \n"); + writer.write("\t\tfontsize=24, fixedsize=true];\n"); + + root = insert(root, key); // Füge das Element ein und aktualisiere den Baum + printDOTRecursive(root, writer); + + writer.write("}\n"); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private void printDOTRecursive(Node node, FileWriter writer) throws IOException { + if (node != null) { + String keyString = node.key.toString().replaceAll("[^a-zA-Z0-9]", "_"); // Ersetze ungültige Zeichen + + // Setze Farben basierend auf der Rot-Schwarz-Eigenschaft + String fillColor = (node.color == RED) ? "red" : "black"; + String fontColor = (node.color == RED) ? "white" : "white"; // Ändern Sie dies, wenn Sie schwarzen Text auf rotem Hintergrund möchten + + // Print current node mit Farbinformationen + writer.write("\t\"" + keyString + "\" [fillcolor=" + fillColor + ", fontcolor=" + fontColor + "];\n"); + + // Print left child + if (node.left != null) { + String leftKeyString = node.left.key.toString().replaceAll("[^a-zA-Z0-9]", "_"); + writer.write("\t\"" + keyString + "\" -> \"" + leftKeyString + "\";\n"); + printDOTRecursive(node.left, writer); + } else { + // Füge ein NIL-Blatt für leere linke Zweige hinzu + String leftNilKeyString = keyString + "_NIL_L"; + writer.write("\t\"" + leftNilKeyString + "\" [shape=plaintext, label=\"NIL\", fontsize=16];\n"); + writer.write("\t\"" + keyString + "\" -> \"" + leftNilKeyString + "\";\n"); + } + + // Print right child + if (node.right != null) { + String rightKeyString = node.right.key.toString().replaceAll("[^a-zA-Z0-9]", "_"); + writer.write("\t\"" + keyString + "\" -> \"" + rightKeyString + "\";\n"); + printDOTRecursive(node.right, writer); + } else { + // Füge ein NIL-Blatt für leere rechte Zweige hinzu + String rightNilKeyString = keyString + "_NIL_R"; + writer.write("\t\"" + rightNilKeyString + "\" [shape=plaintext, label=\"NIL\", fontsize=16];\n"); + writer.write("\t\"" + keyString + "\" -> \"" + rightNilKeyString + "\";\n"); + } + } + } +} + diff --git a/bin/IntComparable.class b/bin/IntComparable.class new file mode 100644 index 0000000000000000000000000000000000000000..5f0708881d9c2d4157734f31e18ab00740679aad GIT binary patch literal 823 zcmZXS%}?7v5XIjlP8_ET2^4677U;Kaq$2g!1|bj@j zmi@V-IOt)AP3v3@u9`W0-T{ltfw6OkZzs&xxVQZuQ2ypObiOdEVTsR0)*8LVdIwD` zGg>RuxQi7=tjnpq31+gAc~~-){}r8Gt}ER8L~TKBQf2BYn)**ucu20HZDG5ly~<;t yWoTE}`8-GJ<|IWGH3g}AL^n^$darcj_`AO$-|=+b3U5)4GzOpNZ!h5HyY~;&f0(TR literal 0 HcmV?d00001 diff --git a/bin/Main.class b/bin/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..52d53e661b6aa32c14870771f714ab20ef6cff67 GIT binary patch literal 1327 zcmaJ=+fEZv6kUg2rY%J(r64L^K?^ALexX=}DzQn?L`aSC!5rEnjGfLjGp9t}{Rlt6 z#Ajb5k;D)17yK7>olXr!h!3;R?0xoS?X~y$@$1`n01H^LFdz_Jm9}dkDv)_6w`IYR z?q=cn#yeHl0`W!LwRK4#lAo#3x9l}k3K1mJh#@X8T(w>Gtkc?1{<_?7l)y;Ut4pUQ zecR|gV^nY10kc(2ts?WZcnXZ=Usv~Qu4&(PH;Xeh3&-jEVtL(HES5pi!suUg9c?>> z7t(EbtrW6I8Zn;62}}rBu6nO4E@4OWm6?i#QvyTO%U-K3eFG~W#A|%bM=M6B< zZrSs6pnch1ReH;71S#A{(ZYhj)cyk4?zY!dg>VnTL9EES_WT_)p+$j@{e1Sk!-P-C zgrkC~s^>L3?P4Fvy{+oA90*)zr$@N=&mepY#r_TGr6^0sS+lh&4##mXfrkRey^d~o z^qWAd_8T$Z@VEu(it8%B?8qQcfrVv(=|epq)rEz}0%!j3YTi`0WfH{Ua+`qx{_$~A zTGR?W1<%;*E)rk5*C|SK4F(KSrb7pwL)4NuhGAMv@J~eP36%Dbd9}+u+e4OTZZ%T+ zjOift9eWQzoFySK*4LWM&`L4 z)+vGg`&dGy3k6sQ%-X)ap@B*>_59T;Pr6QwKRXkPH`1U5lGU{X|#4c^U{dR`O z?cZ2wznkG%dwqtrU*sLU;9bjNs;pRJ&SideY>?l~daKixiI_!}$&BJjbq6o$`&n(# Yiqsrzk;~x~8niNj!ZzNJX=eQPH60gulK=n! literal 0 HcmV?d00001 diff --git a/bin/RBTree.class b/bin/RBTree.class new file mode 100644 index 0000000000000000000000000000000000000000..19dd46e1e3554e71cfbfa5d88fc42e074c5b450c GIT binary patch literal 5205 zcmb_g`+F4C8GdK8_iP9(Hv@u8KuxlnL@pv^NoWYSNC=vwAcCKj&9%y(t!qV&M~qS?qt)>WVpJj%hkTBJ2PY?HH3Q2k+klN z+lGc{er{7=U$U(!FA&_6vdpyUw9#^1{az~S;K~q{FN~l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J=6E@^-b=_9W z^YCpf2jK`7@0TuZTUJKVcD7+1d>e8%-{pqfEiQK?>$eh@E{kt5Z+rFeZOjTC!HDMO zvbHJs*0#;1@U73<_(W6|vo_*Rq;R~NwSf@qxo)>Z*0$SB*pOqP723tDP50qz)>ht! ZZ@1V&wUWWzOi$C#=`!6(ucz12e*p%3(#!w= literal 0 HcmV?d00001 diff --git a/output_step_0.dot b/output_step_0.dot new file mode 100644 index 0000000..2ffc6d5 --- /dev/null +++ b/output_step_0.dot @@ -0,0 +1,11 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "56" -> "56_NIL_L"; + "56_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "56" -> "56_NIL_R"; +} diff --git a/output_step_1.dot b/output_step_1.dot new file mode 100644 index 0000000..45d7147 --- /dev/null +++ b/output_step_1.dot @@ -0,0 +1,15 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "33"; + "33" [fillcolor=red, fontcolor=white]; + "33_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_L"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "56" -> "56_NIL_R"; +} diff --git a/output_step_10.dot b/output_step_10.dot new file mode 100644 index 0000000..0f81282 --- /dev/null +++ b/output_step_10.dot @@ -0,0 +1,51 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=red, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_L"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_11.dot b/output_step_11.dot new file mode 100644 index 0000000..df8becb --- /dev/null +++ b/output_step_11.dot @@ -0,0 +1,55 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=red, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11" -> "8"; + "8" [fillcolor=red, fontcolor=white]; + "8_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_L"; + "8_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_R"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_L"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_12.dot b/output_step_12.dot new file mode 100644 index 0000000..df8becb --- /dev/null +++ b/output_step_12.dot @@ -0,0 +1,55 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=red, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11" -> "8"; + "8" [fillcolor=red, fontcolor=white]; + "8_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_L"; + "8_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_R"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_L"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_13.dot b/output_step_13.dot new file mode 100644 index 0000000..488a727 --- /dev/null +++ b/output_step_13.dot @@ -0,0 +1,59 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=red, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11" -> "8"; + "8" [fillcolor=red, fontcolor=white]; + "8_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_L"; + "8_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_R"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_L"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "64"; + "64" [fillcolor=black, fontcolor=white]; + "64" -> "63"; + "63" [fillcolor=red, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "64_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "64" -> "64_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_14.dot b/output_step_14.dot new file mode 100644 index 0000000..52b6447 --- /dev/null +++ b/output_step_14.dot @@ -0,0 +1,63 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=red, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11" -> "8"; + "8" [fillcolor=red, fontcolor=white]; + "8_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_L"; + "8_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_R"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19" -> "18"; + "18" [fillcolor=red, fontcolor=white]; + "18_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "18" -> "18_NIL_L"; + "18_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "18" -> "18_NIL_R"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "64"; + "64" [fillcolor=black, fontcolor=white]; + "64" -> "63"; + "63" [fillcolor=red, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "64_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "64" -> "64_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_15.dot b/output_step_15.dot new file mode 100644 index 0000000..9b639e1 --- /dev/null +++ b/output_step_15.dot @@ -0,0 +1,67 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=red, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=black, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11" -> "8"; + "8" [fillcolor=red, fontcolor=white]; + "8_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_L"; + "8_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "8" -> "8_NIL_R"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15" -> "19"; + "19" [fillcolor=black, fontcolor=white]; + "19" -> "18"; + "18" [fillcolor=red, fontcolor=white]; + "18_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "18" -> "18_NIL_L"; + "18_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "18" -> "18_NIL_R"; + "19_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "19" -> "19_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=black, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33" -> "49"; + "49" [fillcolor=black, fontcolor=white]; + "49_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "49" -> "49_NIL_L"; + "49_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "49" -> "49_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "64"; + "64" [fillcolor=black, fontcolor=white]; + "64" -> "63"; + "63" [fillcolor=red, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "64_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "64" -> "64_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +} diff --git a/output_step_2.dot b/output_step_2.dot new file mode 100644 index 0000000..91e649e --- /dev/null +++ b/output_step_2.dot @@ -0,0 +1,19 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_L"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; +} diff --git a/output_step_3.dot b/output_step_3.dot new file mode 100644 index 0000000..96f7471 --- /dev/null +++ b/output_step_3.dot @@ -0,0 +1,23 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "25"; + "25" [fillcolor=red, fontcolor=white]; + "25_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "25" -> "25_NIL_L"; + "25_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "25" -> "25_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; +} diff --git a/output_step_4.dot b/output_step_4.dot new file mode 100644 index 0000000..8b0be62 --- /dev/null +++ b/output_step_4.dot @@ -0,0 +1,27 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=red, fontcolor=white]; + "25" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_L"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; +} diff --git a/output_step_5.dot b/output_step_5.dot new file mode 100644 index 0000000..6227992 --- /dev/null +++ b/output_step_5.dot @@ -0,0 +1,31 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=red, fontcolor=white]; + "25" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_L"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "89"; + "89" [fillcolor=black, fontcolor=white]; + "89" -> "63"; + "63" [fillcolor=red, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; +} diff --git a/output_step_6.dot b/output_step_6.dot new file mode 100644 index 0000000..ec102d9 --- /dev/null +++ b/output_step_6.dot @@ -0,0 +1,35 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=red, fontcolor=white]; + "25" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "89"; + "89" [fillcolor=black, fontcolor=white]; + "89" -> "63"; + "63" [fillcolor=red, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; +} diff --git a/output_step_7.dot b/output_step_7.dot new file mode 100644 index 0000000..d0d7112 --- /dev/null +++ b/output_step_7.dot @@ -0,0 +1,39 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "11"; + "11" [fillcolor=black, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "89"; + "89" [fillcolor=black, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; +} diff --git a/output_step_8.dot b/output_step_8.dot new file mode 100644 index 0000000..9b7826f --- /dev/null +++ b/output_step_8.dot @@ -0,0 +1,43 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=black, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=red, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "15" -> "15_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "89"; + "89" [fillcolor=black, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; +} diff --git a/output_step_9.dot b/output_step_9.dot new file mode 100644 index 0000000..a20f5e0 --- /dev/null +++ b/output_step_9.dot @@ -0,0 +1,47 @@ +digraph G { + graph [ratio=.48]; + node [style=filled, color=black, shape=circle, width=.6 + fontname=Helvetica, fontweight=bold, fontcolor=white, + fontsize=24, fixedsize=true]; + "56" [fillcolor=red, fontcolor=white]; + "56" -> "25"; + "25" [fillcolor=black, fontcolor=white]; + "25" -> "15"; + "15" [fillcolor=black, fontcolor=white]; + "15" -> "11"; + "11" [fillcolor=red, fontcolor=white]; + "11_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_L"; + "11_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "11" -> "11_NIL_R"; + "15_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "15" -> "15_NIL_R"; + "25" -> "33"; + "33" [fillcolor=black, fontcolor=white]; + "33" -> "27"; + "27" [fillcolor=red, fontcolor=white]; + "27_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_L"; + "27_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "27" -> "27_NIL_R"; + "33_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "33" -> "33_NIL_R"; + "56" -> "69"; + "69" [fillcolor=black, fontcolor=white]; + "69" -> "63"; + "63" [fillcolor=black, fontcolor=white]; + "63_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_L"; + "63_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "63" -> "63_NIL_R"; + "69" -> "98"; + "98" [fillcolor=black, fontcolor=white]; + "98" -> "89"; + "89" [fillcolor=red, fontcolor=white]; + "89_NIL_L" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_L"; + "89_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "89" -> "89_NIL_R"; + "98_NIL_R" [shape=plaintext, label="NIL", fontsize=16]; + "98" -> "98_NIL_R"; +}