Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2) Suppose an algorithm that processes a data set of size 8 has a runtime of 72,

ID: 2968018 • Letter: 2

Question

2) Suppose an algorithm that processes a data set of size 8 has a runtime of 72, and the same algorithm on a data set of size 20 has a runtime of 420.

Hint: What do we have to do to 8 to make it into 72? What do we have to do to 20 to make it into 420? In other words, what is the function that fits these two points:

So we have: (8,72) and (20,420)

First, give the function

Then, give the runtime in Big O notation.

Show your work.

Here is an example of how to do a similar problem:

Suppose an algorithm processes a data set of size 3 has a runtime of 29. And suppose the same algorithm processes a data set of size 10 has a runtime 1002. What is the FUNCTION that describes this runtime and what is the Big-O?

Explanation / Answer

2) Notice that if we take the value of 8 (say n) and we raise it to the second power, we get the value 64. And when we add 8 (the same number i.e. n), we get 72.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote