CS FundamentalsVery hardProduct company interview · GATE level
A program has 12 distinct operators, 20 distinct operands, 90 total operator occurrences and 70 total operand occurrences. Using Halstead's measures (volume V = N x log2 n, difficulty D = (n1/2) x (N2/n2), effort E = D x V), what are V, D and E?
- A. V = 800, D = 21, E = 16,800
- B. V = 800, D = 27, E = 21,600
- C. V = 640, D = 21, E = 13,440
- D. V = 160, D = 21, E = 3,360
Correct answer: A. V = 800, D = 21, E = 16,800
Vocabulary n = 12 + 20 = 32 and length N = 90 + 70 = 160, so V = 160 x log2 32 = 160 x 5 = 800 bits. D = (12/2) x (70/20) = 6 x 3.5 = 21. E = 21 x 800 = 16,800. Using N1 instead of N2 in the difficulty gives (12/2) x (90/20) = 27; 640 would need a vocabulary of 16 (log2 16 = 4); 160 is just the length.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Activities (duration in days; predecessors): A (4; -), B (6; -), C (3; A), D (5; A), E (4; B, C), F (7; B), G (3; D, E), H (2; F, G), I…
- Activities (duration in days; predecessors): A (3; -), B (5; A), C (4; A), D (2; C), E (6; B), F (5; C), G (4; B, D), H (3; E, F, G). How…
- Activities (normal days, crash limit days, crash cost per day saved; predecessors): A (5, 3, ₹400; -), B (7, 5, ₹300; -), C (4, 3, ₹250…
- A project's critical path has four activities with three-point estimates (optimistic, most likely, pessimistic) in weeks: (2, 4, 6), (3…
- A project has a budget at completion (BAC) of ₹400 lakh. At the end of month 5 the planned value is ₹180 lakh, the earned value ₹150 lakh…
- Under Musa's basic execution-time model, failure intensity falls linearly with failures experienced: λ(μ) = λ0 (1 - μ/ν0), and over…