Question: Assume that algorithm A1 takes time roughly T1(n) = 6n2 + 2n +12 and algorithm A2 takes time roughly T2(n) = 4T2(n/2) + 100n, and
Assume that algorithm A1 takes time roughly T1(n) = 6n2 + 2n +12 and algorithm A2 takes time roughly T2(n) = 4T2(n/2) + 100n, and suppose that computer A's CPU runs 108 instructions/sec. When the input size equals to 102, 106, and 1012 respectively, how long will algorithm A1 take to finish for each input size? How long will algorithm A2 take to finish for each input size? (Hint: BIG O)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
