Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binary tree
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Encoding ordered trees as binary trees === There is a natural one-to-one correspondence between ordered trees and binary trees. It allows any ordered tree to be uniquely represented as a binary tree, and vice versa: Let ''T'' be a node of an ordered tree, and let ''B'' denote ''T's'' image in the corresponding binary tree. Then ''B's'' ''left'' child represents ''T's'' first child, while the ''B's right'' child represents ''T'''s next sibling. For example, the ordered tree on the left and the binary tree on the right correspond: [[Image:N-ary to binary.svg|400x240px|center|An example of converting an n-ary tree to a binary tree]] In the pictured binary tree, the black, left, edges represent ''first child'', while the blue, right, edges represent ''next sibling''. This representation is called a [[left-child right-sibling binary tree]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)