Sets, Relations & Functions
Functional equations
Grade 11
Question:
<p>Let \(W\) be the set of whole numbers and \(f: W \to W\) be defined by<br>\[f(x) = \begin{cases} \left(x - 10\left[\dfrac{x}{10}\right]\right)10^{[\log_{10} x]} + f\!\left(\left[\dfrac{x}{10}\right]\right) & \text{if } x > 0 \\ 0 & \text{if } x = 0 \end{cases}\]<br>where \([y]\) denotes the largest integer \(\to y\). Then \(f(7752) =\)</p>
Step-by-Step Solution
Key Concept: This function recursively reverses the digits of a number by extracting the last digit (using modulo 10 via the floor function), placing it in the correct reversed position (using powers of 10), then recursively processing the remaining digits obtained by integer division by 10.
<p><strong>Step 1: Understand the function structure</strong></p><p>The term (x - 10[x/10]) extracts the last digit. The term 10^([log₁₀ x]) places this digit at the appropriate power of 10. The recursion continues with f([x/10]).</p><p><strong>Step 2: Trace f(7752)</strong></p><p>• x = 7752: last digit = 7752 - 10(775) = 2; [log₁₀ 7752] = 3; contributes 2·10³ = 2000</p><p>• f(775): last digit = 775 - 10(77) = 5; [log₁₀ 775] = 2; contributes 5·10² = 500</p><p>• f(77): last digit = 77 - 10(7) = 7; [log₁₀ 77] = 1; contributes 7·10¹ = 70</p><p>• f(7): last digit = 7 - 10(0) = 7; [log₁₀ 7] = 0; contributes 7·10⁰ = 7</p><p>• f(0) = 0 (base case)</p><p><strong>Step 3: Sum all contributions</strong></p><p>f(7752) = 2000 + 500 + 70 + 7 + 0 = 2577</p><p>∴ Answer: <strong>2577</strong></p>
Correct Answer: 2577