Talk:Left-child right-sibling binary tree
|WikiProject Computing||(Rated Stub-class)|
|WikiProject Computer science||(Rated Stub-class)|
It says, "[...] is not reversible in general without additional information". As I see it, a K-ary Tree and a LC-RS Tree are just different representations of the same high-level data structure (like a directory structure). The tree in the example image is reversible (just think of the right one as being rotated 45 degrees clockwise) and going back and forth between a linked list and a subtree is trivial.
There is a small discrepancy that in a K-ary Tree the number of children is limited to K and in a LC-RS Tree there is no such limit. Only when a tree is converted to LC-RS, mutated, and attempted to convert back to K-ary, there is a chance that K needs to grow, which makes them incompatible. But if you think of it as converting from and back to a generic tree (as if K is infinite or variable), they're completely interchangeable. --Zom-B (talk) 21:14, 14 December 2012 (UTC)
- If its reversible or not depends on the computational representation. If the representation of the tree distinguish left and right sons (most commons case is using pointers in C), its reversible. But if its represented as a simple graph G=(P,E) with P being a set of nodes and E a set of edges, then is not reversible, because you need to separate blue and black edges. It would be reversible if we had G=(P,E1,E2) being E1 the set of blue edges and E2 the set of black edges. We could include a section about the computational representation of the tree but I couldn't find many good sources on this.--Neo139 (talk) 18:23, 15 December 2012 (UTC)
A couple of other readers also found this confusing. Suggest moving the explanation from talk section to main article. — Preceding unsigned comment added by 22.214.171.124 (talk) 16:40, 10 April 2013 (UTC)
Here's a quote of some of the page's source:
[...] For example, we have a binary tree below: ''1 /|\ / | \ / | \ 2 3 4 / \ | 5 6 7 / \ 8 9'' [...]
«The LCRS representation is more space-efficient than a traditional multiway tree» ¿what would be a traditional multiway tree representation?