MCS 1.1
UNIT 1
CHAPTER 3: The Logic of Compound Statements
1. Statements or Propositions
Definition: A statement or proposition is a sentence that holds a definite truth value — either true or false, but not both simultaneously.
Examples:
“Mumbai is in India.” → True
“1 + 1 = 3.” → False
“Where are you going?” → Neither true nor false (not a statement)
2. Compound Statements
Definition: Compound statements are statements formed by combining one or more statements using logical connectives.
Example: “Roses are red and violets are blue.”
Components: Comprised of sub-statements linked by logical connectives.
3. Basic Logical Operations
Logical Operations Defined
Conjunction
Notation:
Read As: “p and q”
Disjunction
Notation:
Read As: “p or q”
Negation
Notation:
Read As: “not p”
4. Example Problems
Example 1: Symbolic Form
Given statements:
h: “Raj is healthy”
w: “Raj is wealthy”
s: “Raj is wise”
Convert into Symbolic Form:
a. Raj is healthy and wealthy but not wise.
Symbolic form:
b. Raj is not wealthy, but he is healthy and wise.
Symbolic form:
c. Raj is neither healthy, wealthy, nor wise.
Symbolic form:
d. Raj is neither wealthy nor wise, but he is healthy.
Symbolic form:
e. Raj is wealthy, but he is not both healthy and wise.
Symbolic form:
Example 2: Symbolic Form
Given Statements:
n: “This polynomial has degree 2”
k: “This polynomial has degree 3”
Convert into Symbolic Form:
Either this polynomial has degree 2 or it has degree 3 but not both.
Symbolic form:
5. Truth Values
The truth values associated with logical operations are represented in a truth table.
Truth Table of Logical Operations
p | q | p q | p q | p |
|---|---|---|---|---|
T | T | T | T | F |
T | F | F | T | F |
F | T | F | T | T |
F | F | F | F | T |
6. Conditional Statements
Definition: For statement variables p and q, the conditional statement denoted as translates to “If p then q” or “p implies q”.
Logic: This statement holds false when p is true and q is false; it is true in all other cases.
Components:
p is referred to as the hypothesis.
q is referred to as the conclusion.
7. Contrapositive of Conditional Statements
Definition: The contrapositive of a conditional statement “If p then q” is expressed as “If {\sim}q then {\sim}p,” denoted as .
Logical Equivalence: A conditional statement is logically equivalent to its contrapositive:
Notation:
Examples:
a) If p = “Anuj can swim across the lake” and q = “Anuj can swim to the island.”
Contrapositive: “If Anuj cannot swim to the island, then Anuj cannot swim across the lake.”
b) If p = “Today is Holi” and q = “Tomorrow is Monday.”
Contrapositive: “If tomorrow is not Monday, then today is not Holi.”
8. Converse and Inverse of a Conditional Statement
A conditional statement of the form “If p then q” consists of the following:
Converse: “If q then p”
Notation:
Example: If Anuj can swim to the island, then Anuj can swim across the lake.
Inverse: “If {\sim}p then {\sim}q”
Notation:
Example: If Anuj cannot swim across the lake, then Anuj cannot swim to the island.
Note on Logical Equivalence:
A conditional statement and its converse are not logically equivalent.
A conditional statement and its inverse are not logically equivalent.
The converse and the inverse of a conditional statement are logically equivalent to each other:
Notation:
Example 1: Converse & Inverse
a) p: Anuj can swim across the lake
q: Anuj can swim to the island
Converse: If Anuj can swim to the island, then Anuj can swim across the lake.
Inverse: If Anuj cannot swim across the lake, then Anuj cannot swim to the island.
b) p: Today is Holi
q: Tomorrow is Monday
Converse: If tomorrow is Monday, then today is Holi.
Inverse: If today is not Holi, then tomorrow is not Monday.
9. Negation of a Conditional Statement
Definition: The negation of the statement “If p then q” is logically equivalent to “p and not q.”
Notation:
Example: Negation Tasks
Example 1:
a) If my car is in the repair shop, then I cannot get to class.
“My car is in the repair shop and I can not get to class.”
b) If Anu lives in Mumbai, then she lives in Maharashtra.
“Anu lives in Mumbai and she does not live in Maharashtra.”
Additional Example:
Negation Statements:
a) If x is nonnegative, then x is positive or x is 0.
Negation: “x is nonnegative and x is not positive and x is not 0.”
b) If n is divisible by 6, then n is divisible by 2 and n is divisible by 3.
Negation: “n is divisible by 6 and either n is not divisible by 2 or n is not divisible by 3.”
10. Bi-Conditional Statements
Definition: A biconditional statement, expressed as “p if and only if q” is denoted as . It is true when both p and q possess the same truth values and false when they differ.
11. Truth Tables of Compound Propositions
Precedence of Logical Operators:
Negation is prioritized before all other operations.
Conjunction has priority over disjunction.
Conditional and biconditional operators have lower precedence than conjunction and disjunction.
12. Truth Table Examples
Example 1
Construct the truth table:
Example 2
Construct the truth table:
13. Logic and Bit Operations
Definition: A bit is a symbolic representation in binary with values of 0 (false) and 1 (true). The term “bit” comes from binary digit, which denotes these two values.
Boolean Variable: This is a variable that can only take the values true or false, associated with bits.
14. Bit String Operations
Examples:
Find the bitwise OR, AND, and XOR of the bit strings:
Input:
01 1011 0110
11 0001 1101
Results:
Bitwise OR: 11 1011 1111
Bitwise AND: 01 0001 0100
Bitwise XOR: 10 1010 1011
Definition: A bit string is a sequence consisting of zero or more bits, with the length representing the number of bits contained in the string.
15. Evaluate Expressions
Example Evaluations
a)
b)
c)
d)
16. Tautologies and Contradictions
Definitions
Tautology: A statement that is always true irrespective of the individual truth values of the statements it encompasses.
Example: — “It is either raining or not raining.”
Contradiction: A statement that is always false regardless of individual truth values.
Example: — “It is both raining and not raining.”
17. Logical Equivalence
Definition: Two statements (or propositions) P and Q are logically equivalent if they exhibit identical truth tables.
Notation:
Example: are logically equivalent.
Example: Verification of Logical Equivalences
a)
b)
18. Further Logical Laws
Commutative Laws:
i)
ii)Associative Laws:
i)
ii)Distributive Laws:
i)
ii)Double Negative Law:
Idempotent Laws:
i)
ii)De Morgan’s Laws:
i)
ii)Absorption Laws:
Identity Laws:
i)
ii)Negation Laws:
i)
ii)Universal Bound Laws:
i)
ii)Negations of t and c:
i)
ii)
19. Example Applications using De Morgan’s Laws
Negation Examples:
“Raj is an orange belt and Suraj is a red belt.”
Negation: “Raj is not an orange belt or Suraj is not a red belt.”
“The connector is loose or the machine is unplugged.”
Negation: “The connector is not loose and the machine is not unplugged.”
20. Example Problem Solving with Negations
Problems:
Negation of 1 < x ≤ 4:
Equivalent to: 1 < x and x ≤ 4.
Negation: “x ≤ 1 or x > 4.”