IT 235

Discrete Structure

TU BIM · Semester 2 · BIM curriculum effective from 2021

Requirement
required
Credits
3
Study Guide
6 units available

Chapter notes

Authoritative study guide across 6 syllabus units

Open a unit to read its study notes.

Unit 1: Logic and Proofs· 8 LHs· ~10 marks

Pass path: Master truth tables, converse/contrapositive/inverse, De Morgan laws, and direct vs contradiction proofs. Top path: Construct formal proofs using inference rules (Modus Ponens, Resolution), handle nested quantifiers with negations, and pinpoint common fallacies (affirming the consequent, begging the question).

Part 1: Core Concepts (2 Marks)

  • ★ Proposition: A declarative statement that is either true (TT) or false (FF), but not both. Example: P:2+3=5P: 2 + 3 = 5 is a proposition; x+1=2x + 1 = 2 is an open sentence, not a proposition until xx is bound.
  • ★ Tautology and Contradiction: A compound proposition is a tautology if it evaluates to true for all truth assignments of its variables (e.g., P∨¬PP \lor \neg P). It is a contradiction if it is always false (e.g., P∧¬PP \land \neg P). A formula that is neither is a contingency.
  • ★ Conditional Statement Equivalences: For implication P→QP \rightarrow Q:
    • Converse: Q→PQ \rightarrow P
    • Contrapositive: ¬Q→¬P\neg Q \rightarrow \neg P (logically equivalent to P→QP \rightarrow Q)
    • Inverse: ¬P→¬Q\neg P \rightarrow \neg Q (equivalent to converse)

Part 2: Structural Frameworks (10 Marks)

1. Systematic Construction of Formal Proofs

When TU exam prompts ask to prove theorems (e.g., “Prove that 2\sqrt{2} is irrational” or “If 3n+23n + 2 is odd, then nn is odd”):

  1. Identify the Hypothesis and Conclusion: Explicitly state PP (given) and QQ (claim to establish).
  2. Select Proof Technique:
    • Direct Proof: Assume PP is true. Use algebra, definitions, and inference rules to deduce QQ.
    • Proof by Contraposition: Assume ¬Q\neg Q is true. Prove that ¬P\neg P must hold. Essential when QQ involves negation or division.
    • Proof by Contradiction (Reductio ad Absurdum): Assume both PP and ¬Q\neg Q hold. Derive a logical impossibility (e.g., R∧¬RR \land \neg R, or 1=01 = 0). Conclude ¬Q\neg Q is false, hence QQ holds.
  3. Formal Verification of Negations:
    ¬(∀xP(x))≡∃x¬P(x)\neg (\forall x P(x)) \equiv \exists x \neg P(x)
    ¬(∃xP(x))≡∀x¬P(x)\neg (\exists x P(x)) \equiv \forall x \neg P(x)
    When negating nested quantifiers like ∀x∃y(x<y)\forall x \exists y (x < y), systematically flip quantifiers and negate the predicate: ∃x∀y(x≥y)\exists x \forall y (x \ge y).
  4. Conclusion Statement: Conclude with a rigorous statement: “Since assuming ¬Q\neg Q yields a contradiction, the original statement P→QP \rightarrow Q must be true. Q.E.D.”

Part 3: Distinction Tables

Logic and Proof Method Comparisons

Dimension Propositional Logic Predicate Logic
Atomic Unit Complete declarative propositions (P,QP, Q) Predicates and arguments (P(x),Q(x,y)P(x), Q(x, y))
Quantification Cannot express “all” or “some” Supports universal (∀\forall) and existential (∃\exists) quantifiers
Expressive Power Finite, truth-functional combinations Infinite domains, relational assertions
Decidability Strictly decidable via truth tables Undecidable in first-order logic (Church-Turing)
Dimension Proof by Contraposition Proof by Contradiction
Target Implication Specifically proves conditional P→QP \rightarrow Q Proves any proposition SS (conditional or direct)
Assumption Assumes only ¬Q\neg Q Assumes P∧¬QP \land \neg Q (or ¬S\neg S)
Goal Directly derive ¬P\neg P Derive any impossible contradiction (R∧¬RR \land \neg R)
Structural Output Direct chain: ¬Q⇒⋯⇒¬P\neg Q \Rightarrow \dots \Rightarrow \neg P Impossibility trap: 0=10 = 1 or integer simultaneously even and odd

Part 4: Worked Problems & Exam Traps

Problem 1 (Standard): Contrapositive Proof

Prove that if nn is an integer and 3n+23n + 2 is odd, then nn is odd.

  • Step 1 (Setup): Implication is P(n)→Q(n)P(n) \rightarrow Q(n) where P(n):3n+2P(n): 3n + 2 is odd, Q(n):nQ(n): n is odd.
  • Step 2 (Contrapositive): Prove ¬Q(n)→¬P(n)\neg Q(n) \rightarrow \neg P(n), i.e., “If nn is even, then 3n+23n + 2 is even.”
  • Step 3 (Proof): Assume nn is even. By definition of even integers, n=2kn = 2k for some integer kk. Substitute nn:
    3n+2=3(2k)+2=6k+2=2(3k+1)3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1)
    Since kk is an integer, m=3k+1m = 3k + 1 is an integer. Thus, 3n+2=2m3n + 2 = 2m, which is even by definition.
  • Step 4 (Conclusion): Because the contrapositive is true, the original conditional statement is true.

Problem 2 (TU Classic): Proof by Contradiction

Prove that 2\sqrt{2} is irrational.

  • Step 1: Assume for contradiction that 2\sqrt{2} is rational. Then 2=ab\sqrt{2} = \frac{a}{b} where a,b∈Z,b≠0a, b \in \mathbb{Z}, b \neq 0, and gcd⁡(a,b)=1\gcd(a, b) = 1 (fraction in irreducible lowest terms).
  • Step 2: Squaring both sides: 2=a2b2  ⟹  a2=2b22 = \frac{a^2}{b^2} \implies a^2 = 2b^2.
  • Step 3: This means a2a^2 is even. Since the square of an odd number is odd, aa must be even. Thus, a=2ka = 2k for some integer kk.
  • Step 4: Substitute a=2ka = 2k into a2=2b2a^2 = 2b^2:
    (2k)2=2b2  ⟹  4k2=2b2  ⟹  b2=2k2(2k)^2 = 2b^2 \implies 4k^2 = 2b^2 \implies b^2 = 2k^2
    This implies b2b^2 is even, so bb must also be even.
  • Step 5: If both aa and bb are even, they share a common factor of 2. This directly contradicts the assumption that gcd⁡(a,b)=1\gcd(a, b) = 1.
  • Step 6: Hence, the assumption is false; 2\sqrt{2} is irrational.

Students lose marks here because they negate P→QP \rightarrow Q as ¬P→¬Q\neg P \rightarrow \neg Q instead of P∧¬QP \land \neg Q. Remember that an implication is false only when the antecedent is true and the consequent is false. Students also forget to state that gcd⁡(a,b)=1\gcd(a, b) = 1 when setting up rational fractions in contradiction proofs, invalidating the contradiction step.