taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 2.3-4

Exercise 2.3-4

not stated yet in Lean solution written

Rating01
KindK2, decide: say whether a claim holds from the written solution
SectionSection 2.3 of Volume 1

The task

In a tree diagram with the root at the top, node XX has a higher level number than node YY. Is XX drawn lower than YY?

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

What is the level of the root, and where is the root drawn?

Solution

Show the solution

The root has level 0 and is drawn at the top. The children of a node of level kk have level k+1k+1, and they are drawn below that node. So a larger level number means a lower position in the usual diagram.

Answer: true.

Check

In the tree of Fig. 19, the node GG has level 3 and BB has level 1. In the usual diagram GG is below BB. Python3 computed the levels of all nine nodes from the parent table: AA 0, BB and CC 1, HH, JJ, DD, EE, FF 2, GG 3.

Remarks

The statement is a matter of convention, not of mathematics. The convention is the root at the top.

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.