Discrete MathDiscrete Structures

Discrete Structures

Comprehensive Study Notes • 2 Modules

Mathematical Logic (Propositional Calculus)

Date: January 16, 2026

📖 Core Definitions

Proposition

A declarative statement that is either True or False, but never both. It represents a fact. Examples: 'It rained yesterday', 'Islamabad is the capital of Pakistan'. Non-examples: Questions, commands, or open sentences like x^2 = 13.

Conjunction (AND)

A compound statement that is True only when both components are True. Otherwise, it is False.

Disjunction (OR)

A compound statement that is False only if both inputs are False. If at least one input is True, the result is True.

Negation (NOT)~ or ¬

Represents the opposite truth value of the original statement. If P is True, ~P is False, and vice versa.

NAND Operator↑ (Sheffer Stroke)

'Not AND'. The result is False only if both inputs are True. For all other combinations, the result is True.

NOR Operator↓ (Pierce Arrow)

'Not OR'. The result is True only if both inputs are False. For all other cases, the result is False.

XOR Operator (Exclusive OR)

The result is True if the inputs are different (one True, one False). The result is False if the inputs are the same.

Conditional (Implication)p → q

False only when the hypothesis (p) is True and the conclusion (q) is False. In all other cases, the result is True.

Biconditionalp ↔ q

True only when both p and q have the same truth value (both True or both False). If they differ, the result is False.

Tautology

A compound proposition that is always True, regardless of the truth values of its individual variables.

Contradiction

A compound proposition that is always False, regardless of the truth values of its individual components.

Contingency

A compound proposition that is neither a tautology nor a contradiction; its truth value depends on variable inputs.

Rules & Properties

Contrapositive

~q → ~p

Negate both conclusion and hypothesis, and swap positions. Logically equivalent to the original conditional.

Converse

q → p

Swap the positions of the hypothesis and the conclusion.

Inverse

~p → ~q

Negate both the hypothesis and the conclusion without changing positions.

🧮 Examples & Problems

Distributive Law Proof

expressionP ∧ (q ∨ r) ≡ (P ∧ q) ∨ (P ∧ r)
resultProven via truth table; LHS and RHS columns are identical.

Translating Sentences

premise pHe is rich
premise qHe is generous
translations
  • He is rich and generous

    p ∧ q

  • He is neither rich nor generous

    ~p ∧ ~q (or ~(p ∨ q))

Biconditional Equivalence

expression(p ↔ q) ≡ (p → q) ∧ (q → p)
resultProven via truth table.

Number Theory & Modular Arithmetic

Date: N/A

📖 Core Definitions

Division Algorithm

For any integer a (dividend) and positive integer d (divisor), there exist unique integers q (quotient) and r (remainder) such that a = dq + r, where 0 ≤ r < d.

Modulo m System

A system containing integers from 0 to m-1.

Congruence Modulo ma ≡ b (mod m)

Integers a and b are congruent modulo m if m divides (a - b).

Rules & Properties

Remainder Constraint

The remainder (r) cannot be negative. It must always be between 0 and d-1.

Handling Negative Dividends

When dividing a negative number (e.g., -11 / 3), calculate q such that the remainder becomes positive. Example: -11 = 3(-4) + 1, so q=-4, r=1.

🧮 Examples & Problems

101 divided by 11

calculation101 = 11(9) + 2
resultQuotient = 9, Remainder = 2

-11 divided by 3

calculation-11 = 3(-4) + 1
resultQuotient = -4, Remainder = 1

26 (mod 7)

calculation26 = 7(3) + 5
resultr = 5

-13 (mod 5)

calculation-13 = 5(-3) + 2
resultr = 2

Verify 80 ≡ 5 (mod 17)

check80 - 5 = 75. Does 17 divide 75? No.
resultFalse

Verify -29 ≡ 5 (mod 17)

check-29 - 5 = -34. Does 17 divide -34? Yes (17 * -2 = -34).
resultTrue