What is the effect in the time required to solve a problem

Chapter 3, Problem 20E

(choose chapter or problem)

Get Unlimited Answers
QUESTION:

What is the effect in the time required to solve a problem when you double the size of the input from n to 2n, assuming that the number of milliseconds the algorithm uses to solve the problem with input size n is each of these function? [Express your answer in the simplest form possible, either as a ratio or a difference. Your answer may be a function of n or a constant.]a) log log n________________b) log n________________c) 100 n________________d) n log n________________e) n2________________f) n3________________g) 2n

Questions & Answers

QUESTION:

What is the effect in the time required to solve a problem when you double the size of the input from n to 2n, assuming that the number of milliseconds the algorithm uses to solve the problem with input size n is each of these function? [Express your answer in the simplest form possible, either as a ratio or a difference. Your answer may be a function of n or a constant.]a) log log n________________b) log n________________c) 100 n________________d) n log n________________e) n2________________f) n3________________g) 2n

ANSWER:

Solution:Step1Given thatAssuming that the number of milliseconds the algorithm uses to solve the problem with input size n is each of these function.we have to find what is the effect in the time required to solve a problem when you double the size of the input from n to 2nStep2a) log log nn value is expanded by two which is 2n, time change to loglog2n that is not multiplied. In this way the additional time is log 2n – log n = log log2 + . Accordingly, log 1+ .Step3b) log nn value is expanded by two which is 2n, time change to loglog2n that i

Add to cart


Study Tools You Might Need

Not The Solution You Need? Search for Your Answer Here:

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back