Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

?
Lv 5
? asked in Education & ReferenceHomework Help · 10 years ago

Intro to Algorithms help, please!?

My book explains the theory, but doesn't tell you how to apply it to an actual problem. There aren't any steps. I just need a step by step guide on how to solve a problem like this:

Suppose you have algorithms with the six running times listed below. (Assume these are the exact number of operations performed as a function of the input size n.) Suppose you have a computer that can perform 10^10 operations per second, and you need to compute a result in at most an hour of computation. For each of the algorithms, what is the largest input size n for which you would be able to get the result within an hour?

(a) n^2

(b) n^3

(c) 100n^2

(d) n log n

(e) 2^n

(f) 2^2^n

1 Answer

Relevance
  • Anonymous
    10 years ago
    Favorite Answer

    a-f are the relative number of operations per second need for the operation.

    in one hour your computer can do 1 hour * 10^10 op/sec

    =60*60 = seconds in an hour

    so you can do 360*10^10 operation/sec

    so solve for

    n^2 =< 360*10*10

    n^3 =< 360*10^10

    2^2^n =< 360*10*10

Still have questions? Get your answers by asking now.