Hi makennaben,The key with any scary-looking custom function is to
not react to the notation. Two moves handle almost every one of these, and they're exactly what kevincan was nudging the thread toward.
Step 1 - Translate the definition into plain wordsf(x) = the
k where
10^k ≤ x < 10^(k+1). That's just asking:
"which power-of-10 band does x live in?" For a positive integer, that's simply
(number of digits − 1).
So the givens become concrete:
-
f(y) = 4 →
10^4 ≤ y < 10^5-
z > y →
z > 10^4 →
f(z) ≥ 4Step 2 - For "must be true," try to BREAK each statement"Must be true" means true in
every case. So your real job is to hunt for
one counterexample. Find one and the statement is dead. The best hunting ground is
extreme values - try
z barely above y, then
z gigantic.
I: let
y = 10^4,
z = 10^10. Then
(z+y)/2 ≈ 5×10^9, so
f = 9, but the right side is
(10+4)/2 = 7. Is
9 ≤ 7? No -
I dies. (This is exactly kevincan's "imagine z is a
10-digit number.")
III: let
y = 10^4,
z = 2×10^4. Then
f(z^y) ≈ 43010, and
f(43010) = 4, not greater than
4 -
III dies.II: you
can't break this. Multiplying a band-
4 number by
z lands in a band of at most
f(z) + 5, while the right side is
4·f(z). Since
f(z) ≥ 4, we get
f(z) + 5 < 4·f(z) every time -
II survives.Lock in the habitDecode a fresh custom function fast, in plain words:
"g(x) = the number of times you can halve x before dropping below 1." Immediately test it -
g(8) = ?,
g(9) = ? - before touching the statements.
Translate first, then attack must-be-true with extreme test numbers. That combo cracks the whole family.
Answer: Bmakennaben
how should one go about answering this question if seeing something like this for the first time