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?
$132$
$92$
$32$
$82$
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
64.3k questions
77.9k answers
244k comments
80.0k users