---
title: "Reasonable Time — AP CSP Definition & Exam Guide"
description: "Reasonable time means an algorithm runs in polynomial time or better. Learn how AP CSP tests it in Topic 3.17 and when heuristics replace slow algorithms."
canonical: "https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time"
type: "key-term"
subject: "AP Computer Science Principles"
unit: "Unit 3"
---

# Reasonable Time — AP CSP Definition & Exam Guide

## Definition

In AP Computer Science Principles, an algorithm runs in reasonable time if the number of steps it takes grows polynomially (constant, linear, square, cube) with input size; algorithms with exponential or factorial growth run in unreasonable time and become impractical as inputs get large.

## What It Is

Reasonable time is the AP CSP way of asking a simple question. As the [input](/ap-comp-sci-p/unit-1/program-function-purpose/study-guide/8hL8KatG4rAWTwZSglGB "fv-autolink") gets bigger, does this [algorithm](/ap-comp-sci-p/key-terms/algorithm "fv-autolink")'s number of steps grow at a manageable rate, or does it explode? If the steps grow like a polynomial function of the input size (think n, n², n³, or even a constant), the algorithm runs in reasonable time. If the steps grow exponentially (like 2ⁿ) or factorially (like n!), it runs in unreasonable time.

Here's the intuition. A linear algorithm on 100 items takes about 100 steps. An n² algorithm takes about 10,000 steps. Annoying, but a computer shrugs that off. A 2ⁿ algorithm on 100 items takes more steps than there are atoms in the universe. That's the line AP CSP cares about. "Reasonable" doesn't mean fast or convenient. It means the algorithm stays usable as the [problem](/ap-comp-sci-p/unit-3/algorithmic-efficiency/study-guide/jGSWIqW49BtrQ8dqCWFd "fv-autolink") scales up, instead of becoming impossible no matter how powerful your computer is. Per the CED, efficiency is an estimate of computational resources used, and the reasonable/unreasonable split is the big-picture classification of that estimate.

## Why It Matters

