in CO and Architecture
711 views
0 votes
0 votes

Consider the following pseudo code. What is the total number of multiplications to be performed?

   D = 2    for i = 1 to n do       for j = i to n do          for k = j + 1 to n do             D = D * 3 

 

(A) Half of the product of the 3 consecutive integers.

(B) One-third of the product of the 3 consecutive integers.

(C) One-sixth of the product of the 3 consecutive integers.

(D) None of the above.

in CO and Architecture
711 views

2 Answers

0 votes
0 votes
throughput=(speed up factor/no. of stages)*100
therefore i guess according to this it should be 9 stages.
0 votes
0 votes

efficiency =S/K

70/100=6/K

k=600/70=8.56 = 9 stages (approx)