Exercise 2: Why "Modern Computers Are Fast Enough" Breaks Down — Possible Solution ==================================================================================== THE CLAIM BEING CHALLENGED ------------------------------ The colleague argues that raw hardware speed makes complexity analysis unnecessary. This chapter's own growth-rate table shows exactly why this reasoning fails once input size grows, regardless of how fast the underlying hardware is. WHY FASTER HARDWARE DOESN'T RESCUE O(n^2) ------------------------------ Per this chapter's own table, an O(n^2) algorithm's work grows as the SQUARE of the input size: going from n=5 to n=20 (a 4x increase in input) inflated the operation count from 25 to 400 - a 16x increase in work. A faster computer multiplies how many operations it can do per second by some constant factor, but it cannot change the SHAPE of that growth curve - doubling the input will always roughly quadruple the work for an O(n^2) algorithm, no matter how fast each individual operation runs. Eventually, input size grows faster than any constant hardware speedup can compensate for. WHY THIS IS EVEN MORE SEVERE FOR O(2^n) ------------------------------ This chapter's own table showed O(2^n) growing from 32 operations at n=5 to 1,048,576 operations at n=20 - a jump of over 32,000x from only a 4x increase in input size. No realistic amount of hardware speedup can keep pace with growth this explosive; even a supercomputer millions of times faster than a laptop would only postpone the problem by a small, fixed number of additional input elements before running into the same wall. THE GENERAL PRINCIPLE ------------------------------ Faster hardware effectively multiplies the largest input size you can handle in a reasonable amount of time by some constant amount for a POLYNOMIAL algorithm - but for an EXPONENTIAL algorithm, it barely moves that limit at all, since each additional unit of input size doubles (or worse) the required work. This is exactly why choosing a better algorithm is fundamentally different from - and often far more impactful than - simply buying faster hardware. WHY THIS WORKS AS AN ANSWER ------------------------------ The explanation is grounded directly in the specific numbers from this chapter's own growth-rate table, distinguishing the genuinely different consequences for O(n^2) (a bad but survivable growth rate) versus O(2^n) (a growth rate no realistic hardware speedup can outrun), rather than dismissing the colleague's claim in only general terms.