In AP Computer Science Principles, an algorithm runs in unreasonable time when the number of steps it needs grows exponentially (like 2^n) or factorially (like n!) as the input size grows, meaning even moderately sized inputs would take an impractical amount of time to solve exactly.
Unreasonable time is the AP CSP label for algorithms whose running time explodes as the input gets bigger. Specifically, it covers exponential efficiencies (like 2^n) and factorial efficiencies (like n!). With these growth rates, adding just one more item to the input can double the work or worse. An algorithm that takes 2^n steps needs about a thousand steps when n = 10, but over a million when n = 20, and over a trillion when n = 40. No faster computer saves you, because the math outruns the hardware.
The contrast is reasonable time, which covers algorithms whose steps grow at a polynomial rate or slower (constant, linear, n², and so on). The line the AP exam cares about is polynomial versus exponential/factorial. n² might feel slow, but it's still reasonable. 2^n is not. When a problem can only be solved optimally in unreasonable time, the practical move is to use a heuristic, a shortcut approach that finds a good-enough answer quickly instead of the perfect answer slowly.
Unreasonable time lives in Topic 3.17 (Algorithmic Efficiency) in Unit 3: Algorithms and Programming. It directly supports learning objective AP Comp Sci P 3.17.A, which asks you to do two things. First, explain the difference between algorithms that run in reasonable time and those that don't. Second, identify situations where a heuristic solution is more appropriate. That second part only makes sense once you get unreasonable time, because heuristics exist precisely for problems where finding the exact best answer would take exponential or factorial work. This idea also connects to the CED's distinction between decision problems and optimization problems (EK AAP-4.A.2), since hard optimization problems like finding the shortest route through many cities are the classic examples of problems whose optimal solutions require unreasonable time.
Keep studying AP® Computer Science Principles Unit 3
Reasonable Time (Unit 3)
This is the other half of the same idea. Reasonable time means polynomial growth or slower, and unreasonable time means exponential or factorial growth. The exam tests whether you can sort an efficiency like n², 2^n, or n! into the right bucket.
Heuristic (Unit 3)
Heuristics are the escape hatch for unreasonable time. When solving a problem perfectly would take 2^n steps, a heuristic trades the guaranteed best answer for a good answer you can actually compute. The CED explicitly asks you to spot when that trade is the right call.
Optimization Problem (Unit 3)
Optimization problems ask for the best solution among many, like the shortest path visiting every city. These are the problems most likely to demand unreasonable time when solved optimally, because checking every possible answer often means factorial-level work.
Approximate Solution (Unit 3)
An approximate solution is what a heuristic produces. It may not be optimal, but it arrives in reasonable time. Unreasonable time is the reason approximate solutions are acceptable at all.
This term shows up in multiple-choice questions, and they tend to follow two patterns. Pattern one gives you an efficiency and asks you to classify it. If a question says an algorithm needs 2^n operations, the answer is unreasonable time. If it says n², that's reasonable time, even though n² is the slower-feeling polynomial. Pattern two gives you a problem scenario and asks which one would require unreasonable time to solve optimally, or when a heuristic is appropriate. Optimization problems with huge solution spaces are the giveaway. No released FRQ uses this term verbatim, and the Create performance task won't ask you about it, so MCQ classification is where this concept earns you points. Memorize the dividing line. Polynomial or better is reasonable; exponential or factorial is unreasonable.
These are opposites, but the dividing line trips people up. Reasonable time includes ALL polynomial efficiencies, even slow-looking ones like n² or n¹⁰. Unreasonable time starts at exponential (2^n) and factorial (n!). The trap answer on MCQs is calling n² unreasonable because it 'grows fast.' It does grow fast, but polynomial growth is still manageable, and the exam draws the line at exponential. A quick check is to look at where n sits. If n is the exponent (2^n) or inside a factorial (n!), it's unreasonable. If n is the base (n², n³), it's reasonable.
Unreasonable time describes algorithms whose number of steps grows exponentially (2^n) or factorially (n!) with input size, making them impractical for all but tiny inputs.
The dividing line is polynomial versus exponential, so n² and n³ count as reasonable time while 2^n and n! count as unreasonable time.
When a problem can only be solved optimally in unreasonable time, a heuristic that finds an approximate solution quickly is often the more appropriate choice.
Optimization problems, which ask for the best answer among many possibilities, are the classic source of unreasonable-time algorithms because checking every possibility blows up combinatorially.
Faster hardware doesn't fix unreasonable time, because exponential growth outpaces any realistic increase in computing power.
On the exam, expect MCQs that hand you an efficiency like 2^n and ask you to label it, or describe a scenario and ask whether a heuristic is warranted.
Unreasonable time is the AP CSP classification for algorithms that need exponential (2^n) or factorial (n!) numbers of steps relative to input size. These algorithms become impractical to run even for moderately sized inputs, which is why heuristics are used instead.
No. n² is polynomial, and all polynomial efficiencies count as reasonable time in AP CSP. Unreasonable time only starts at exponential (2^n) and factorial (n!) growth. This is a classic MCQ trap.
Reasonable time covers algorithms with polynomial growth or slower, like n, n log n, or n². Unreasonable time covers exponential and factorial growth, like 2^n or n!. The quick test is whether n appears as an exponent or in a factorial, which means unreasonable.
Yes, for very small inputs, an exponential algorithm finishes fine. The problem is scale. At n = 40, a 2^n algorithm needs over a trillion operations. That's why the CED pairs unreasonable time with heuristics, which give approximate solutions in reasonable time instead.
Optimization problems ask for the best solution among many, and the number of candidate solutions often grows factorially. Finding the shortest route through n cities by brute force means checking on the order of n! routes, which is unreasonable time even for a few dozen cities.
Connect this key term to the AP exam workflow: review the course, practice questions, and check related study tools.
Review units, study guides, and course resources.
Check this vocabulary in multiple-choice context.
Apply key concepts in written AP responses.
Estimate the exam score you are working toward.
Review the highest-yield facts before practice.
Put the full course together before test day.