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
$\text{Speed of computer} = 10^6 \text{per second} $
$\text{For n} =10000=10^4$
$$Time = \frac{\text{No of tasks}}{\text{Speed of computer}}$$
$$Time = \frac{2n^2}{10^6}$$
$$= \frac{2\times (10^4)^2}{10^6}$$
$$= \frac{2\times 10^8}{10^6}$$
$$=2 \times 10^2$$
$$= 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 :