CSE 5314/7314 (Spring 2005): Homework #4 Answer Sketches
Answer Sketches
- Problem 11.9 or 11.10 (choose one).
Answers depend on the program/spec you selected to work.
But the attention should be on the output variables,
and the "backtracking" derived accordingly.
One common issue is that the DDGs should have constants represented
in addition to variables (input, output, and intermediate ones).
- Sample final exam question III.
Answer Key:
Need to combine the binary decision "if-then-else" with the "while"
loop after it:
- loop testing critical values (bypass, once, twice, typical) should apply
- combination 2X4=8 paths
- sensitization key: C2 takes different values through iterations.
- when correlated: FF (false-bypass),
and TT.... (infinite loop or termination after some iterations.)
- Sample final exam question IV.
Answer Key:
Identify output (voting results), and then trace back:
-
Alternative one (most people followed along this line):
three way selection: "#y>50", "#y=50", "#y<50";
with the middle one involving a binary selection embedded in.
-
Alternative two: work out the compound conditions, and do a final
selection "pass" vs. "fail".
- Problem 12.4 or 18.7 (choose one).
-
Answer to 12.4 may include issues with time/cost/schedule
and the maturity of the techniques (and other reasonable ones too).
-
Answer to 18.7 depend on your environment, but a good description
and some (simple) analysis are expected.
Prepared by Jeff Tian
(tian@engr.smu.edu).
Initially posted on 5/4/05.