Exercise 1: Estimating O(2^n) Running Time at n=40 — Possible Solution ==================================================================== GIVEN ------------------------------ 1 billion (1e9) operations per second, n = 40 STEP 1: TOTAL OPERATIONS ------------------------------ 2^40 = 1,099,511,627,776 (~1.10 x 10^12 operations) STEP 2: CONVERTING TO TIME ------------------------------ seconds = 1.10 x 10^12 / 1 x 10^9 = 1,099.5 seconds STEP 3: CONVERTING TO A HUMAN-READABLE UNIT ------------------------------ 1,099.5 seconds / 60 = 18.33 minutes RESULT ------------------------------ An O(2^n) algorithm at n=40 would take approximately 18.3 minutes at 1 billion operations per second. WHY THIS WORKS AS AN ANSWER ------------------------------ The total operation count is computed directly from the definition of 2^n, converted to seconds using this chapter's own 1-billion-ops-per- second assumption, and then converted again into a genuinely readable unit (minutes) rather than left as an unwieldy raw number of seconds.