Lesson goal: Minimum digit quotient

Previous: The integer geometric progression puzzle | Home | Next: Introduction

In the 1972 MAA High School Mathematics Contest (Problem #33), contestants solved this elegant optimization puzzle:

The minimum value of the quotient of a (base ten) number of three different nonzero digits divided by the sum of its digits is:

$$\text{(A) } 9.7 \qquad \text{(B) } 10.1 \qquad \text{(C) } 10.5 \qquad \text{(D) } 10.9 \qquad \text{(E) } 20.5$$

Let the hundreds, tens, and units digits be $H, T,$ and $U$, where $H, T, U \in \{1, 2, \dots, 9\}$ are all non-zero and pairwise distinct ($H \ne T$, $H \ne U$, $T \ne U$).

The number is $N = 100H + 10T + U$, and its digit sum is $S = H + T + U$. We want to minimize the quotient: $$Q = \frac{100H + 10T + U}{H + T + U}$$ Let's rewrite $Q$ to reveal which digits exert the strongest influence: $$Q = \frac{(H + T + U) + 99H + 9T}{H + T + U} = 1 + \frac{9(11H + T)}{H + T + U}$$ Notice:
  1. $U$ appears only in the denominator! To minimize the overall fraction, we must maximize the denominator without increasing the numerator, which forces: $$U = 9$$
  2. $H$ has a massive multiplier of $99$ in the numerator, while $T$ has only $9$. To minimize the numerator, we must choose the smallest possible non-zero digit for $H$: $$H = 1$$
  3. With $H = 1$ and $U = 9$, our quotient simplifies to: $$Q = 1 + \frac{9(11 + T)}{1 + T + 9} = 1 + \frac{9T + 99}{T + 10} = 1 + \frac{9(T + 10) + 9}{T + 10} = 10 + \frac{9}{T + 10}$$ To make $\frac{9}{T + 10}$ as small as possible, we must make $T$ as large as possible. Since digits must be distinct and $U = 9$, the maximum available digit for $T$ is: $$T = 8$$
This gives the number $\mathbf{189}$, with digit sum $1 + 8 + 9 = 18$, and minimum quotient: $$Q = \frac{189}{18} = \mathbf{10.5}$$ In this lesson, we write a program that tests all $9 \times 8 \times 7 = 504$ valid numbers, finds the minimum quotient, and ranks the lowest candidates!
min_q = 1000; best_num = 0
for h = 1, 9 do

for t = 1, 9 do

for u = 1, 9 do

if h ~= t and h ~= u and t ~= u then

q = (100*h + 10*t + u) / (h + t + u)

if q < min_q then min_q = q; best_num = 100*h + 10*t + u end

end

end

end

end
Move the mouse over a dotted box for more information.

The loop verifies that among all 504 three-digit numbers with distinct nonzero digits, the minimum quotient is exactly 10.5, achieved by the number 189.

Now you try. Run the code to see the minimum quotient ($10.5$) and the runner-up values. Then check Example 1 to see what happens if duplicate digits were allowed!

Type your code here:


See your results here: