Question: How Long Does It Take? Suppose we know how the time it takes to solve a problem ( like finding a needle in a haystack
How Long Does It Take?
Suppose we know how the time it takes to solve a problem like finding a needle in a haystack depends on the size of its input for example, the number of pieces of hay in the haystack
For example, suppose we knew that the time required using technique A for haystack searching was exactly the number of pieces of hay in milliseconds one one thousandth of a second
if we had a haystack with one million pieces of hay, how long would it take to find the needle? time times x seconds seconds about minutes
What if I had a technique for looking for needles in a haystack that only took log n milliseconds for n pieces of hay? In my million piece haystack Id have found that needle in milliseconds!
Now imagine you have other techniques for searching hay stacks. For each of them we know how the number of milliseconds it takes to find the needle depends on the number of pieces of hay in the stack. These are given by the expressions below.
Q How much time does each technique require if the hay stack has million pieces of hay?
An
Bn x logn
Cn
Dn
E
Fn
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
