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

We doubled the size of the input of a program and its running time quadrupled. W

ID: 3749496 • Letter: W

Question

We doubled the size of the input of a program and its running time quadrupled. What is the likely big-O running time of the program? 4. We doubled the size of the input of a program and its running time doubled. What is the likely big-O running time of the program? 5. 6. We doubled the size of the input of a program and its running time doubled. What is the likely big-O running time of the program? 7. The running time of a program, in pus, is given by T(n)- 10 n. If the program takes 1 s to run, what is the size of the input? What is the size of the input for a running time of 10.000 s?

Explanation / Answer

4. Answer: O(n2)
Explanation:
When the size of the input is doubled (n = 2n) running time is quadrapled i.e (if it is 100 then it would be 400)
let n = 10; 2n = 20;
if the running time is O(n) in the first case is 100; then the running cse in the second case is 400 it is possible only if the running time is O(n2)

5. Answer: O(n);
Explanation:
When the size of the input is doubled (n = 2n) running time is quadrapled i.e (if it is 100 then it would be 200)
let n = 10; 2n = 20;
if the running time is O(n) in the first case is 100; then the running cse in the second case is 200 it is possible only if the running time is O(n)

6. Answer: O(n);
Explanation:
When the size of the input is doubled (n = 2n) running time is quadrapled i.e (if it is 100 then it would be 200)
let n = 10; 2n = 20;
if the running time is O(n) in the first case is 100; then the running cse in the second case is 200 it is possible only if the running time is O(n)

7. Answer: i. 1000 size of inputs; ii. 10,00,000 size of inputs

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