KEMBAR78
Complexity | PDF
0% found this document useful (0 votes)
241 views2 pages

Complexity

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views2 pages

Complexity

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Suppose the fan out of a module is: 4, the cumulative number of variables passed to

and from the module is: 47, and the complexity of the module is: 40. Use Card and
Glass's Systems Complexity in order to find out the structural complexity, data
complexity and system complexity of the module.
Given:
• Fan-out fout(k) = 4
• Cumulative number of variables tot_var(k)= 47
• Complexity of the module M = 40
Step-by-Step Calculation:
Step 1: Calculate Structural Complexity S(k)
S(k) = fout(k)2
S(k) = 16
Step 2: Calculate Data Complexity D(k)
D(k) = tot_var(k)/ fout(k)
D(k) = 9.4
Step 3: Calculate System Complexity (Sy)
Sy=S(k)+D(k)
=16+9.4
=25.4
Thus
1. Structural Complexity (S): 16
2. Data Complexity (D): 9.4
3. System Complexity (Sy): 25.4
There is a confusion of henry and kufra’s complexity formula: we found two types
of formula:
1. length(X)×(fan_in(X)+(fan_out(X))2 [we are using this]
2. length(X) x (fan-in(X) x fan-out(X)
The fan in and fan out of module X is 3 and 4 respectively. The complexity of the
system is 2000. The number of lines in module X is 200, i.e LOC of module X is
LOC(X) =200. Calculate the structural complexity of module X using card and
glass’s system complexity. Using combined Henry Kafura’s approach and Card
glass’s approach calculate the data complexity of module X.
Solution:
Given
• fan_in(X)=3
• fan_out(X)=4
• length(X)=200 (lines of code)
Structural Complexity (using Glass and Card's approach):
S(X)=(fan_out(X))^2=(4)^2=16
Data Complexity (using Glass and Card's approach):
tot_var(X)=fan_out(X)+fan_in(X)
=4+3=7
D(X)=tot_var(X)/(fan_out(X)+1)
=7/(4+1) = 1.4
Complexity (using Henry and Kafura's approach and Glass and Card's
approach):
Using Henry and Kafura's approach:
M=length(X)×(fan_in(X)+(fan_out(X))2
=200×[3+4]2=200×49=9800
Using Glass and Card's approach: Sy(X)=S(X)+D(X)=16+1.4=17.4
So,
1. Structural Complexity: S(X)=16
2. Data Complexity: D(X)=1.4
3. Information Flow Complexity (M): M=9800
4. System Complexity (Sy(X)): Sy(X)=17.4

You might also like