Question: In [ 4 ] : # Run this cell to see how you can use the Python interpreter to calculate an expression like the one

In [4]: # Run this cell to see how you can use the Python interpreter to calculate an expression like the one above:
n=.01**10000****2100****2
print('Answer is: ',n,' seconds')
Answer is: 100.0 seconds
P4, Q1: In the cell (or cells - you can do calculations directly in cells if you want) below determine how long it would take an O(n**3) algorithm to
process 1,000 inputs if we know that processing 10 inputs takes .001 seconds. If you calculate in a cell be sure it clearly shows the answer.
Alternately, show the calculation in one cell and the answer in a different Markdown cell. Use the above code as a template if you want to use
Python to do the calculation.
In []:
P4, Q2: In the cell (or cells) below determine how long it would take an O(2**n) algorithm (2 to the nth power - exponential) to process 40 inputs if
we know that processing 10 inputs takes .0001 seconds. If the answer is large, how many minutes, hours, days, etc. might this require?
In []:
P4, Q3: In the cell (or cells) below determine how long it would take an O(n Ig n) algorithm to process 100,000 inputs if we know that processing
10 inputs takes .0001 seconds. Since we're dealing with estimates you may assume "Ig 10" is 3.15 and "lg 100,000 is 16.6.
In []:
 In [4]: # Run this cell to see how you can

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!