AMC 10 · 2012 · #25

Grade 11 algebra
absolute-valuefloor-functionperiodic-functionquadratic-equations identify-subproblemspattern-recognitioncasework ↑ Prerequisites: absolute-valuefloor-function
📏 Long solution 💡 4 insights
Problem
A sawtooth function is nested inside itself and the solution count must reach a target. Find the smallest multiplier.

Pick an answer.

(A)
30
(B)
31
(C)
32
(D)
62
(E)
64
How to solve
Strategy Draw a Diagram

Nothing here can be solved by algebra: f is defined by absolute values of fractional parts, so nf(xf(x)) = x is really thousands of little quadratic equations glued together. The move that makes it finite is Tool #1 (Draw a Diagram): divide by n to get f(xf(x)) = x/n, which asks where a fast zigzag meets a nearly flat line. Tool #14 (Extreme Principle) uses 0 ≤ f ≤ 1 to trap every solution inside [0, n], so the picture only has to be drawn once, over a finite window. Tool #4 (Introduce a Variable) names the inner function g(x) = xf(x), and Tool #7 (Identify Subproblems) chops [0,n] into half-unit windows on which g is a single monotone piece of a parabola — that is the fact that lets each window be counted independently. Inside a window the counting is a clean one-crossing-per-swing argument, and it must be proved, not assumed: the zigzag rises and falls with slope at least 2 while the line has slope 1/n ≤ 1, so crossings cannot be missed or doubled. Tool #5 (Look for a Pattern) sums the per-window counts 2, 2, 4, 4, 6, … into a closed form, and Tool #3 (Eliminate Possibilities) reads off the smallest n clearing 2012.

1STEP 1

Trap every solution inside [0,n]

Every solution is trapped inside a bounded range.

0 ≤ f ≤ 1 → 0 ≤ nf(xf(x)) ≤ n → 0 ≤ x ≤ n; equation ⇔ f(xf(x)) = x/n on (0, n].
2STEP 2

Read the shape of f: a row of V's

The function is a row of identical V shapes.

f(x) = 1 - 2{x} on [m, m+1/2]; f(x) = 2{x} - 1 on [m+1/2, m+1]; f(m) = 1, f(m+1/2) = 0, |f'| = 2.
3STEP 3

Name the inner function g(x) = xf(x)

Naming the inner function makes the nesting readable.

g(x) = xf(x); g(x) = x(2m+1-2x) on [m, m+1/2], g(x) = x(2x-2m-1) on [m+1/2, m+1]; g(m) = m, g(m+1/2) = 0, g(m+1) = m+1.
4STEP 4

g is monotone on each half-unit window

It runs one way on each half-unit window.

Vertex at x = (2m+1)/4. For m ≥ 1: g ↓ from m to 0 on [m, m+1/2]; for m ≥ 0: g ↑ from 0 to m+1 on [m+1/2, m+1]; |g'| ≥ 1 in both. Exception: [0,1/2], where max g = 1/8.
5STEP 5

Exactly one crossing per swing

Each sweep gives exactly one crossing.

W splits into 2M swings. On each, |φ'| ≥ 2 > 1/n and φ runs 0 ⇔ 1, so h = φ - x/n is strictly monotone with opposite-sign endpoints → exactly one root per swing, none shared.
6STEP 6

The first half-unit contributes nothing

The first half-unit contributes nothing.

0 ≤ g ≤ 1/8 on [0,1/2] → f(g(x)) ≥ 3/4 > 1/2 ≥ x/n: no solutions there.
7STEP 7

Add up the swings: 2n²

Adding the sweeps gives a clean square formula.

N(n) = 2 + Σ_m=1ⁿ⁻¹(4m+2) = 2 + 2n(n-1) + 2(n-1) = 2n²
8STEP 8

Pick the smallest n

The smallest multiplier is 32, choice (C).

2n² ≥ 2012 ⇔ n² ≥ 1006; 31² = 961 < 1006 ≤ 1024 = 32² → n = 32 → (C)
Answer
32
Test the formula N(n) = 2n² at n = 1, where everything can be solved by hand. Step 6 rules out [0,1/2]. On [1/2,1], f(x) = 2x-1 and g(x) = 2x² - x climbs 0 → 1. The swing with g ∈ [0,1/2] needs 1 - 2g = x, i.e. 4x² - x - 1 = 0, giving x = (1+√(17))/8 ≈ 0.640; the swing with g ∈ [1/2,1] needs 2g-1 = x, i.e. 4x² - 3x - 1 = (4x+1)(x-1) = 0, giving x = 1. Exactly 2 solutions, matching 2 · 1². A second anchor: x = n is a solution for every n, since f(n) = 1 gives nf(nf(n)) = nf(n) = n — and step 5 predicted precisely that, as the root sitting at the right end of the final swing. A numerical sweep of nf(xf(x)) - x across [0,n] counts 2, 8, 18, 32, 50, 72, 98, 128 sign changes for n = 1, …, 8, exactly 2n² each time. The conclusion is also not delicate: 2012 sits comfortably inside (1922, 2048], about 90 above the n=31 count and 36 below the n=32 count, so even an off-by-a-few miscount of swings would still land on 32. The distractors match the natural slips: (D) 62 and (E) 64 are 2 · 31 and 2 · 32, what you report if you solve for 2n or for the number of swings per unit instead of for n; (A) 30 and (B) 31 come from rounding √(1006) ≈ 31.7 down instead of up.
💡Key takeaway

Rewrite it as one fast zigzag against one slow straight line: every time the zigzag makes a full trip from 0 up to 1 it has to cross the line exactly once, so counting solutions is just counting trips.

  • Trap every solution inside [0,n]
  • Read the shape of f: a row of V's
  • Name the inner function g(x) = xf(x)
  • g is monotone on each half-unit window
  • Exactly one crossing per swing
  • The first half-unit contributes nothing
  • Add up the swings: 2n²
  • Pick the smallest n