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 · 1.3.1-1

Exercise 1.3.1-1

not stated yet in Lean solution written

Rating00
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.3.1 of Volume 1. Companion chapter: Description of MIX

The task

Find the number of ternary digits that one MIX byte would hold if the machine were ternary.

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

A MIX byte must hold at least 64 values and at most 100 values (Section 1.3.1).

Hint 2

Look for the power of 3 that falls in the range from 64 to 100.

Solution

Show the solution

A byte of kk trits has 3k3^k values. The rule for MIX is 64≤b≤10064 \le b \le 100. Now 33=273^3 = 27 is too small, 34=813^4 = 81 lies in the range, and 35=2433^5 = 243 is too large. So a ternary byte has four trits.

Check

python3: [3**k for k in range(1,7)] gives [3, 9, 27, 81, 243, 729]. Only 8181 is between 6464 and 100100.

Remarks

The same test for a binary MIX gives 26=642^6 = 64, so six bits per byte, which is the smallest legal byte.

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.