Workbench / Mathematics Book 1 Exercises: Arithmetic and Numbers
B1·10
Powers, Roots, Scientific Notation and Logarithms
Exercises for chapter 10: why the exponent laws hold and what they force, −2² and the order of operations, roots of sums and products, scaling by k² and k³, scientific notation, logarithms as exponents, counting digits exactly, integer square roots by averaging, compounding frequency, sizes in kB and KiB, inflation and real returns, and senior exercises on how algorithms scale, exponential backoff and multiplying tiny probabilities.
Start here: how these exercises work
Write your answer in the box first; hints open one at a time as you write, and the solution a couple of minutes after the last hint. Theory is in your own words, practice and programs come with real output (Python 3.13), cumulative projects use chapters 1 to 10 together, what the chapter leaves out explains what it skips, and senior exercises put the ideas into designs and reviews.
Theory
T1. Why exponents add
Explain, by counting factors, why , why , and why there's no similar rule for .
T2. What the laws force
Use the law to explain why and , and the law to explain why . Then say why " is negative" is wrong.
T3. −2², (−2)² and spreadsheets
Explain what , and are and why. A colleague's spreadsheet formula =-A1^2 returns 9 when A1 is 3. Explain.
T4. Roots of products, not sums
Show that for non-negative and , use it to simplify , and give a counterexample for .
T5. Scaling by powers
A model car is made at 1 : 20. Its paint covers 0.06 m² and its plastic weighs 150 g. Estimate the paint and the weight of the real car, if it were made the same way. Then say what the square–cube law predicts about building a much bigger version of anything.
T6. Logarithms as exponents
Explain in your own words what means, why , and why is undefined.
Practice and programs
P1. By hand
(a) . (b) . (c) in scientific notation. (d) . (e) Solve . (f) How many digits has ? (.)
P2. Counting digits, exactly
Write an exact digit-counting function using only integer comparisons, and test floor(log10(n)) + 1 against it on numbers near powers of ten and on 10,000 random numbers up to . Where does the formula fail, and why there?
P3. Integer square roots by averaging
Write isqrt(n) for huge whole numbers using Heron's averaging with integer division only, test it against math.isqrt, and count the steps for numbers of 21, 101 and 157 digits.
P4. How often is interest compounded?
A deposit pays 7.5 % a year. Compare compounding yearly, half-yearly, quarterly, monthly and daily: the effective annual rate and ₹1 lakh after five years. What's the limit?
Cumulative projects (chapters so far: 01–10)
C1. Sizes people can read
Write human(n, base) that shows a byte count as kB/MB/GB (base 1000) or KiB/MiB/GiB (base 1024) with one decimal place, choosing the unit with a logarithm (chapter 10), rounding exactly in integers (chapters 4 and 7), and correcting both float errors and a rounding that reaches the next unit.
C2. What money will buy
At 6 % inflation, what will ₹1 lakh buy in 10, 20 and 30 years, in today's money? A fixed deposit pays 7 %: what's its real return, and why isn't it ? What happens after 30 % tax on the interest?
What the chapter leaves out
The number e and continuous growth
The limit in P4, , defines the base of natural logarithms. Growth at a rate proportional to the current amount, compounded continuously, is ; radioactive decay, cooling and idealised populations follow it. Calculus (beyond this book) shows why makes its own rate of change.
Exponents beyond fractions
needs a definition: fractions give , and the value is what these approach, which requires the real numbers of chapter 12. Exponents can even be complex numbers, which leads to Euler's formula , beyond this book.
Big O notation
Computer science describes how cost grows with input size by its fastest-growing term: , , , . Constant factors are ignored; the senior exercise S1 shows why the growth rate dominates for large .
Logarithms in information
The number of bits needed to tell apart equally likely possibilities is (20 questions identify one of about a million things). Claude Shannon's information theory (1948) builds on this, and entropy, the average information of a message, is a sum of logarithms.
Senior exercises
S1. How work grows with data
A feature runs fast on test data of 1,000 records and will meet 10 million in production. Compare algorithms that take , and steps at 100 million steps a second, and say what a review should ask.
S2. Exponential backoff
A client retries a failing request with delays that double from 0.1 s. Show why the delays must be capped, how many retries fit a 120 s timeout with a 20 s cap, and why production systems add random jitter.
S3. Multiplying tiny probabilities
A spam filter multiplies the probabilities of 120 independent features, each about 0.001, and compares two classes. It always decides wrongly on long messages. Explain, and fix.