in Others edited by
301 views
1 vote
1 vote

Consider a program with following data:

Unique operator $=10$, unique operands $=15$

Total operator $=30$, Total operands $=40$

What is the estimated length of program?

  1. $132$

  2. $92$

  3. $32$

  4. $82$

in Others edited by
by
301 views

1 Answer

0 votes
0 votes
  Total Unique
Operators N1 = 30 n1 = 10
Operands N2 = 40 n2 = 15

Estimated program length $= n_1\log_{2}n_1 + n_2\log_{2}n_2$

                                                $= 10\log_{2}10 + 15\log_{2}15 = 33.219 + 58.603 = 91.822 \approx \textbf{92}.$

Program Length = $N_1 + N_2 = 30 + 40 = 70.$

Option B is correct

Note : Difference between the two is – Estimated program length is used before the development of the software or program and Program length is calculated after development of software or program.

Reference : Page 15