Reasonable time lives in **Topic 3.17 (Algorithmic Efficiency)** in [Unit 3](/ap-comp-sci-p/unit-3 "fv-autolink"), under learning objective **[AP Comp Sci P](/ap-comp-sci-p "fv-autolink") 3.17.A**, which asks you to do two things. First, explain the difference between algorithms that run in reasonable time and those that do not. Second, identify situations where a heuristic solution may be more appropriate. Those two skills are really one idea. When the exact algorithm for an optimization problem (like finding the shortest route) takes unreasonable time, you trade perfection for practicality and use a heuristic that finds a good-enough answer in reasonable time. This is also one of the most conceptually important ideas in the course, because it explains why some problems are effectively unsolvable in practice even though an algorithm for them exists. For the full efficiency framework, head up to the [3.17 Algorithmic Efficiency](#) study guide.

## Connections

### [Unreasonable time (Unit 3)](/ap-comp-sci-p/key-terms/unreasonable-time)

This is the direct flip side. Reasonable time means polynomial growth or slower, while [unreasonable time](/ap-comp-sci-p/key-terms/unreasonable-time "fv-autolink") means exponential or factorial growth. The classic example is brute-force traveling salesperson, which checks every possible route and grows like n!, so adding one more city multiplies the work.

### [Heuristic (Unit 3)](/ap-comp-sci-p/key-terms/heuristic)

Heuristics exist because of unreasonable time. When the exact algorithm would take centuries, a [heuristic](/ap-comp-sci-p/key-terms/heuristic "fv-autolink") uses a shortcut (like 'always go to the nearest unvisited city') to get a good-enough answer in reasonable time. The exam loves asking when this trade is worth making.

### [Optimization Problem (Unit 3)](/ap-comp-sci-p/key-terms/optimization-problem)

Optimization problems, where you want the best solution among many, are where reasonable time matters most. Finding the truly best answer often requires checking an explosive [number](/ap-comp-sci-p/unit-3/variables-assignments/study-guide/vtJhAf5XFOkm1uHNDMvh "fv-autolink") of possibilities, which is exactly why these problems push past reasonable time.

### [Decision Problem (Unit 3)](/ap-comp-sci-p/key-terms/decision-problem)

A decision problem has a yes/no answer, like 'is there a path from A to B?' The CED uses decision and optimization problems to set up efficiency analysis, because the same problem can have a fast yes/no version and a much slower find-the-best version.

## On the AP Exam

Reasonable time shows up on multiple-choice questions in a few predictable shapes. One stem asks you what actually distinguishes reasonable from unreasonable time (answer: polynomial vs. exponential/factorial growth of steps relative to input size, not raw seconds on a clock). Another gives you a real scenario, like a recommendation system, and asks why it uses an approximation such as collaborative filtering instead of computing exact comparisons between all users. The answer is always that the exact approach takes unreasonable time at scale, so a heuristic is more appropriate. A third style hands you a specific complexity, like O(n!) for brute-force traveling salesperson, and asks why that doesn't run in reasonable time for real-world inputs. You won't do formal Big-O math on this exam. You just need to recognize growth categories and explain the practical consequence: polynomial scales, exponential and factorial don't.

## reasonable time vs unreasonable time

These aren't fuzzy opposites, they have a precise dividing line. Reasonable time means the steps grow as a polynomial function of input size (constant, linear, n², n³). Unreasonable time means the steps grow exponentially (2ⁿ) or factorially (n!). The trap is thinking 'reasonable' means fast. An n³ algorithm can be slow and clunky but still counts as reasonable, because it scales in a way computers can actually handle. A 2ⁿ algorithm might feel fine on tiny inputs but is unreasonable, because it becomes impossible long before inputs get realistically large.

## Key Takeaways

- An algorithm runs in reasonable time if its number of steps grows polynomially with input size, meaning constant, linear, square, cube, and so on.
- Algorithms with exponential (2ⁿ) or factorial (n!) growth run in unreasonable time because the work explodes as inputs get even moderately large.
- Reasonable time is about how the work scales, not how many seconds the program takes, so a slow polynomial algorithm still counts as reasonable.
- When the exact solution to a problem takes unreasonable time, a heuristic that finds a good-enough answer in reasonable time is often the better choice.
- Brute-force traveling salesperson is the classic unreasonable-time example because checking every route grows factorially with the number of cities.
- Learning objective AP Comp Sci P 3.17.A asks you to explain the reasonable/unreasonable distinction and identify when a heuristic is more appropriate.

## FAQs

### What is reasonable time in AP CSP?

Reasonable time describes algorithms whose number of steps grows polynomially with input size, like linear (n) or quadratic (n²) algorithms. Exponential (2ⁿ) and factorial (n!) algorithms run in unreasonable time. It's tested under Topic 3.17, Algorithmic Efficiency.

### Does reasonable time mean the algorithm is fast?

No. Reasonable time is about growth rate, not speed. An n³ algorithm can take a while but still scales manageably, so it's reasonable. A 2ⁿ algorithm might finish instantly on 10 inputs but becomes physically impossible to run on large inputs, so it's unreasonable.

### How is reasonable time different from unreasonable time?

The line is polynomial vs. non-polynomial growth. Reasonable means steps grow like n, n², or n³. Unreasonable means steps grow like 2ⁿ or n!, where each added input element multiplies the total work instead of just adding to it.

### Why does brute-force traveling salesperson take unreasonable time?

Because it checks every possible route, and the number of routes grows factorially. With 10 cities there are over 3.6 million routes, and with 20 cities the count exceeds 2 quintillion. That's why real applications use heuristics like nearest-neighbor instead.

### Do I need Big-O notation for reasonable time on the AP CSP exam?

No formal Big-O analysis is required. You need to recognize whether step counts grow polynomially or exponentially/factorially, classify the algorithm as reasonable or unreasonable, and explain when a heuristic is the smarter choice.

## Related Study Guides

- [3.17 Algorithmic Efficiency](/ap-comp-sci-p/unit-3/algorithmic-efficiency/study-guide/jGSWIqW49BtrQ8dqCWFd)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time#resource","name":"Reasonable Time — AP CSP Definition & Exam Guide","url":"https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T05:53:25.379Z","isPartOf":{"@type":"Collection","name":"AP Computer Science Principles Key Terms","url":"https://fiveable.me/ap-comp-sci-p/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time#term","name":"reasonable time","description":"In AP Computer Science Principles, an algorithm runs in reasonable time if the number of steps it takes grows polynomially (constant, linear, square, cube) with input size; algorithms with exponential or factorial growth run in unreasonable time and become impractical as inputs get large.","url":"https://fiveable.me/ap-comp-sci-p/key-terms/reasonable-time","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Computer Science Principles Key Terms","url":"https://fiveable.me/ap-comp-sci-p/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is reasonable time in AP CSP?","acceptedAnswer":{"@type":"Answer","text":"Reasonable time describes algorithms whose number of steps grows polynomially with input size, like linear (n) or quadratic (n²) algorithms. Exponential (2ⁿ) and factorial (n!) algorithms run in unreasonable time. It's tested under Topic 3.17, Algorithmic Efficiency."}},{"@type":"Question","name":"Does reasonable time mean the algorithm is fast?","acceptedAnswer":{"@type":"Answer","text":"No. Reasonable time is about growth rate, not speed. An n³ algorithm can take a while but still scales manageably, so it's reasonable. A 2ⁿ algorithm might finish instantly on 10 inputs but becomes physically impossible to run on large inputs, so it's unreasonable."}},{"@type":"Question","name":"How is reasonable time different from unreasonable time?","acceptedAnswer":{"@type":"Answer","text":"The line is polynomial vs. non-polynomial growth. Reasonable means steps grow like n, n², or n³. Unreasonable means steps grow like 2ⁿ or n!, where each added input element multiplies the total work instead of just adding to it."}},{"@type":"Question","name":"Why does brute-force traveling salesperson take unreasonable time?","acceptedAnswer":{"@type":"Answer","text":"Because it checks every possible route, and the number of routes grows factorially. With 10 cities there are over 3.6 million routes, and with 20 cities the count exceeds 2 quintillion. That's why real applications use heuristics like nearest-neighbor instead."}},{"@type":"Question","name":"Do I need Big-O notation for reasonable time on the AP CSP exam?","acceptedAnswer":{"@type":"Answer","text":"No formal Big-O analysis is required. You need to recognize whether step counts grow polynomially or exponentially/factorially, classify the algorithm as reasonable or unreasonable, and explain when a heuristic is the smarter choice."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Computer Science Principles","item":"https://fiveable.me/ap-comp-sci-p"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-comp-sci-p/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 3","item":"https://fiveable.me/ap-comp-sci-p/unit-3"},{"@type":"ListItem","position":4,"name":"reasonable time"}]}]}
```
