retagged by
4,441 views
4 4 votes

The cyclomatic complexity of the flow graph of a program provides

  1. an upper bound for the number of tests that must be conducted to ensure that all statements have been executed at most once
  2. a lower bound for the number of tests that must be conducted to ensure that all statements have been executed at most once
  3. an upper bound for the number of tests that must be conducted to ensure that all statements have been executed at least once

  4. a lower bound for the number of tests that must be conducted to ensure that all statements have been executed at least once

2 Answers

Best answer
8 8 votes
its C as each edge must be visited at least once that's why we use cyclomatic complexity to determine the number of independent paths.
selected by
1 1 vote

Ans C)


The value for V(G) provides us with an upper bound for the number of independent paths that form the basis set ( a set of independent paths for the flow graph such that if tests can be designed to force execution of these paths then every statement in the program will have been guaranteed to be executed at least one time and
every condition will have been executed on its true and false sides)
and, by implication, an upper bound on the number of tests that must be designed and executed to guarantee coverage of all program statements.

Thus, Cyclomatic complexity, V(G), for a flow graph, G, is defined as
V(G) = E - N + 2
Also, it can be defined as
V(G) = P + 1,

where P is the number of predicate nodes contained in the flow graph G. ( A predicate node is a node containing a condition.)

Answer:
Position:
Show:

Related questions

1 1 vote
1 answers 1 answer
3.1k
3.1k views
Ishrat Jahan asked Oct 31, 2014
3,077 views
With respect to software testing, consider a flow graph G with one connected component. Let E be the number of edges, N be the number of nodes, and P be the number of pre...
15 15 votes
4 answers 4 answers
18.9k
18.9k views
go_editor asked Sep 29, 2014
18,880 views
The cyclomatic complexity of each of the modules $\text{A}$ and $\text{B}$ shown below is $10.$ What is the cyclomatic complexity of the sequential integration shown on t...
5 5 votes
1 1 answer
7.0k
7.0k views
Kathleen asked Sep 22, 2014
7,032 views
Consider the following statements about the cyclomatic complexity of the control flow graph of a program module. Which of these are TRUE? The cyclomatic complexity of a m...
2 2 votes
3 answers 3 answers
2.6k
2.6k views
Ishrat Jahan asked Nov 1, 2014
2,589 views
A software project has four phases P1, P2, P3 and P4. Of these phases, P1 Is the first one and needs to be completed before any other phase can commence. Phases P2 and P3...