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-13

Exercise 2.3-13

not stated yet in Lean solution written

Rating10
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 2.3 of Volume 1

The task

Node XX has the Dewey number a1.a2.⋯ .aka_1.a_2.\cdots.a_k. Give the Dewey numbers of the nodes on the path from XX to the root.

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

The parent of α.m\alpha.m in Dewey notation is α\alpha.

Solution

Show the solution

The parent of the node α.m\alpha.m is the node α\alpha. So drop the last number one at a time. The path from XX up to the root is

a1.a2.⋯ .ak,a1.a2.⋯ .ak−1,…,a1.a2,a1.a_1.a_2.\cdots.a_k,\quad a_1.a_2.\cdots.a_{k-1},\quad \ldots,\quad a_1.a_2,\quad a_1.

The last one, a1a_1, is the root of the tree. For a single tree the first number is a1=1a_1 = 1.

Check

In the Dewey notation for Fig. 19 the node GG is 1.2.2.11.2.2.1. Its path to the root is 1.2.2.11.2.2.1, 1.2.21.2.2, 1.21.2, 11, which are G,E,C,AG, E, C, A. A python3 check for all nine nodes gave the same paths as the parent table.

Remarks

There are kk nodes on the path, so the level of XX is k−1k - 1.

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.