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.2.2-29

Exercise 1.2.2-29

proved in Lean solution written

RatingHM20
MarkersHM (needs higher mathematics)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.2 of Volume 1. Companion chapter: Numbers, powers and logarithms

The task

Find the base that makes blog⁡bxb \log_b x least, when bb is a real number, when bb is an integer, and for the variant (b+1)log⁡bx(b+1)\log_b x with bb an integer.

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

Write blog⁡bx=(ln⁡x)⋅b/ln⁡bb \log_b x = (\ln x) \cdot b/\ln b and note that ln⁡x>0\ln x > 0. Only b/ln⁡bb / \ln b matters.

Hint 2

Differentiate, and find where the function falls and where it rises.

Hint 3

For integers compare the two integers next to the turning point.

Solution

Show the solution

Let x>1x > 1, so ln⁡x>0\ln x > 0, and b>1b > 1.

(a) Put f(b)=b/ln⁡bf(b) = b / \ln b. Then f′(b)=(ln⁡b−1)/ln⁡2bf'(b) = (\ln b - 1)/\ln^2 b. This is negative for 1<b<e1 < b < e and positive for b>eb > e. So ff has its unique minimum at b=eb = e, with value ee, and blog⁡bxb \log_b x is least for b=eb = e.

(b) The function ff falls up to ee and rises afterwards, so among the integers the minimum is at 22 or 33. Here f(2)=2/ln⁡2=2.885…f(2) = 2/\ln 2 = 2.885\ldots and f(3)=3/ln⁡3=2.731…f(3) = 3/\ln 3 = 2.731\ldots. The minimum is at b=3b = 3.

(c) Put g(b)=(b+1)/ln⁡bg(b) = (b + 1)/\ln b. Then g′(b)=(ln⁡b−1−1/b)/ln⁡2bg'(b) = (\ln b - 1 - 1/b)/\ln^2 b. The function h(b)=ln⁡b−1−1/bh(b) = \ln b - 1 - 1/b is increasing, since h′(b)=1/b+1/b2>0h'(b) = 1/b + 1/b^2 > 0. Also h(3)=1.0986−1.3333<0h(3) = 1.0986 - 1.3333 < 0 and h(4)=1.3863−1.25>0h(4) = 1.3863 - 1.25 > 0. So gg falls up to a point between 33 and 44 and rises afterwards, and the integer minimum is at 33 or 44. Here g(3)=4/ln⁡3=3.641…g(3) = 4/\ln 3 = 3.641\ldots and g(4)=5/ln⁡4=3.607…g(4) = 5/\ln 4 = 3.607\ldots. The minimum is at b=4b = 4. □\square

Check

For x=1000x = 1000: blog⁡bxb \log_b x for b=2,3,4b = 2, 3, 4 is 2⋅9.966=19.932 \cdot 9.966 = 19.93, 3⋅6.288=18.863 \cdot 6.288 = 18.86 and 4⋅4.983=19.934 \cdot 4.983 = 19.93. For (b+1)log⁡bx(b+1)\log_b x with b=3,4,5b = 3, 4, 5 the values are 25.1525.15, 24.9124.91 and 25.7525.75.

Remarks

The quantity blog⁡bxb \log_b x measures the work for a number system with bb symbols, when a number up to xx needs log⁡bx\log_b x places of bb states each. This is the old argument for base 33, which is the nearest integer to ee. Part (c) models a cost of b+1b + 1 for each place.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.