CS FundamentalsHardGATE CS · product placement

Henry and Kafura's information-flow complexity of a procedure is length x (fan-in x fan-out)^2. A 20-line procedure is called by 3 procedures (fan-in 3) and calls/updates 4 others (fan-out 4). What is its complexity?

  1. A. 240
  2. B. 2,880
  3. C. 980
  4. D. 1,440

Correct answer: B. 2,880

(3 x 4)^2 = 144 and 20 x 144 = 2,880. 240 forgets to square; 980 squares the sum (3 + 4) instead of the product.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic