Computer Science 2214A/B Study Guide - Final Guide: University Of Western Ontario, Professor Calculus, Triangle Inequality

129 views4 pages

Document Summary

Problem 1 professor cuthbert calculus has designed a machine which con- sists of three components a, b, c which are either running or stopped. Can the machine of professor cuthbert calculus be built, that is, is the conjunction of the above three statements satis able. Solution 1 let us denote by a, b, c boolean variables stating that the respective components a, b, c are running. Then the 3 constraints can be rephrased as follows in propositional logic: a ( b c), b (a c), c b. Because of the third constraint, namely c b, it is natural to test whether the conjunction of the three constraints is satis able with b = c = true. Then, since b c = false, to satisfy the rst constraint, we must have. With those values of the boolean variables a, b, c, the second constraint is satis ed.