A Place for Latest Exam wise Questions, Videos, Previous Year Papers, Study Stuff for MCA Examinations - NIMCET
Previous Year Question (PYQs)
4
Consider a computer system with speed of 106 instructions per second. A program P, having 2n2 steps is run on this system, where n is the input size. If n = 10000, what is the execution time for P?
Solution
Speed of computer=106per second
For n=10000=104
Time=No of tasksSpeed of computer
Time=2n2106
=2×(104)2106
=2×108106
=2×102
=200sec
Online Test Series, Information About Examination, Syllabus, Notification and More.
Speed of computer = 106 per second
For n = 10000 (104)
{Time = No of tasks / Speed of computer}
2n² /10^6 = 2x (104)2 / 10^6
2x10^8 / 10^6 = 2 × 10^2
= 200 sec. ans.
Commented May 21 , 2022
4 Upvote 0 Downvote Reply
Commented May 02 , 2023
Your reply to this comment :