Suppose you have a computer that requires 1 minute to solve problem instances of size \(n=1,000 .\) Suppose you buy a new computer that runs 1,000 times faster than the old one. What instance sizes can be run in 1 minute, assuming the following time complexities \(T(n)\) for our algorithm? a. \(T(n)=n\) b. \(T(n)=n^{3}\) c. \(T(n)=10^{n}\)

Short Answer

Expert verified
The new computer can run these instance sizes in 1 minute: for \(T(n) = n\), \(n = 1,000,000 \); for \(T(n) = n^3\), \(n = 10,000\); and finally for \(T(n) = 10^n\), \(n = 3000\).

Step by step solution

01

Solving for \(T(n)=n\)

Given that the old computer takes 1 minute to solve a problem of size \(n=1000\) and the new computer is 1000 times faster, it means in 1 minute, the new computer can solve a problem of size \(n = 1000 \times 1000 = 1,000,000\).
02

Solving for \(T(n)=n^3\)

Here, the rate at which the computer solves the problem is cubed. Since the new computer is 1000 times faster than the old one, we can say that \(1000 = n^3\). Solving for \(n\), we then take the cube root of both sides to get \(n = 10\). We need to multiply this by the original problem size on the old computer to get \(n = 10 \times 1000 = 10,000\).
03

Solving for \(T(n) = 10^n\)

For this exponential function, we can say the new computer can solve a problem of size \(n = \log_{10}{1000} = 3\) in a minute. Again, multiplying this by the original problem size on the old computer, gives \(n = 3 \times 1000 = 3000\).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free