Sub topic 5
Using Ordered Options to Narrow the Range
This chapter assumes you can already test one option against a question's conditions. That skill is covered in the chapter on back-substitution mechanics. You should also be comfortable with remainders and with squares and powers up to about 20.
Why order matters
CAT options are often listed in increasing order, such as 13, 14, 15, 16. Sometimes they are in decreasing order. The order gives you information beyond the values themselves. For many questions, one test on a middle option tells you which side of that option the answer lies on. That removes several options at once.
Testing from the top or bottom treats the options as unrelated, and in the worst case you check all of them. If the options are ordered and the question has a direction (smallest, largest, at least, at most), you can usually settle the answer in one or two tests.
Two kinds of feedback
A test of an option can tell you two different things.
- Pass or fail only. The option satisfies all the conditions or it does not. Remainder problems work this way.
- Pass or fail plus direction. The result is too big or too small compared with the target. Increasing expressions work this way, such as x², 2ⁿ or n(n+1)/2.
Direction feedback is what makes narrowing powerful. If a test gives a result that is too small and the expression grows with the option, every smaller option is also too small.
Superlative questions: smallest and largest
Words like "smallest" and "largest" tell you where to look in a list of ordered options.
- For "smallest value that works", the answer is the first passing option in increasing order. Everything before it fails.
- For "largest value that works", the answer is the last passing option.
- Several options can pass. The question word then decides which one is correct.
The first code example shows this. The question asks for the smallest number leaving remainders 2, 3 and 4 when divided by 3, 4 and 5.
# Smallest n leaving remainders 2, 3, 4 when divided by 3, 4, 5.
options = [29, 59, 119, 179]
for n in options: # options are in increasing order
if n % 3 == 2 and n % 4 == 3 and n % 5 == 4:
print(n) # prints 59
breakHere 29 fails the mod-4 condition (29 leaves remainder 1). Then 59 passes all three conditions. Options 119 and 179 would also pass, because each number is 1 less than a multiple of 60. They are not the smallest, so the word "smallest" rules them out. If you had tested 179 first, you would have seen a pass and might have stopped on the wrong option.
Narrowing a range with a middle test
When the expression grows with the option, the search works like a guessing game.
- Pick a middle option.
- Test it and note whether the result is too small, too big, or exactly right.
- Discard every option on the wrong side.
- Repeat on what remains.
The second code example applies this idea. The question asks for the smallest integer x with x² > 200, and the options are 13, 14, 15 and 16.
# Smallest integer x with x**2 > 200. Options: 13, 14, 15, 16.
options = [13, 14, 15, 16]
print(14**2 > 200) # False (196), so 13 and 14 are out
print(15**2 > 200) # True (225)
# 14 fails and 15 passes, so the smallest integer is 15.Testing 14 removes both 13 and 14, because x² grows as x grows. Testing 15 then confirms the answer. That is two squares instead of up to four.
The pair "14 fails, 15 passes" is the key. A single pass is not enough for a "smallest" question. You also need the failure just below it, unless the passing option is the first in the list.
A worked example with direction feedback
Question: the smallest n for which 1 + 2 + … + n exceeds 500. Options: 30, 31, 32, 33.
The sum is n(n+1)/2, which increases with n.
- Test 31: 31 × 32 / 2 = 496. This is not above 500, so 30 and 31 fail.
- Test 32: 32 × 33 / 2 = 528. This is above 500, so 32 passes.
Because 31 fails and 32 passes, the answer is 32. Options 33 and beyond would also pass, but they are not the smallest.
The same logic works for an equation where the result must equal a target. Solve x³ + x = 130 with options 3, 4, 5, 6.
- Test 4: 64 + 4 = 68. This is too small, so go up and discard 3 and 4.
- Test 5: 125 + 5 = 130. It matches.
You never touched 6.
Choosing the test position
The best first test depends on how many options you have and which side you expect the answer to fall on.
| Situation | First test | Reason |
|---|---|---|
| Four options, direction feedback | Second or third option | One result leaves at most two options |
| Five options, direction feedback | Middle option | Leaves at most two on each side |
| Question asks "smallest", exact boundary likely | Option just above the estimated boundary | A fail below and a pass here finish it |
| Pass or fail only, no direction | The easiest option to compute | No range can be cut, so cost is what matters |
| Estimate points strongly to one option | That option | A quick estimate beats a blind middle test |
A rough estimate often improves the choice. For x² > 200, you know 14² is about 196, so the boundary sits between 14 and 15. Testing 14 and 15 directly is then better than testing 13 or 16.
Edge cases to check before you trust the order
Ordered options only help when the expression behaves predictably. Check these before you cut the range.
- Non-monotonic expressions. Quadratics such as (x − 10)² go down and then up. A result that is too big at one option does not mean smaller options are better. Use direction feedback only for expressions that grow steadily, or work on one side of the turning point.
- Negative numbers. For x² > 200 over all integers, −15 also works, and it is smaller than 15. The options here are positive, so the question implicitly asks about positive values. If negative options appear, direction feedback fails.
- Periodic conditions. Remainders repeat. If 59 works, so does 119. Order tells you which pass is the smallest or largest, but it does not tell you which side to search.
- Descending lists. Some questions list options from largest to smallest. Read the list direction before you assume "the first option is the smallest".
- Unordered options. If the list is in no pattern, do not assume the middle option is useful. Pick the option that is cheapest to compute.
A short routine for ordered options
- Check the order of the options and whether the question uses "smallest", "largest", "at least" or "at most".
- Decide whether the expression grows or shrinks with the option. If it is not clear, test a plain pass or fail.
- Estimate the boundary if you can do it in a few seconds.
- Test a middle option, or the option nearest your estimate.
- Discard the wrong side and repeat.
- For a "smallest" or "largest" question, confirm the neighbouring option on the other side of the boundary.
Common errors with ordered options
- Stopping at the first pass in a decreasing list. In a decreasing list, the first pass is the largest, not the smallest.
- Checking only one condition. An option that satisfies the sum condition but not the product condition is still wrong. Test every condition in the question, as in the remainder example.
- Assuming the answer is in the middle. The test position is a tool for narrowing the range, not a guess about the answer.
- Arithmetic slips near the boundary. Boundary tests such as 14² = 196 against 200 are close calls. Recompute them, because a small error flips the conclusion.
Exercise
The options are 6, 7, 8, 9, in increasing order. What is the smallest integer n such that 2ⁿ > 150? Use as few tests as you can and say which options you tested.
Show answer
Because 2ⁿ grows with n, test 7 first: 2⁷ = 128, which is not above 150, so 6 and 7 fail. Test 8: 2⁸ = 256, which is above 150, so 8 passes. Since 7 fails and 8 passes, the answer is 8. Two tests are enough, and 9 never needs checking.
Exercise
The options are 22, 47, 82, 107. Which is the smallest positive integer that leaves remainder 2 when divided by 5 and remainder 3 when divided by 4?
Show answer
Test 22 first. 22 divided by 5 leaves 2, and 22 divided by 4 leaves 2, so it fails the second condition. Test 47: 47 divided by 5 leaves 2, and 47 divided by 4 leaves 3, so it passes both. Since 22 fails and 47 is the next option, 47 is the smallest option that works. (The conditions repeat every 20, so 107 also passes, but it is not the smallest.)
Exercise
Why can you not use "too big, so test a smaller option" on a question that asks for the value of x that makes (x − 10)² equal 4, with options 6, 8, 12, 14?
Show answer
The expression (x − 10)² decreases and then increases, with its lowest point at x = 10. A result that is too big at 14 tells you nothing about whether the answer is above or below it, so direction feedback is unreliable. You can still test options one at a time as pass or fail: 8 and 12 both give 4, so this question has two passing options and an ordering rule cannot pick between them without extra information in the question.