Hard & Impossible Problems
Some problems take a computer a second. Some would take longer than the age of the universe. And a few can't be solved at all.
Swipe or tap Next for the next section
Reasonable and Unreasonable Time
Computer scientists judge an algorithm by how its number of steps grows as the input gets bigger. Double the size of a list, and:
- finding the largest item takes about twice as many steps (it grows like n),
- a simple sort might take about four times as many (it grows like n²).
Growth like n, n² or n³ is called reasonable time. But some problems grow far faster — like 2ⁿ, or n! ("n factorial", which is n × (n − 1) × … × 1). That's unreasonable time: fine for tiny inputs, hopeless for big ones, no matter how fast the computer.
The Delivery Driver's Problem
A driver has to visit several stops and come back. What's the shortest route? The only sure way to know is to try every possible order — and the number of orders explodes as stops are added.
Good Enough: Heuristics
When the exact answer would take too long, programs use a heuristic: a shortcut that finds a good answer quickly, even if it's not always the best. "Always drive to the nearest stop next" is one. Map apps, delivery companies and airline schedules all rely on heuristics every day.
A heuristic trades a guarantee of the best answer for an answer you can actually get in time.
Problems No Program Can Solve
Some problems aren't just slow — they're undecidable. That means it has been proven that no algorithm can give the right yes-or-no answer for every possible input.
The most famous is the halting problem: "Will this program eventually stop, or run forever?" For a specific program you can often tell. But in 1936, Alan Turing proved that no single program can answer that question correctly for every program. It isn't that nobody has found the trick yet — there is no trick to find.
So there are three kinds of problem: ones computers solve quickly, ones they can only solve quickly with a good-enough heuristic, and ones no computer will ever fully solve.
5 quick questions. Pick one answer for each — you'll see why straight away.
An algorithm's steps grow like n² as the input size n grows. Is that reasonable time?
Steps that grow like n, n² or n³ count as reasonable time. Growth like 2ⁿ or n! does not.
A delivery app can't check every possible route, so it always goes to the nearest stop next. That approach is called…
A heuristic gives a good-enough answer quickly, without promising the very best one.
Adding one more stop to a delivery route multiplies the number of possible routes. What kind of growth is that?
Each extra stop multiplies the routes by roughly the number of stops, so the total explodes. That's unreasonable time for exact answers.
What does it mean for a problem to be undecidable?
It's not about speed. It's been proven that no algorithm can ever solve it correctly in every case — no matter how fast the computer.
Which is a famous example of an undecidable problem?
This is the halting problem. Sorting, adding and finding the largest are all solvable in reasonable time.