Solutions to the Homework I I601 Logic and Discrete Mathematics 1. Determine whether each of these compound propositions is satisfiable. a) (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) b) (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q) c) (p ↔ q) ∧ (¬p ↔ q) S o l u t i o n. For part (a) we have the following table p T T F F q T F T F ¬p F F T T ¬q F T F T p ∨ ¬q T T F T ¬p ∨ q T F T T ¬p ∨ ¬q F T T T (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) F F F T From the last column we see that the proposition is satisfiable. The same result can be obtained using logically equivalent transformations: (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) ≡ ((p ∧ (¬p ∨ q)) ∨ (¬q ∧ (¬p ∨ q))) ∧ (¬p ∨ ¬q) ≡ ((p ∧ ¬p) ∨ (p ∧ q)) ∨ (¬q ∧ ¬p) ∨ (¬q ∧ q)) ∧ (¬p ∨ ¬q) ≡ ((p ∧ q)) ∨ (¬p ∧ ¬q)) ∧ (¬p ∨ ¬q) ≡ ¬p ∧ ¬q This shows that the proposition is true if both p and q are false. Thus, the proposition is satisfiable. Analogously, we can use method of truth tables for parts (b) and (c). Part (b): Considering that (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q) ≡ (¬p ∨ q) ∧ (¬p ∨ ¬q) ∧ (¬¬p ∨ q) ∧ (¬¬p ∨ ¬q) ≡ (¬p ∨ q) ∧ (¬p ∨ ¬q) ∧ (p ∨ q) ∧ (p ∨ ¬q) we can compose the truth table as follows: p T T F F q T F T F ¬p F F T T ¬q F T F T ¬p ∨ q T F T T ¬p ∨ ¬q F T T T p∨q T T T F p ∨ ¬q T T F T Hence, this proposition is not satisfiable (it is the contradiction). Entire proposition F F F F Part (c): The truth table as follows: p q T T T F F T F F Step: (p ↔ q) T F F T 1 ∧ F F F F 3 (¬p ↔ q) F T T F 2 Hence, this proposition is not satisfiable. 2. Use the laws in the lecture slide #28 to simplify the formula ¬(p ∧ q) ∨ (¬p ∧ q). Check the results using the technique of truth tables. S o l u t i o n. ¬(p ∧ q) ∨ (¬p ∧ q) ≡ ¬p ∨ ¬q ∨ (¬p ∧ q) ≡ ¬p ∨ ((¬q ∨ ¬p) ∧ (¬q ∨ q)) ≡ ¬p ∨ ((¬q ∨ ¬p) ∧ T) ≡ ¬p ∨ (¬q ∨ ¬p) ≡ ¬q ∨ ¬p ≡ p → ¬q De Morgan law associative and distributive laws complement law identity law assiociative and idempotent laws Example 2 on slide #24 Alternative answers may be ¬q ∨ ¬p or q → ¬p. To check the result one can compose the following truth table: p q T T T F F T F F Step: ¬ F T T T 2 (p ∧ q) T F F F 1 ∨ F T T T 5 (¬p F F T T 3 ∧q) F F T F 4 ≡ T T T T 8 p→ F T T T 7 ¬q F T F T 6 3. Find CNF (Conjunctive Normal Form) and DNF (Disjunctive Normal Form) for the formula (p → q) ↔ r ∧ ¬p. S o l u t i o n. (p → q) ↔ r ∧ ¬p ≡ [(p → q) → r ∧ ¬p] ∧ [r ∧ ¬p → (p → q)] ≡ [(¬p ∨ q) → r ∧ ¬p] ∧ [r ∧ ¬p → (¬p ∨ q)] ≡ [¬(¬p ∨ q) ∨ (r ∧ ¬p)] ∧ [¬(r ∧ ¬p) ∨ ¬p ∨ q] ≡ [(p ∧ ¬q) ∨ (r ∧ ¬p)] ∧ [¬(r ∧ ¬p) ∨ ¬p ∨ q] ≡ [(p ∧ ¬q) ∨ (r ∧ ¬p)] ∧ (¬r ∨ p ∨ ¬p ∨ q) ≡ [(p ∧ ¬q) ∨ (r ∧ ¬p)] ∧ (¬r ∨ T ∨ q) ≡ [(p ∧ ¬q) ∨ (r ∧ ¬p)] ∧ T ≡ (p ∧ ¬q) ∨ (r ∧ ¬p) ≡ (p ∨ r) ∧ (¬q ∨ r) ∧ (¬q ∨ ¬p) def. of biconditional Example 2 on slide #24 Example 2 on slide #24 De Morgan law De Morgan law complement law domination law domination law distributive law The last two lines yield DNF and CNF respectively: DNF: (p ∧ ¬q) ∨ (r ∧ ¬p) CNF: (p ∨ r) ∧ (¬q ∨ r) ∧ (¬p ∨ ¬q) 4. A collection of logical operators is called functionally complete if every compound proposition is logically equivalent to a compound proposition involving only these logical operators. For example, as every compound proposition is convertible to CNF , the connectives ¬, ∧ and ∨ form a functionally complete collection of logical operators. Show that ¬ and ∧ form a functionally complete collection of logical operators. Find a formula containing propositional variables p, q and r, that is true if and only if exactly one of those variables is true. Represent this formula in the form using only connectives ¬ and ∧. S o l u t i o n. Every proposition can be converted into DNF or CNF containing connectives ∨, ∧ and ¬. Using the De Morgan law, one can substitute every ∨ by its logical equivalent: p ∨ q ≡ ¬(¬p ∧ ¬q). For example, the proposition that is true iff exactly one of those variables is true has three alternatives when it is valid: (a) only p is true: p ∧ ¬q ∧ ¬r ≡ T (b) only q is true: ¬p ∧ q ∧ ¬ ≡ T (c) only r is true: ¬p ∧ ¬q ∧ r ≡ T So, the proposition can be written as (p ∧ ¬q ∧ ¬r) ∨ (¬p ∧ q ∧ ¬r) ∨ (¬p ∧ ¬q ∧ r). Using distributive and absorption laws several times, we see that this formula is logically equivalent to (p ∨ q ∨ r) ∧ (¬q ∨ ¬r) ∧ (¬p ∨ ¬r) ∧ (¬p ∨ ¬q) (1) This can be converted using the De Morgan law into the form containing only connectives ¬ and ∧: ¬(¬p ∧ ¬q ∧ ¬r) ∧ ¬(q ∧ r) ∧ ¬(p ∧ r) ∧ ¬(p ∧ q). To verify the formula against the initial requirements, we construct the truth table of the proposition (1): p T T T T F F F F q r T T T F F T F F T T T F F T F F Step: (p ∨ q ∨ r) T T T T T T T F 1 ∧ F T T T F T T F 5 (¬q ∨ ¬r) F T T T F T T T 2 ∧ F T F T F T T F 6 (¬p ∨ ¬r) F T F T T T T T 3 ∧ F F F T F T T F 7 (¬p ∨ ¬q) F F T T T T T T 4
© Copyright 2026 Paperzz