CmSc 175 Discrete MathematicsLesson 02: Tautologies and Contradictions. Logical Equivalences. De Morgan’s Laws1. Tautologies and ContradictionsA propositional expression is a tautology if and only if for all possible assignments of truth values to its variables its truth value is TExample: P V ¬ P is a tautologyP ¬ P P V ¬ P----------------------------T F TF T TA propositional expression is a contradiction if and only if for all possible assignments of truth values to its variables its truth value is FExample: P Λ ¬ P is a contradiction P ¬ P P Λ ¬ P---------------------------T F FF T FUsage of tautologies and contradictions - in proving the validity of arguments; for rewriting expressions using only the basic connectives.Definition: Two propositional expressions P and Q are logically equivalent, if and only if P ↔ Q is a tautology. We write P ≡ Q or P Q.Note that the symbols ≡ and are not logical connectivesExercise: a) Show that P → Q ↔ ¬ P V Q is a tautology, i.e. P → Q ≡ ¬ P V Q P Q ¬ P ¬ P V Q P → Q P → Q ↔ ¬ P V Q----------------------------------------------------------------------T T F T T TT F F F F TF T T T T TF F T T T T1b) Show that ( P ↔ Q) ↔ ( ( P Λ Q ) V ( ¬P Λ ¬Q) ) is a tautologyi.e. P ↔ Q ≡ ( P Λ Q ) V ( ¬P Λ ¬Q)c) Show that ( P ⊕ Q) ↔ ( ( P Λ ¬Q ) V ( ¬P Λ Q) ) is a tautologyi.e. P ⊕ Q ≡ ( P Λ ¬Q ) V ( ¬P Λ Q) 22. Logical equivalencesSimilarly to standard algebra, there are laws to manipulate logical expressions, given as logical equivalences. 1. Commutative laws P V Q ≡ Q V PP Λ Q ≡ Q Λ P2. Associative laws (P V Q) V R ≡ P V (Q V R)(P Λ Q) Λ R ≡ P Λ (Q Λ R)3. Distributive laws: (P V Q) Λ (P V R) ≡ P V (Q Λ R)(P Λ Q) V (P Λ R) ≡ P Λ (Q V R)4. Identity P V F ≡ PP Λ T ≡ P5. Complement properties P V ¬P ≡ T (excluded middle)P Λ ¬P ≡ F (contradiction)6. Double negation ¬ (¬P) ≡ P7. Idempotency (consumption) P V P ≡ PP Λ P ≡ P8. De Morgan's Laws ¬ (P V Q) ≡ ¬P Λ ¬Q¬ (P Λ Q) ≡ ¬P V ¬Q9. Universal bound laws (Domination) P V T ≡ TP Λ F ≡ F10. Absorption Laws P V (P Λ Q) ≡ PP Λ (P V Q) ≡ P11. Negation of T and F: ¬T ≡ F¬F ≡ TFor practical purposes, instead of ≡, or , we can use = .Also, sometimes instead of ¬ , we will use the symbol ~.33. Negation of compound expressionsIn essence, we use De Morgan’s laws to negate expressions.1. If the expression A is an atomic expression, then the negation is ¬A.2. If the expression is ¬A, then its negation is ¬(¬A) = A (by law 6: double negation)3. If the expression A contains the connectives →, ↔, and ⊕, rewrite the expression so that it contains only the basic connectives AND, OR and NOT.4. Represent A as a disjunction P V Q or a conjunction P Λ Q. Example: Let A = B ⊕ C. Then, A can be represented as ( B Λ ¬C ) V ( ¬B Λ C) This is a disjunction of the form P V Q, where P = ( B Λ ¬C ) and Q = ( ¬B Λ C)5. Apply De Morgan’s laws: ¬( P V Q ) = ¬P Λ ¬Q; ¬( P Λ Q) = ¬P V ¬Q.6. If both P and Q are atomic expressions, stop.7. Otherwise repeat the above steps to obtain the negations of P and/or QExample:~(B ⊕ C) = ~ (( B Λ ~C ) V ( ~B Λ C) ) = apply De Morgan's Laws = ~ ( B Λ ~C ) Λ ~( ~B Λ C) = apply De Morgan's laws to each side= ( ~B V ~(~C) ) Λ (~(~B) V ~C) =apply double negation= ( ~B V C) Λ ( B V ~C) = apply distributive law= (~B Λ B) V (~B Λ~C) V (C Λ B ) V (C Λ ~C) = apply complement properties = F V (~B Λ~C) V (C Λ B ) V F = apply identity laws = (~B Λ~C) V (C Λ B ) = apply commutative laws = (C Λ B ) V (~B Λ~C) = apply commutative laws = ( B Λ C) V (~B Λ~C) = B ↔ C4ExercisesUse the equivalence A → B = ~A V B, and the equivalence laws.1. Show that (A → B) Λ A is equivalent to A Λ B 2. Show that (A → B) Λ B is equivalent to B 3. Show that (A → B) Λ (B → A) is equivalent to A ↔ B 4. Show that ~((A → B) Λ (B → A)) is equivalent to A ⊕ B 5. Show that ¬ ((P → Q) → P ) Λ P is a contradiction6. Replace the conditions in the following if statements with equivalent conditions without using the logical operators || and &&a) if ((a > 0 && b > 0) || (b > 0)) c = a*b; b) if (( a > 0 || b > 0 ) && (b > 0)) c = a*b;
View Full Document