Exercise · Volume 1 · 2.3-9
Exercise 2.3-9
not stated yet in Lean solution written
| Rating | 00 |
|---|---|
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 2.3 of Volume 1 |
The task
In the two binary trees of equation (1) of the text, which node is the root, or ?
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
In the usual diagram, where is the root drawn?
Solution
Show the solution
The root is drawn at the top. In both diagrams of (1), node is above node . So the root is . The two trees differ in the side on which hangs: it is the left subtree of in one tree and the right subtree in the other.
Answer: .
Check
The two diagrams have the same shape as ordinary trees (a root with one child), but they are different binary trees.
Remarks
This is the example that shows that left and right subtrees are not the same, so a binary tree is not a special tree.
This solution is drafted, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.