From 776269f9246504e7bcaf454423499ed69e5968f7 Mon Sep 17 00:00:00 2001 From: Matthijs Hollemans Date: Wed, 3 Feb 2016 22:32:20 +0100 Subject: [PATCH] Add general-purpose tree --- README.markdown | 2 +- Tree/Images/Cycles.graffle | Bin 0 -> 2520 bytes Tree/Images/Cycles.png | Bin 0 -> 12411 bytes Tree/Images/Example.graffle | Bin 0 -> 2638 bytes Tree/Images/Example.png | Bin 0 -> 16096 bytes Tree/Images/ParentChildren.graffle | Bin 0 -> 2303 bytes Tree/Images/ParentChildren.png | Bin 0 -> 8346 bytes Tree/Images/Tree.graffle | Bin 0 -> 2946 bytes Tree/Images/Tree.png | Bin 0 -> 19207 bytes Tree/README.markdown | 168 +++++++++++++++++++++ Tree/Tree.playground/Contents.swift | 86 +++++++++++ Tree/Tree.playground/contents.xcplayground | 4 + Tree/Tree.playground/timeline.xctimeline | 6 + Tree/Tree.swift | 39 +++++ 14 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 Tree/Images/Cycles.graffle create mode 100644 Tree/Images/Cycles.png create mode 100644 Tree/Images/Example.graffle create mode 100644 Tree/Images/Example.png create mode 100644 Tree/Images/ParentChildren.graffle create mode 100644 Tree/Images/ParentChildren.png create mode 100644 Tree/Images/Tree.graffle create mode 100644 Tree/Images/Tree.png create mode 100644 Tree/README.markdown create mode 100644 Tree/Tree.playground/Contents.swift create mode 100644 Tree/Tree.playground/contents.xcplayground create mode 100644 Tree/Tree.playground/timeline.xctimeline create mode 100644 Tree/Tree.swift diff --git a/README.markdown b/README.markdown index f90a8497b..b33b077a2 100644 --- a/README.markdown +++ b/README.markdown @@ -134,7 +134,7 @@ Often just using the built-in `Array`, `Dictionary`, and `Set` types is sufficie ### Trees -- Tree (general-purpose) +- [Tree](Tree/). A general-purpose tree structure. - Binary Tree - Binary Search Tree (BST) - AVL Tree diff --git a/Tree/Images/Cycles.graffle b/Tree/Images/Cycles.graffle new file mode 100644 index 0000000000000000000000000000000000000000..8d272e6ad2ea89f67d7f4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V?7v92L9pc*NgW^+3Z@&Rms<8BIDKJPM8K<`<>fyDLg6V{uf@P BFzEmQ literal 0 HcmV?d00001 diff --git a/Tree/Images/Example.graffle b/Tree/Images/Example.graffle new file mode 100644 index 0000000000000000000000000000000000000000..8df8f8670cdafc7ade086d9825e5711fa0199a78 GIT binary patch literal 2638 zcmV-U3bFMciwFP!000030PS5{SKGQ0e%|~FA6`%ENV4TiH)XGIX`!3jCIL>nvesF` zQ4$x&N^PY;yZG;C}rF+kEM2Uwso+-t*yVU)#`&mz-zUg=8kr9 zu-|BE&_}Jdd$g{t_oN)WtJSWruXU!RbWik^U|c(i#DGWg_5eD23krH$w%1{pQSTXZ z;M=zE$<4LjHm>;XX5EwicYeTbd9)w4`OQX6eG83#D0!Dhn`omp*`27s*uKXkba_7N zd8)*sh^d|5HewmUA#Z|(y6A^~Hxk2vehhmbBi88z+|m!32R${Ui18LLe`h8? zaXCqQeq3>zP?I!;X&A=76)OUYhL9c1G@v`4=Jj z3&3TYh2L3x9Qj>;29$}P6E~;Na-t!EVLz+~em5-ikBj{$(v1Q0po^(|#96RuSR1uu zXCew86l`~xpLOD9RWx?H^^kA88!$F7s|P;vE*m z$yH+}1n5n(ECT_YJ(**bCi88Z8%dpmY9@d%|qCYV# z>{=AtF6dXRtyo)e>zn zJElrziK80;S!#izja=8lcXvhl&j}fg9vkrX+@Mj;EW3nR&w|*(iR3qOz75&dnfqIj z?BEupdw%lI8+5_Lq~!@uFx6xtbMzq|UczU?L~B1=9SD~4GH7*Bs}uUL^?EFdxkTDD zULNrw|NRbRJrRfqgnw^Eybb5I)r~k0)y`!w0SdLDS;Tom`GcMwq?mUn?R9AAAOC19f*Kv&J zK)F?+e3elSb6GgG8qDM#jqz8Oer4yFi>6<6+4PHIq(lBhFoXohh71a(Js9GIizqa? z2w-B`?%YWeNKz055!1k!68v!TR;6G6yz~oKlcr@8)caU#J`Zb`nQ~REtysHqtaX+l zEm@Ydh4h;|hO`CkinOapTC?Kp{SG2a<;Q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`)^q!Y)PDD7Od|l>e=`%aq~d_B8RfgUn06LEE4VgHu3cMArwJwoTo3~{ zY-Lijh|(AE*-opx{d5xMqkfG5UeP68)LdT7$%k{)@bmz?PDn5Jn8J5;DrHskvip($ zlnqMZE8pv-6Nr!MKilzT>i4_6nl^S7cRkhDn`R{E6sELEV^nDPc;0}MIjdP&DqSiR Z$YWA1e&ok=C*bDV{{Ud?B9@>y007sihBg2I literal 0 HcmV?d00001 diff --git a/Tree/Images/ParentChildren.png b/Tree/Images/ParentChildren.png new file mode 100644 index 0000000000000000000000000000000000000000..b92db66ccc516a931444a25fc1543fa0f68b99fe GIT binary patch literal 8346 zcmb_?cQ~A1*Dhl)y3wL{qBA-{Mkm@3EhL!HdyN*sC=*@u8a-Nc(GtB2Q6hxsq7yX{ zMEIWk-uJxUcg}Urf5&w(``NShT6^ui_S*NlAJGV1brM2)LM$vS5={*i11v0Td!U^H z0RexPYV?r62e!9?x)S#Mh(HMNK;WVA$Quibi1P0*Hdb~nEg&%CXlUwVs-rDy?d~ds zv~fq-3i-Qw0Mb}ka{jVF)791o$?EUw;^r;uFVFsuge=hh+bzt_`j3c@vpl=04uVzL z-OH9$LP%Ulgk6D-hgzh<~l}KfS;*D-g;F|7Xh-2^)BP~*Gfpn?rR7SC0?%}}95*bAyWp+P(xW~Ll*OR6l@kkHT?#9M~H8mu5Z&R|T& zmNA$L+m_@zPE05}IW6b|J$mhR8#T5n{E_nSP(V8v6WX9==G)`=jsQT=c2q=@8;!+s0c>PB*x*bu;)i+D|NZg@hE4 zT>uU^f2kpn$Pl(%7J9b#xk4`BbTQ=ikMG9S&;98#y_JfGckdbW1p}6jiIVIfIG}re zhgIe+hqYZd^gE6BFIL03w9*Ak>sH?%bvBNc>g1e9-m%D(aGq^;UEsW#tGE8S|D_gD zsC0Yt=X);wd2DC{#xhFCuKaP^>H0vdWzfk$(BgP(MHwW{LWc1=u{+*kSvsLr+ zjrL`F`Qzafo1e|^Lndni(O4pvgKHo7Yi(SE3z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HJSe01KkI@hJtLFx8?4O1GLPp#$}dP&!wzWbPx|wUtM_tcyosa9yW8M= zlzcy&j(Y3vuJ003%OJw5lKmO`hd!yT4=kfAz7J{Ax_UBQ|CrYEO}@x zlS}!YS%M)6Fzv0E?5l!9m>_}0c?RjY%(7E#8bwtj;MrFn{)T zn^IT)xnni!@otw0-OF3CvP3dP=>C2WR~7(X3k8181|D{UCm8F_pH0?e5@XWZGl|rb4p< zNE1Q<7p#HwGXa&k=a&sLq$;ZhKxT!35wZLr&ldo-vnbJKYzl=?pd*eD$GYCQyh7lC zCkCe>O<(q26kvx3Mrc*Dr0SlSNF%o;ZuV*`J^s_LrLC|QO57m##iUjP6A literal 0 HcmV?d00001 diff --git a/Tree/Images/Tree.graffle b/Tree/Images/Tree.graffle new file mode 100644 index 0000000000000000000000000000000000000000..54cb3367b68228c9ee531176d4a4fbabca8ccf1d GIT binary patch literal 2946 zcmV-|3w`t-iwFP!000030PS5{SKGK2er|t-53d7`E|x5JD6_(43NzfMq3vlGYn>$= zC2{N6sjWb17ytdpPKd7|!E_cWC=b|)_SR+l`}W?lCA0a*x1n!biYWHN;Po0b!I~ig zH|%;r|Ml9tvp+Z3+8tJI2~ZtJNNje9>y{p6wc^ zhX$!64<%`WP;(Dv?O7Bt}@@o+t1YPlMvz7d+3cWyzzKFKKX6yF!RzC$ z-%o0uDe)-c$;pe&SVn5dTdIdFB3oi9~!`Hf#LH z53p{4n|0#{1H@zw0MMcqv#?Fp4T7nOSn`wOK$`+YZf*)ANGjX$d0efx6Z&4(p_0nM zZYFfU0Oq{t=gQ;C+sb{m}Qt zkOy&Dao3ASKELj`+^@8*n5jO7J2YM!v-5HVe|o++yB<}Px#B`uHU-&k=#GaXkY$?A zjEO4NoPsk>JV_0$i)br?eAb^sFAy~#pAI4ndb3pN>)iJkvI+2PkGDDES&Q}#33fK z31K#1&;brX>jp-|beM$*0F+T`5pq*9$E`MHz{JW$5lSfm*nv!GGh|ZRh7?0&0cKhD zO^NndKWcnU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})w%BQ z;F8CM zb{(Hz?2Clo<*5`Y=VjB#|5o%1?rUZVux^0F3Jh3g;wUjSNsS#oh2gN=R;i^#usvzt))m0BL)#`~Uy| literal 0 HcmV?d00001 diff --git a/Tree/Images/Tree.png b/Tree/Images/Tree.png new file mode 100644 index 0000000000000000000000000000000000000000..751dac2e33741afc1489102e8dcd1642f018360b GIT binary patch literal 19207 zcmb8XbzD?k`!_lz-6cp3CEXw)G148GPhO_tRqAizgjP%t<+SRhzbz}wGRP*_SzN>E5d zP(*|u+`;c3>J?xc!tdqJ_OFot%29IkxA$}P32^oHLSoCcwet=PkY#1XzUY7c_phD- zu1^2!OoS+#QsH4SU^bdf64}r%3!ZbD|&nS_&NIfgYxCXW&Ymzf4la--t+H% zJs0l)Z_o>VuJ-C)0gis);Q(7~?c_u*p8o&7+TVFC&O; z`2W@s|9biFRnX0H1TupEGh}iEb>Bp0ArKTqUFn8l2z2df=ojO$nckE%h3p3s)U0Bz zc?Uit=qK@GVeB`#ejKoCEGs%a9h6pK*$w)MArXR}cgxvcr-8KeLC-t1h{wU)1afJC)O5FUMXc{Kf(c*-R!uc#U3F9V`zXg+~xIE zMwTPQ1X2x$D(5ar-DsKbC(+|2gOX!E(cdXj8B;B0E0-_+jJ%HW{P#8#;*lmQ2;~=8 zoBaR{UJ5>|kXQd6gOaNWK&PSo6K~xFVAEuo;_jacl^-;ymy3a71SqEZ)0g@LI?@MO z$@rkxesG@J0J<@wX=bTairmF!|FRgO;GR zxzHa^eZTc=D#$y&r{cNpI{LhmnDCs0=! zS4#)~`Epe|+v7{q!^@}VhxzC4@Prf+nPhK|6x`5)$b3&#yuJH-w};-_hIqB@_)k~l z&PP>T#()uyCl-FEyOaK9htSB0k`q=kPuLc&(k=N%I*4#GOlJx?3c9^K^zAfq0TbO= z2ZiIL30g-k4`$_N3EQj8w?!n8V{Gr@5bH=TB6McD2*6-=WujNnw7e!pn$pouL)ml) z=Ewt<=+nK=!xYnwPb@)`dJna8u0?DQNf6Utd#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H=8FBhwT}Rxma_Vvc?86H}(G!&>Y^PxReR4An z$kD=#$1*)6l9OM)BSV=43^977|#dU>nl2ncUERmwm0y6>jw>+4@abG(TD?J(8yX}7U6}7(63xVYn|EAa$n-4(EB2j0+_Iv`o z{=X+{&*S7zY=P;ODi9p40tC~f7NH~v|IDG^9|Ged&>d>D=m*yoJ`NhC{a)`~GgB?9Mt5cl1Djp_)4g{rV`a8T^vTY|!UwU{A?)KEwdARck7T@3<~XO7m^T zxgDWJMEeX+`W>BrD~mk?eV$w=^z+}g>TI_JSPIN^1@@OSupggTu { + public var value: T + + public var parent: TreeNode? + public var children = [TreeNode]() + + public init(value: T) { + self.value = value + } + + func addChild(node: TreeNode) { + children.append(node) + node.parent = self + } +} +``` + +This describes a single node from the tree. It has a value of generic type `T`, a reference to a `parent` node, and an array of child nodes. + +It will be useful to add a `description` method so you can print the tree: + +```swift +extension TreeNode: CustomStringConvertible { + public var description: String { + var s = "\(value)" + if !children.isEmpty { + s += " {" + children.map { $0.description }.joinWithSeparator(", ") + "}" + } + return s + } +} +``` + +To see this in action in a playground: + +```swift +let tree = TreeNode(value: "beverages") + +let hotNode = TreeNode(value: "hot") +let coldNode = TreeNode(value: "cold") + +let teaNode = TreeNode(value: "tea") +let coffeeNode = TreeNode(value: "coffee") +let chocolateNode = TreeNode(value: "cocoa") + +let blackTeaNode = TreeNode(value: "black") +let greenTeaNode = TreeNode(value: "green") +let chaiTeaNode = TreeNode(value: "chai") + +let sodaNode = TreeNode(value: "soda") +let milkNode = TreeNode(value: "milk") + +let gingerAleNode = TreeNode(value: "ginger ale") +let bitterLemonNode = TreeNode(value: "bitter lemon") + +tree.addChild(hotNode) +tree.addChild(coldNode) + +hotNode.addChild(teaNode) +hotNode.addChild(coffeeNode) +hotNode.addChild(chocolateNode) + +coldNode.addChild(sodaNode) +coldNode.addChild(milkNode) + +teaNode.addChild(blackTeaNode) +teaNode.addChild(greenTeaNode) +teaNode.addChild(chaiTeaNode) + +sodaNode.addChild(gingerAleNode) +sodaNode.addChild(bitterLemonNode) +``` + +If you print out the value of `tree`, you'll get: + + beverages {hot {tea {black, green, chai}, coffee, cocoa}, cold {soda {ginger ale, bitter lemon}, milk}} + +That corresponds to the following structure: + +![Example tree](Images/Example.png) + +The `beverages` node is the root because it has no parent. The leaves are `black`, `green`, `chai`, `coffee`, `cocoa`, `ginger ale`, `bitter lemon`, `milk` because they don't have any child nodes. + +For any node you can look at the `parent` property and work your way back up to the root: + +```swift +teaNode.parent // this is the "hot" node +teaNode.parent!.parent // this is the root +``` + +We often use the following definitions when talking about trees: + +- **Height of the tree.** This is the number of links between the root node and the lowest leaf. In our example the height of the tree is 3 because it takes three jumps to go from the root to the bottom. + +- **Depth of a node.** The number of links between this node and the root node. For example, the depth of `tea` is 2 because it takes two jumps to reach the root. (The root itself has depth 0.) + +There are many different ways to construct trees. For example, sometimes you don't need to have a `parent` property at all. Or maybe you only need to give each node a maximum of two children -- such a tree is called a [binary tree](../Binary Tree/). A very common type of tree is the [binary search tree](../Binary Search Tree/) (or BST), a stricter version of a binary tree where the nodes are ordered in a particular way to speed up searches. + +The general purpose tree I've shown here is great for describing hierarchical data, but it really depends on your application what kind of extra functionality it needs to have. + +Here's an example of how you could use the `TreeNode` class to determine if the tree contains a particular value. You first look at the node's own `value` property. If there's no match, then you look at all your children in turn. Of course, those children are also `TreeNodes` so they will repeat the same process recursively: first look at their own value and then at their children. And their children will also do the same thing again, and so on... Recursion and trees go hand-in-hand. + +Here's the code: + +```swift +extension TreeNode where T: Equatable { + func search(value: T) -> TreeNode? { + if value == self.value { + return self + } + for child in children { + if let found = child.search(value) { + return found + } + } + return nil + } +} +``` + +And an example of how to use this: + +```swift +tree.search("cocoa") // returns the "cocoa" node +tree.search("chai") // returns the "chai" node +tree.search("bubbly") // nil +``` + +It's also possible to describe a tree using nothing more than an array. The indices in the array then create the links between the different nodes. For example, if we have: + + 0 = beverage 5 = cocoa 9 = green + 1 = hot 6 = soda 10 = chai + 2 = cold 7 = milk 11 = ginger ale + 3 = tea 8 = black 12 = bitter lemon + 4 = coffee + +Then we can describe the tree with the following array: + + [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 6, 6 ] + +Each entry in the array is a pointer to its parent node. The item at index 3, `tea`, has the value 1 because its parent is `hot`. The root node points to `-1` because it has no parent. You can only traverse such trees from a node back to the root but not the other way around. + +*Written for Swift Algorithm Club by Matthijs Hollemans* diff --git a/Tree/Tree.playground/Contents.swift b/Tree/Tree.playground/Contents.swift new file mode 100644 index 000000000..c4e8959f5 --- /dev/null +++ b/Tree/Tree.playground/Contents.swift @@ -0,0 +1,86 @@ +//: Playground - noun: a place where people can play + +public class TreeNode { + public var value: T + + public var parent: TreeNode? + public var children = [TreeNode]() + + public init(value: T) { + self.value = value + } + + func addChild(node: TreeNode) { + children.append(node) + node.parent = self + } +} + +extension TreeNode: CustomStringConvertible { + public var description: String { + var s = "\(value)" + if !children.isEmpty { + s += " {" + children.map { $0.description }.joinWithSeparator(", ") + "}" + } + return s + } +} + +let tree = TreeNode(value: "beverages") + +let hotNode = TreeNode(value: "hot") +let coldNode = TreeNode(value: "cold") + +let teaNode = TreeNode(value: "tea") +let coffeeNode = TreeNode(value: "coffee") +let chocolateNode = TreeNode(value: "cocoa") + +let blackTeaNode = TreeNode(value: "black") +let greenTeaNode = TreeNode(value: "green") +let chaiTeaNode = TreeNode(value: "chai") + +let sodaNode = TreeNode(value: "soda") +let milkNode = TreeNode(value: "milk") + +let gingerAleNode = TreeNode(value: "ginger ale") +let bitterLemonNode = TreeNode(value: "bitter lemon") + +tree.addChild(hotNode) +tree.addChild(coldNode) + +hotNode.addChild(teaNode) +hotNode.addChild(coffeeNode) +hotNode.addChild(chocolateNode) + +coldNode.addChild(sodaNode) +coldNode.addChild(milkNode) + +teaNode.addChild(blackTeaNode) +teaNode.addChild(greenTeaNode) +teaNode.addChild(chaiTeaNode) + +sodaNode.addChild(gingerAleNode) +sodaNode.addChild(bitterLemonNode) + +tree + +teaNode.parent +teaNode.parent!.parent + +extension TreeNode where T: Equatable { + func search(value: T) -> TreeNode? { + if value == self.value { + return self + } + for child in children { + if let found = child.search(value) { + return found + } + } + return nil + } +} + +tree.search("cocoa") +tree.search("chai") +tree.search("bubbly") diff --git a/Tree/Tree.playground/contents.xcplayground b/Tree/Tree.playground/contents.xcplayground new file mode 100644 index 000000000..06828af92 --- /dev/null +++ b/Tree/Tree.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Tree/Tree.playground/timeline.xctimeline b/Tree/Tree.playground/timeline.xctimeline new file mode 100644 index 000000000..bf468afec --- /dev/null +++ b/Tree/Tree.playground/timeline.xctimeline @@ -0,0 +1,6 @@ + + + + + diff --git a/Tree/Tree.swift b/Tree/Tree.swift new file mode 100644 index 000000000..e77045339 --- /dev/null +++ b/Tree/Tree.swift @@ -0,0 +1,39 @@ +public class TreeNode { + public var value: T + + public var parent: TreeNode? + public var children = [TreeNode]() + + public init(value: T) { + self.value = value + } + + func addChild(node: TreeNode) { + children.append(node) + node.parent = self + } +} + +extension TreeNode: CustomStringConvertible { + public var description: String { + var s = "\(value)" + if !children.isEmpty { + s += " {" + children.map { $0.description }.joinWithSeparator(", ") + "}" + } + return s + } +} + +extension TreeNode where T: Equatable { + func search(value: T) -> TreeNode? { + if value == self.value { + return self + } + for child in children { + if let found = child.search(value) { + return found + } + } + return nil + } +}