40 likes | 102 Views
This text demonstrates the significance of operator precedence in logical expressions. It analyzes common and interesting mistakes with the exclusive OR operator. By following the correct order of operations and applying logical rules, the implications of monitoring, testing, and operating are illustrated.
E N D
Assignment 1 - A Let M = Monitoring T = Test state O = Operating Substituting the exclusive OR expression into the 2nd expression (as shown in the text book), we start with : (M Λ ~T V T Λ ~M) Λ ~T => O [ (M Λ ~T) V (T Λ ~M) ] Λ ~T => O ( order of operation with AND first) [ ( M Λ ~T) Λ ~T) ] V [ (T Λ ~M) Λ~T] => O (distrib. Λ V rule) (M Λ ~T Λ ~T ) V (T Λ ~M Λ ~T) => O (assoc. rule) ( M Λ ~T ) V ( ~M ΛT Λ~T) => O (AND same; assoc. rule) ( M Λ ~T) V (~M Λ False) => O (Contradiction rule) ( M Λ ~T) V (False) => O (AND False rule) ( M Λ ~T) => O (OR False rule) ( Monitoring Λ Not Testing ) => Operating
Assignment 1-A: “common mistake” ( M Λ ~T V T Λ ~M) Λ ~T => O ( M Λ True Λ ~M) Λ ~T => O ( M Λ ~M) Λ ~T => O ( False ) Λ ~T => O False => O False implies operating Using OR first and Ignoring operator Precedence !
Assignment 1-A : “Interesting mistake” [ ( M Λ ~T) V ( T Λ ~M) ] Λ ~T => O [ (M V (T Λ ~M)) Λ (~T V (T Λ ~M)) ] Λ ~T [ ( (M V T) Λ (M V ~M) ) Λ ( (~T V T) Λ (~T V ~M) ) ] Λ ~T [ ( (M V T) Λ (True) ) Λ ( (True) Λ (~TV~M) ) ] Λ ~T [ ( M V T ) Λ ( ~T V ~M) ] Λ ~T (M V T ) Λ (~T V ~M) Λ ~T (~T V ~M) Λ [ (T V M) Λ ~T ] (~T V ~M) Λ [ M ] (~T Λ M) V ( ~M Λ M) (~T Λ M ) V (False) (M Λ ~T ) => O ( Monitoring and Not Testing) implies Operating Using disjunctive syllogism (T v M) Λ~T=> M is true; BUT (T v M) Λ ~T<=> M is not true !
Answer borrowed from Joel (spring ’08 student) (M Λ ~T V T Λ ~M) Λ ~T => O [ (M Λ ~T) V (T Λ ~M) ] Λ ~T => O ( M Ve T ) Λ ~T => O (M Λ ~T) Ve (T Λ ~T) => O (M Λ ~T) Ve (false) => O (M Λ ~T) => O Look at this replacement with “Exclusive OR” !