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

3.4 (a) Suppose that a particular algorithm has time complexity T(n) x 2 and tha

ID: 3861404 • Letter: 3

Question

3.4 (a) Suppose that a particular algorithm has time complexity T(n) x 2 and that executing ation griton a particular machine takes t seconds for n ut Mo ose natwe are presented with a machine that is 64 times as fast. H many inputs could we process on the new machine in t seconds? (b) Suppose that another algorithm has time complexity T() n2, and that executing an imp Men iton cular machine takes at W presented with a ma- t seconds for n inputs. chine that is 64 times as fast. How many inputs could we process on the new machine in t seconds? (c) A third algorithm has time complexity T(n) 8n. Executing an im plementation of it on a particular machine takes t seconds for n inputs. Given a new machine that is 64 times as fast, how many inputs could we process in t seconds?

Explanation / Answer

t is the time taken by the process and if the machine speed increases by x times. then the same process completes in t/x time.

In this example n inputs can be processed in t seconds.

As the machine speed increases to 64 times. then n inputs can be processed in t/64 seconds.

n = t/64

64 n =t

Hence new machine can process 64n inputs in t seconds.

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