0% found this document useful (0 votes)
28 views247 pages

1 Final

The document outlines a presentation on Logic, Proofs, and Counting by Dhananjoy Dey from IIIT Lucknow, focusing on propositional logic, various proof techniques, and counting methods. It defines propositions as declarative sentences that are either true or false and discusses logical operators and their applications in constructing mathematical arguments. The presentation aims to provide a foundational understanding of discrete mathematics and its principles.

Uploaded by

prudhvitaduvai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views247 pages

1 Final

The document outlines a presentation on Logic, Proofs, and Counting by Dhananjoy Dey from IIIT Lucknow, focusing on propositional logic, various proof techniques, and counting methods. It defines propositions as declarative sentences that are either true or false and discusses logical operators and their applications in constructing mathematical arguments. The presentation aims to provide a foundational understanding of discrete mathematics and its principles.

Uploaded by

prudhvitaduvai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 247

Logic, Proofs, and Counting

Dhananjoy Dey

Indian Institute of Information Technology Lucknow


[email protected]

January 28, 2025

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 1 / 84
Disclaimers

1
All the pictures used in this presentation are taken from freely available
websites.

2
If there is a reference on a slide all the information on that slide is
attributable to that source whether quotation marks are used or not.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 2 / 84
Outline

1 Propositional Logic

2 Proofs
Direct Proof
Proof by Contradiction
Proof by Contrapositive
Constructive Proofs, Counterexamples, and Vacuous Proofs
Mathematical Induction

3 Counting

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 3 / 84
Propositional Logic

Outline

1 Propositional Logic

2 Proofs
Direct Proof
Proof by Contradiction
Proof by Contrapositive
Constructive Proofs, Counterexamples, and Vacuous Proofs
Mathematical Induction

3 Counting

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 4 / 84
Propositional Logic

Propositions/Statements

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam
3 210 × 315 = 615

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam
3 210 × 315 = 615

Example (Not Propositions)


1 What is the time now?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam
3 210 × 315 = 615

Example (Not Propositions)


1 What is the time now?
2 The sentence I am reading is false.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam
3 210 × 315 = 615

Example (Not Propositions)


1 What is the time now?
2 The sentence I am reading is false.
3 x + 3 = 7,

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositions/Statements
Definition
A proposition/statements is a declarative sentence that is either true or
false never both or in between.

Example (Propositions)
1 AI is being harnessed in the treatment of cancer.
2 Guwahati is the capital of Assam
3 210 × 315 = 615

Example (Not Propositions)


1 What is the time now?
2 The sentence I am reading is false.
3 x + 3 = 7, (neither true nor false)
4 x+y=z

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 5 / 84
Propositional Logic

Propositional Logic

The rules of logic give precise meaning to mathematical


statements.

These rules are used to distinguish between valid and invalid


mathematical arguments.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 6 / 84
Propositional Logic

Propositional Logic

The rules of logic give precise meaning to mathematical


statements.

These rules are used to distinguish between valid and invalid


mathematical arguments.

A major goal of Discrete Maths is to learn how to understand and


how to construct correct mathematical arguments.

Discrete maths starts with an introduction to logic.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 6 / 84
Propositional Logic

Propositional Logic

The rules of logic give precise meaning to mathematical


statements.

These rules are used to distinguish between valid and invalid


mathematical arguments.

A major goal of Discrete Maths is to learn how to understand and


how to construct correct mathematical arguments.

Discrete maths starts with an introduction to logic.

In mathematics, ‘logic’ is used to refer to a particular type of formal


reasoning.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 6 / 84
Propositional Logic

Propositional Logic . . .

Constructing Propositions
Propositional Variables: p, q, r, s, . . .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 7 / 84
Propositional Logic

Propositional Logic . . .

Constructing Propositions
Propositional Variables: p, q, r, s, . . .
The proposition that is always true is denoted by T and the
proposition that is always false is denoted by F.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 7 / 84
Propositional Logic

Propositional Logic . . .

Constructing Propositions
Propositional Variables: p, q, r, s, . . .
The proposition that is always true is denoted by T and the
proposition that is always false is denoted by F.
Compound Propositions – constructed from logical connectives
and other propositions
Negation ¬
Conjunction ∧
Disjunction ∨
Implication → or =⇒
Biconditional ↔ or ⇐⇒

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 7 / 84
Propositional Logic

Compound Propositions: Negation

Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 8 / 84
Propositional Logic

Compound Propositions: Negation

Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.
The negation of a proposition p is denoted by ¬p
p ¬p
T F
F T
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 8 / 84
Propositional Logic

Compound Propositions: Negation

Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.
The negation of a proposition p is denoted by ¬p
p ¬p
T F
F T
Table: Truth Table

Example
p – you are students of 2nd year B.Tech
¬p –

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 8 / 84
Propositional Logic

Compound Propositions: Negation

Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.
The negation of a proposition p is denoted by ¬p
p ¬p
T F
F T
Table: Truth Table

Example
p – you are students of 2nd year B.Tech
¬p – you are not students of 2nd year B.Tech

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 8 / 84
Propositional Logic

Compound Propositions: Negation

Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.
The negation of a proposition p is denoted by ¬p
p ¬p
T F
F T
Table: Truth Table

Example
p – you are students of 2nd year B.Tech
¬p – you are not students of 2nd year B.Tech

Remark: Other notations for negation are p̄, ∼ p, −p, N p, p0 or !p.


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 8 / 84
Propositional Logic

Compound Propositions: Negation . . .

Example (Note:)
The negation of the statement ‘5 + 3 = 9’ is

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 9 / 84
Propositional Logic

Compound Propositions: Negation . . .

Example (Note:)
The negation of the statement ‘5 + 3 = 9’ is ‘5 + 3 , 9’,
and not the statement ‘5 + 3 = 8’.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 9 / 84
Propositional Logic

Compound Propositions: Negation . . .

Example (Note:)
The negation of the statement ‘5 + 3 = 9’ is ‘5 + 3 , 9’,
and not the statement ‘5 + 3 = 8’.

The negation of “Guwahati is the capital of Assam" is “Guwahati is


not the capital of Assam"
and not the statement “Dispur is the capital of Assam"

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 9 / 84
Propositional Logic

Compound Propositions: Negation . . .

Example (Note:)
The negation of the statement ‘5 + 3 = 9’ is ‘5 + 3 , 9’,
and not the statement ‘5 + 3 = 8’.

The negation of “Guwahati is the capital of Assam" is “Guwahati is


not the capital of Assam"
and not the statement “Dispur is the capital of Assam"

The negation of the statement “Moscow is the capital of China" is


the statement “Moscow is not the capital of China", and not the
statement “Moscow is the capital of Russia".

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 9 / 84
Propositional Logic

Conjunction

The conjunction of propositions p and q is denoted by p ∧ q


p q p∧q
T T T
T F F
F T F
F F F
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 10 / 84
Propositional Logic

Conjunction

The conjunction of propositions p and q is denoted by p ∧ q


p q p∧q
T T T
T F F
F T F
F F F
Table: Truth Table

Example
p – you are attending this lecture
q – it is sunny today
p∧q–

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 10 / 84
Propositional Logic

Conjunction

The conjunction of propositions p and q is denoted by p ∧ q


p q p∧q
T T T
T F F
F T F
F F F
Table: Truth Table

Example
p – you are attending this lecture
q – it is sunny today
p ∧ q – you are attending this lecture and it is sunny today

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 10 / 84
Propositional Logic

Disjunction

The conjunction of propositions p and q is denoted by p ∨ q


p q p∨q
T T T
T F T
F T T
F F F
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 11 / 84
Propositional Logic

Disjunction

The conjunction of propositions p and q is denoted by p ∨ q


p q p∨q
T T T
T F T
F T T
F F F
Table: Truth Table

Example
p – you are attending this lecture
q – you are watching something on your mobile
p∨q–

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 11 / 84
Propositional Logic

Disjunction

The conjunction of propositions p and q is denoted by p ∨ q


p q p∨q
T T T
T F T
F T T
F F F
Table: Truth Table

Example
p – you are attending this lecture
q – you are watching something on your mobile
p ∨ q – you are attending this lecture or watching something on your
mobile
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 11 / 84
Propositional Logic

Inclusive or/Exclusive or (Xor)

In English ‘or’ has two distinct meanings.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 12 / 84
Propositional Logic

Inclusive or/Exclusive or (Xor)

In English ‘or’ has two distinct meanings.


Inclusive or – “Students who have taken Computer Networks or
Data Structures class may take this class,"

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 12 / 84
Propositional Logic

Inclusive or/Exclusive or (Xor)

In English ‘or’ has two distinct meanings.


Inclusive or – “Students who have taken Computer Networks or
Data Structures class may take this class,"

We assume that students need to have taken one of the


prerequisites, but may have taken both.

This is the meaning of disjunction.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 12 / 84
Propositional Logic

Inclusive or/Exclusive or (Xor)

In English ‘or’ has two distinct meanings.


Inclusive or – “Students who have taken Computer Networks or
Data Structures class may take this class,"

We assume that students need to have taken one of the


prerequisites, but may have taken both.

This is the meaning of disjunction.

Exclusive or (Xor) – “Soup or salad comes with the main course of


your lunch,"

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 12 / 84
Propositional Logic

Inclusive or/Exclusive or (Xor)

In English ‘or’ has two distinct meanings.


Inclusive or – “Students who have taken Computer Networks or
Data Structures class may take this class,"

We assume that students need to have taken one of the


prerequisites, but may have taken both.

This is the meaning of disjunction.

Exclusive or (Xor) – “Soup or salad comes with the main course of


your lunch," you do not expect to be able to get both soup and
salad.

This is the meaning of Exclusive Or (Xor). It is denoted by ⊕.


E.g., p ⊕ q, one of p and q must be true, but not both.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 12 / 84
Propositional Logic

Exclusive or (Xor)

A B A⊕B
T T F
T F T
F T T
F F F
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 13 / 84
Propositional Logic

Exclusive or (Xor)

A B A⊕B
T T F
T F T
F T T
F F F
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 13 / 84
Propositional Logic

Exclusive or (Xor)

A B A⊕B
T T F
T F T
F T T
F F F
Table: Truth Table

Theorem
p ⊕ q ⇐⇒ (p ∧ ¬q) ∨ (¬p ∧ q).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 13 / 84
Propositional Logic

Conditional Statements: Implication

If p and q are propositions, then p ⇒ q is a conditional statement


or implication which is read as “if p, then q".

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 14 / 84
Propositional Logic

Conditional Statements: Implication

If p and q are propositions, then p ⇒ q is a conditional statement


or implication which is read as “if p, then q".

The conditional statement p ⇒ q is false when p is true & q is


false, and true otherwise.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 14 / 84
Propositional Logic

Conditional Statements: Implication

If p and q are propositions, then p ⇒ q is a conditional statement


or implication which is read as “if p, then q".

The conditional statement p ⇒ q is false when p is true & q is


false, and true otherwise.

p q p⇒q
T T T
T F F
F T T
F F T
Table: Truth Table

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 14 / 84
Propositional Logic

Conditional Statements: Implication

If p and q are propositions, then p ⇒ q is a conditional statement


or implication which is read as “if p, then q".

The conditional statement p ⇒ q is false when p is true & q is


false, and true otherwise.

p q p⇒q
T T T
T F F
F T T
F F T
Table: Truth Table

In p ⇒ q, p is called the hypothesis and q is called the conclusion.


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 14 / 84
Propositional Logic

Understanding Implication
If n is an even integer, then n = 2 · k, where k ∈ Z.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 15 / 84
Propositional Logic

Understanding Implication
If n is an even integer, then n = 2 · k, where k ∈ Z.
In p ⇒ q there does not need to be any connection between the
hypothesis or the conclusion.
The “meaning" of p ⇒ q depends only on the truth values of p and
q.
These implications are perfectly fine, but would not be used in
ordinary English.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 15 / 84
Propositional Logic

Understanding Implication
If n is an even integer, then n = 2 · k, where k ∈ Z.
In p ⇒ q there does not need to be any connection between the
hypothesis or the conclusion.
The “meaning" of p ⇒ q depends only on the truth values of p and
q.
These implications are perfectly fine, but would not be used in
ordinary English.
If color the moon is green, then you have more money than Mukesh
Ambani.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 15 / 84
Propositional Logic

Understanding Implication
If n is an even integer, then n = 2 · k, where k ∈ Z.
In p ⇒ q there does not need to be any connection between the
hypothesis or the conclusion.
The “meaning" of p ⇒ q depends only on the truth values of p and
q.
These implications are perfectly fine, but would not be used in
ordinary English.
If color the moon is green, then you have more money than Mukesh
Ambani.
If 1 + 1 = 3, then you are presently in Nepal, embarking on a
trekking adventure.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 15 / 84
Propositional Logic

Understanding Implication
If n is an even integer, then n = 2 · k, where k ∈ Z.
In p ⇒ q there does not need to be any connection between the
hypothesis or the conclusion.
The “meaning" of p ⇒ q depends only on the truth values of p and
q.
These implications are perfectly fine, but would not be used in
ordinary English.
If color the moon is green, then you have more money than Mukesh
Ambani.
If 1 + 1 = 3, then you are presently in Nepal, embarking on a
trekking adventure.
One way to view the logical conditional is to think of an obligation
or contract.
If you score 85% on the final exam, you will receive an A grade.
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 15 / 84
Propositional Logic

Understanding Implication . . .

An implication can be expressed in several different ways.


1 If the student is good in mathematics, then (s)he is humble.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 16 / 84
Propositional Logic

Understanding Implication . . .

An implication can be expressed in several different ways.


1 If the student is good in mathematics, then (s)he is humble.
2 The student is humble, if (s)he is good in mathematics.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 16 / 84
Propositional Logic

Understanding Implication . . .

An implication can be expressed in several different ways.


1 If the student is good in mathematics, then (s)he is humble.
2 The student is humble, if (s)he is good in mathematics.
3 The student is good in mathematics implies that (s)he is humble.
4 The student is good in mathematics only if (s)he is humble.
5 To be humble is necessary for the student to be good in
mathematics.
6 The student’s being good in mathematics is sufficient to conclude
that (s)he is humble.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 16 / 84
Propositional Logic

Understanding Implication . . .

Observation

For two statements S and T the following convey the same meaning:
(i) If S then T .
(ii) T if S .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 17 / 84
Propositional Logic

Understanding Implication . . .

Observation

For two statements S and T the following convey the same meaning:
(i) If S then T .
(ii) T if S .
(iii) S implies T .
(iv) S only if T .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 17 / 84
Propositional Logic

Understanding Implication . . .

Observation

For two statements S and T the following convey the same meaning:
(i) If S then T .
(ii) T if S .
(iii) S implies T .
(iv) S only if T .
(v) T is necessary for S .
(vi) S is sufficient for T .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 17 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

From p ⇒ q we can form new conditional statements


q ⇒ p is the converse of p ⇒ q
¬q ⇒ ¬p is the contrapositive of p ⇒ q
¬p ⇒ ¬q is the inverse of p ⇒ q

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 18 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

From p ⇒ q we can form new conditional statements


q ⇒ p is the converse of p ⇒ q
¬q ⇒ ¬p is the contrapositive of p ⇒ q
¬p ⇒ ¬q is the inverse of p ⇒ q

We first show that the contrapositive, ¬q ⇒ ¬p, of a conditional


statement p ⇒ q always has the same truth value as p ⇒ q.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 18 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

From p ⇒ q we can form new conditional statements


q ⇒ p is the converse of p ⇒ q
¬q ⇒ ¬p is the contrapositive of p ⇒ q
¬p ⇒ ¬q is the inverse of p ⇒ q

We first show that the contrapositive, ¬q ⇒ ¬p, of a conditional


statement p ⇒ q always has the same truth value as p ⇒ q.
Note that the contrapositive is false only when
¬p is false and ¬q is true, that is, only when p is true and q is false.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 18 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

From p ⇒ q we can form new conditional statements


q ⇒ p is the converse of p ⇒ q
¬q ⇒ ¬p is the contrapositive of p ⇒ q
¬p ⇒ ¬q is the inverse of p ⇒ q

We first show that the contrapositive, ¬q ⇒ ¬p, of a conditional


statement p ⇒ q always has the same truth value as p ⇒ q.
Note that the contrapositive is false only when
¬p is false and ¬q is true, that is, only when p is true and q is false.
Neither the converse, p ⇒ q, nor the inverse, ¬p ⇒ ¬q, has the
same truth value as p ⇒ q for all possible truth values of p and q.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 18 / 84
Propositional Logic

Converse
Consider the two implications
(i) If the student is sincere, then (s)he is humble.
(ii) If the student is humble, then (s)he is sincere.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 19 / 84
Propositional Logic

Converse
Consider the two implications
(i) If the student is sincere, then (s)he is humble.
(ii) If the student is humble, then (s)he is sincere.
The conjunction of (i) and (ii) is written as

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 19 / 84
Propositional Logic

Converse
Consider the two implications
(i) If the student is sincere, then (s)he is humble.
(ii) If the student is humble, then (s)he is sincere.
The conjunction of (i) and (ii) is written as
The student is humble if and only if (s)he is sincere.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 19 / 84
Propositional Logic

Converse
Consider the two implications
(i) If the student is sincere, then (s)he is humble.
(ii) If the student is humble, then (s)he is sincere.
The conjunction of (i) and (ii) is written as
The student is humble if and only if (s)he is sincere.
Example
For real numbers x and a > 0, consider the statements:
“|x| < a" and “x ∈ (−a, a)".
Then the two statements
“if |x| < a, then x ∈ (−a, a)" and “if x ∈ (−a, a), then |x| < a"
are converses of each other.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 19 / 84
Propositional Logic

Converse
Consider the two implications
(i) If the student is sincere, then (s)he is humble.
(ii) If the student is humble, then (s)he is sincere.
The conjunction of (i) and (ii) is written as
The student is humble if and only if (s)he is sincere.
Example
For real numbers x and a > 0, consider the statements:
“|x| < a" and “x ∈ (−a, a)".
Then the two statements
“if |x| < a, then x ∈ (−a, a)" and “if x ∈ (−a, a), then |x| < a"
are converses of each other.
Note that the two statements can also be written as

|x| < a ⇔ x ∈ (−a, a)


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 19 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

When two compound propositions always have the same truth


values, regardless of the truth values of its propositional variables,
we call them equivalent.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 20 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

When two compound propositions always have the same truth


values, regardless of the truth values of its propositional variables,
we call them equivalent.

Hence, a conditional statement and its contrapositive are


equivalent.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 20 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

When two compound propositions always have the same truth


values, regardless of the truth values of its propositional variables,
we call them equivalent.

Hence, a conditional statement and its contrapositive are


equivalent.

The converse and the inverse of a conditional statement are also


equivalent.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 20 / 84
Propositional Logic

Converse, Contrapositive, and Inverse

When two compound propositions always have the same truth


values, regardless of the truth values of its propositional variables,
we call them equivalent.

Hence, a conditional statement and its contrapositive are


equivalent.

The converse and the inverse of a conditional statement are also


equivalent.
However neither is equivalent to the original conditional statement.

Theorem
p ⇒ q ⇔ ¬p ∨ q.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 20 / 84
Propositional Logic

Biconditional/Equivalence

If p and q are propositions, then we can form the biconditional


proposition p ⇔ q, read as
“p if and only if ( or iff) q".

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 21 / 84
Propositional Logic

Biconditional/Equivalence

If p and q are propositions, then we can form the biconditional


proposition p ⇔ q, read as
“p if and only if ( or iff) q".
p q p⇔q
T T T
T F F
F T F
F F T
Table: Truth Table

Some alternative ways “p iff q" is expressed in English:


p is necessary and sufficient for q
if p then q, and conversely

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 21 / 84
Propositional Logic

Propositional Logic

Example Name Meaning

¬p Negation Not p
p∨q (Inclusive) Or Either p or q or both
p∧q And Both p and q
p⊕q XOR Either p or q, but not both
p⇒q Implies If p, then q
p⇔q/ Biconditional / p if and only if q
p ⇐⇒ q Equivalence

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 22 / 84
Propositional Logic

Truth Tables for Compound Propositions

A truth table presents the truth values of a compound propositional


formula in terms of the truth values of the components.

Precedence of Logical Operators

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 23 / 84
Propositional Logic

Truth Tables for Compound Propositions

A truth table presents the truth values of a compound propositional


formula in terms of the truth values of the components.

Precedence of Logical Operators

Operator Precedence
¬ 1
∧ 2
∨ 3
⇒ 4
⇔ 5

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 23 / 84
Propositional Logic

Truth Tables for Compound Propositions

A truth table presents the truth values of a compound propositional


formula in terms of the truth values of the components.

Precedence of Logical Operators

Operator Precedence
¬ 1
∧ 2
∨ 3
⇒ 4
⇔ 5

Precedence of basic arithmetic operation

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 23 / 84
Propositional Logic

Truth Tables for Compound Propositions

A truth table presents the truth values of a compound propositional


formula in terms of the truth values of the components.

Precedence of Logical Operators

Operator Precedence
¬ 1
∧ 2
∨ 3
⇒ 4
⇔ 5

Precedence of basic arithmetic operation PEMDAS:

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 23 / 84
Propositional Logic

Truth Tables for Compound Propositions

A truth table presents the truth values of a compound propositional


formula in terms of the truth values of the components.

Precedence of Logical Operators

Operator Precedence
¬ 1
∧ 2
∨ 3
⇒ 4
⇔ 5

Precedence of basic arithmetic operation PEMDAS: Parentheses, Exponents, Multiplication and


Division (from left to right), Addition and Subtraction (from left to right)

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 23 / 84
Propositional Logic

Example of Truth Table

Construct a truth table for p ∨ q ⇒ ¬r

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 24 / 84
Propositional Logic

Example of Truth Table

Construct a truth table for p ∨ q ⇒ ¬r

Example
p q r p∨q ¬r p ∨ q ⇒ ¬r

T T T T F F
T T F T T T
T F T T F F
T F F T T T
F T T T F F
F T F T T T
F F T F F T
F F F F T T

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 24 / 84
Propositional Logic

Tautologies, Contradictions, and Contingencies

Definition
A tautology is a proposition which is always true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 25 / 84
Propositional Logic

Tautologies, Contradictions, and Contingencies

Definition
A tautology is a proposition which is always true.

p ∨ ¬p

A contradiction is a proposition which is always false.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 25 / 84
Propositional Logic

Tautologies, Contradictions, and Contingencies

Definition
A tautology is a proposition which is always true.

p ∨ ¬p

A contradiction is a proposition which is always false.

p ∧ ¬p

A contingency is a proposition which is neither a tautology nor a


contradiction.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 25 / 84
Propositional Logic

De Morgan’s Laws

¬(p ∧ q) ≡ ¬p ∨ ¬q

¬(p ∨ q) ≡ ¬p ∧ ¬q

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 26 / 84
Propositional Logic

De Morgan’s Laws

¬(p ∧ q) ≡ ¬p ∨ ¬q

¬(p ∨ q) ≡ ¬p ∧ ¬q

Truth table for De Morgan’s Second Law:

p q ¬p ¬q (p ∨ q) ¬(p ∨ q) ¬p ∧ ¬q
T T F F T F F
T F F T T F F
F T T F T F F
T F T T F T T

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 26 / 84
Propositional Logic

Key Logical Equivalences

Identity Laws: p ∧ T ≡ p, p ∨ F ≡ p

Domination Laws: p ∨ T ≡ T , p ∧ F ≡ F

Idempotent laws: p ∧ p ≡ p, p ∨ p ≡ p

Double Negation Law: ¬(¬p) ≡ p

Negation Laws: p ∨ ¬p ≡ T , p ∧ ¬p ≡ F

Commutative Laws: p ∨ q ≡ q ∨ p, p ∧ q ≡ q ∧ p

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 27 / 84
Propositional Logic

Key Logical Equivalences . . .

Associative Laws: (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)

Distributive Laws: (p ∨ (q ∧ r)) ≡ (p ∨ q) ∧ (p ∨ r)


(p ∧ (q ∨ r)) ≡ (p ∧ q) ∨ (p ∧ r)

Absorption Laws: p ∨ (p ∧ q) ≡ p
p ∧ (p ∨ q) ≡ p

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 28 / 84
Propositional Logic

Logic Puzzles

In Lucknow, there are 2 kinds of inhabitants, Type-1, who always


tell the truth, and Type-2, who always lie.

You come to Lucknow and meet A and B.

A says “B is a Type-1."
B says “The two of us are of opposite types."

Exercise
What are the types of A and B?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 29 / 84
Propositional Logic

Logic Puzzles . . .

Solution
Let p and q be the statements that A is a Type-1 and B is a Type-1,
respectively.
Then ¬p represents the proposition that A is a Type-2 and ¬q that
B is a Type-2.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 30 / 84
Propositional Logic

Logic Puzzles . . .

Solution
Let p and q be the statements that A is a Type-1 and B is a Type-1,
respectively.
Then ¬p represents the proposition that A is a Type-2 and ¬q that
B is a Type-2.

If A is a Type-1, then p is true. Since Type-1 tell the truth, q must


also be true. Then (p ∧ ¬q) ∨ (¬p ∧ q) would have to be true, but it is
not.
So, A is not a Type-1 and therefore ¬p must be true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 30 / 84
Propositional Logic

Logic Puzzles . . .

Solution
Let p and q be the statements that A is a Type-1 and B is a Type-1,
respectively.
Then ¬p represents the proposition that A is a Type-2 and ¬q that
B is a Type-2.

If A is a Type-1, then p is true. Since Type-1 tell the truth, q must


also be true. Then (p ∧ ¬q) ∨ (¬p ∧ q) would have to be true, but it is
not.
So, A is not a Type-1 and therefore ¬p must be true.
If A is a Type-2, then B must not be a Type-1 since Type-2 always
lie.
So, then both ¬p and ¬q hold since both are Type-2.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 30 / 84
Proofs

Outline

1 Propositional Logic

2 Proofs
Direct Proof
Proof by Contradiction
Proof by Contrapositive
Constructive Proofs, Counterexamples, and Vacuous Proofs
Mathematical Induction

3 Counting

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 31 / 84
Proofs

Proofs of Mathematical Statements

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 32 / 84
Proofs

Proofs of Mathematical Statements

A proof is a valid argument that establishes the truth of a


statement.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 32 / 84
Proofs

Proofs of Mathematical Statements

A proof is a valid argument that establishes the truth of a


statement.
In math, CS, and other disciplines, informal proofs which are
generally shorter, are generally used.
More than one rule of inference are often used in a step.
Steps may be skipped.
The rules of inference used are not explicitly stated.
Easier for to understand and to explain to people.
However, it is also easier to introduce errors.
Proofs have many practical applications:

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 32 / 84
Proofs

Proofs of Mathematical Statements

A proof is a valid argument that establishes the truth of a


statement.
In math, CS, and other disciplines, informal proofs which are
generally shorter, are generally used.
More than one rule of inference are often used in a step.
Steps may be skipped.
The rules of inference used are not explicitly stated.
Easier for to understand and to explain to people.
However, it is also easier to introduce errors.
Proofs have many practical applications:
verification that computer programs are correct
establishing that operating systems are secure
enabling programs to make inferences in artificial intelligence
showing that system specifications are consistent

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 32 / 84
Proofs

Some Terminology

A theorem

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A theorem is a statement that can be shown to be true using:


definitions
other theorems
axioms (statements which are given as true)
rules of inference

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A theorem is a statement that can be shown to be true using:


definitions
other theorems
axioms (statements which are given as true)
rules of inference

A lemma

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A theorem is a statement that can be shown to be true using:


definitions
other theorems
axioms (statements which are given as true)
rules of inference

A lemmais a ‘helping theorem’/‘little theorem’ or a result which is


needed to prove a theorem.

A corollary

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A theorem is a statement that can be shown to be true using:


definitions
other theorems
axioms (statements which are given as true)
rules of inference

A lemmais a ‘helping theorem’/‘little theorem’ or a result which is


needed to prove a theorem.

A corollaryis a result which follows directly from a theorem.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A theorem is a statement that can be shown to be true using:


definitions
other theorems
axioms (statements which are given as true)
rules of inference

A lemmais a ‘helping theorem’/‘little theorem’ or a result which is


needed to prove a theorem.

A corollaryis a result which follows directly from a theorem.

Less important theorems are sometimes called propositions.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 33 / 84
Proofs

Some Terminology

A conjecture

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 34 / 84
Proofs

Some Terminology

A conjecture is a statement that is being proposed to be true.


Once a proof of a conjecture is found, it becomes a theorem. It
may turn out to be false.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 34 / 84
Proofs

Some Terminology

A conjecture is a statement that is being proposed to be true.


Once a proof of a conjecture is found, it becomes a theorem. It
may turn out to be false.

A proof is an argument that begins with a proposition and


proceeds using logical rules to establish a conclusion.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 34 / 84
Proofs

Conversion of Plain English into Mathematical Form

Example
Everybody loves somebody

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 35 / 84
Proofs

Conversion of Plain English into Mathematical Form

Example
Everybody loves somebody
For every person A, there is a person B such that (or 3) A loves B.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 35 / 84
Proofs

Conversion of Plain English into Mathematical Form

Example
Everybody loves somebody
For every person A, there is a person B such that (or 3) A loves B.
or
There is a person B such that for every person A, A loves B.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 35 / 84
Proofs

Conversion of Plain English into Mathematical Form

Example
Everybody loves somebody
For every person A, there is a person B such that (or 3) A loves B.
or
There is a person B such that for every person A, A loves B.

The phrases ‘for all’, ‘for any’, ‘for every’, ‘for some’, & ‘there
exists’ are called quantifiers

Their careful use is an important part in mathematics.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 35 / 84
Proofs

Conversion of Plain English into Mathematical Form

Example
Everybody loves somebody
For every person A, there is a person B such that (or 3) A loves B.
or
There is a person B such that for every person A, A loves B.

The phrases ‘for all’, ‘for any’, ‘for every’, ‘for some’, & ‘there
exists’ are called quantifiers

Their careful use is an important part in mathematics.

The symbol ∀ stands for ‘for all’, ‘for any’, or ‘for every’

The symbol ∃ stands for ‘there exists’ or ‘for some’.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 35 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.


If we denote the set of shelves in the library by X, then the
statement S 1 can be written as

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.


If we denote the set of shelves in the library by X, then the
statement S 1 can be written as
“∀ s ∈ X (there is a mathematics book in s)".

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.


If we denote the set of shelves in the library by X, then the
statement S 1 can be written as
“∀ s ∈ X (there is a mathematics book in s)".
“There is a mathematics book in s" itself is a statement with the
existential quantifier.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.


If we denote the set of shelves in the library by X, then the
statement S 1 can be written as
“∀ s ∈ X (there is a mathematics book in s)".
“There is a mathematics book in s" itself is a statement with the
existential quantifier.
For a given shelf s, let us denote by Bs the set of books in the shelf
s. ∃ b ∈ Bs (b is a mathematics book)

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Example
(i) S 1 : In every shelf in the library there is a mathematics book.
(ii) S 2 : There is a shelf in the library in which all books are story
books.

Notice that each of the statements involves two quantifiers.


If we denote the set of shelves in the library by X, then the
statement S 1 can be written as
“∀ s ∈ X (there is a mathematics book in s)".
“There is a mathematics book in s" itself is a statement with the
existential quantifier.
For a given shelf s, let us denote by Bs the set of books in the shelf
s. ∃ b ∈ Bs (b is a mathematics book)
∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 36 / 84
Proofs

Conversion of Plain English into Math Form . . .


Thus,
S 1 : In every shelf in the library there is a mathematics book.
S 1 : ∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 37 / 84
Proofs

Conversion of Plain English into Math Form . . .


Thus,
S 1 : In every shelf in the library there is a mathematics book.
S 1 : ∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).
S 2 : There is a shelf in the library in which all books are story books.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 37 / 84
Proofs

Conversion of Plain English into Math Form . . .


Thus,
S 1 : In every shelf in the library there is a mathematics book.
S 1 : ∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).
S 2 : There is a shelf in the library in which all books are story books.
S 2 : ∃ s ∈ X (∀ b ∈ Bs (b is a story book)).
Negate the statements S 1 and S 2

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 37 / 84
Proofs

Conversion of Plain English into Math Form . . .


Thus,
S 1 : In every shelf in the library there is a mathematics book.
S 1 : ∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).
S 2 : There is a shelf in the library in which all books are story books.
S 2 : ∃ s ∈ X (∀ b ∈ Bs (b is a story book)).
Negate the statements S 1 and S 2

not-S 1 : ∃ s ∈ X (∀ b ∈ Bs (b is not a mathematics book)).

There is a shelf in the library in which each of the book is a non-mathematics


book

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 37 / 84
Proofs

Conversion of Plain English into Math Form . . .


Thus,
S 1 : In every shelf in the library there is a mathematics book.
S 1 : ∀ s ∈ X (∃ b ∈ Bs (b is a mathematics book)).
S 2 : There is a shelf in the library in which all books are story books.
S 2 : ∃ s ∈ X (∀ b ∈ Bs (b is a story book)).
Negate the statements S 1 and S 2

not-S 1 : ∃ s ∈ X (∀ b ∈ Bs (b is not a mathematics book)).

There is a shelf in the library in which each of the book is a non-mathematics


book

not-S 2 : ∀ s ∈ X (∃ b ∈ Bs (b is a non-story book))

Given any shelf in the library, it has a non-story book


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 37 / 84
Proofs

Forms of Theorems

Many theorems assert that a property holds for all elements in a


domain
Often the universal quantifier (needed for a precise statement of a
theorem) is omitted by standard mathematical convention.
Example
The statement:
If x > y, where x & y are positive real numbers, then x2 > y2

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 38 / 84
Proofs

Forms of Theorems

Many theorems assert that a property holds for all elements in a


domain
Often the universal quantifier (needed for a precise statement of a
theorem) is omitted by standard mathematical convention.
Example
The statement:
If x > y, where x & y are positive real numbers, then x2 > y2
really means
For all positive real numbers x & y, if x > y, then x2 > y2 .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 38 / 84
Proofs

Proving Theorems
Many theorems have the form:

∀ x (P(x) ⇒ Q(x))

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 39 / 84
Proofs

Proving Theorems
Many theorems have the form:

∀ x (P(x) ⇒ Q(x))

To prove them, we show that where c is an arbitrary element of the


domain,

P(c) ⇒ Q(c)

By universal generalization the truth of the original formula follows.


So, we must prove something of the form: p ⇒ q.
Theorem
Every odd integer is equal to the difference between the squares of
two integers.
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 39 / 84
Proofs

Methods of Proof

Direct Proof

Proof by Contradiction

Proof by Contrapositive

Constructive Proofs, Counterexamples, and Vacuous Proofs

Mathematical Induction

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 40 / 84
Proofs Direct Proof

Direct Proof

To prove a statement of the form “if A, then B" directly, begin by


assuming that A is true.

Then, making use of axioms, definitions, previously proven


theorems, and rules of inference, proceed directly until B is
reached as a conclusion.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 41 / 84
Proofs Direct Proof

Direct Proof

To prove a statement of the form “if A, then B" directly, begin by


assuming that A is true.

Then, making use of axioms, definitions, previously proven


theorems, and rules of inference, proceed directly until B is
reached as a conclusion.

Direct proofs are most easily employed when establishing the


general form of the antecedent is straightforward.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 41 / 84
Proofs Direct Proof

Direct Proof . . .

Theorem
The square of an integer is odd if and only if the integer itself is odd.
For any integer n, n2 is odd iff n is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 42 / 84
Proofs Direct Proof

Direct Proof . . .

Theorem
The square of an integer is odd if and only if the integer itself is odd.
For any integer n, n2 is odd iff n is odd.

The statement “n2 is odd iff n is odd" is really two statements in one:
1 if n is odd then n2 is odd
2 if n2 is odd then n is odd

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 42 / 84
Proofs Direct Proof

Direct Proof . . .

Example
Prove that if n is odd then n2 is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 43 / 84
Proofs Direct Proof

Direct Proof . . .

Example
Prove that if n is odd then n2 is odd.
Proof.
If n is odd, then we can write n = 2k + 1 where k ∈ Z. Then

n2 = (2k + 1)2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
= 2. j + 1 where j = (2k2 + 2k) ∈ Z


Thus, n2 is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 43 / 84
Proofs Direct Proof

Direct Proof . . .

Example
Prove that if n2 is odd then n is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 44 / 84
Proofs Direct Proof

Direct Proof . . .

Example
Prove that if n2 is odd then n is odd.
Proof.
If n2 is odd, then we can write n2 = 2k + 1 where k ∈ Z. Then

n2 = 2k + 1
⇒ − 1 = 2k n2
⇒ (n + 1)(n − 1) = 2k which is even, since k ∈ Z

⇒ either n + 1 or n − 1 will be an even number ⇒ n is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 44 / 84
Proofs Proof by Contradiction

Proof by Contradiction

The technique known as proof by contradiction is one type of


indirect proof.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 45 / 84
Proofs Proof by Contradiction

Proof by Contradiction

The technique known as proof by contradiction is one type of


indirect proof.

In a proof by contradiction, in order to prove a statement of the


form “If A, then B", one assumes that both A and ¬B are true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 45 / 84
Proofs Proof by Contradiction

Proof by Contradiction

The technique known as proof by contradiction is one type of


indirect proof.

In a proof by contradiction, in order to prove a statement of the


form “If A, then B", one assumes that both A and ¬B are true.

The goal is then to reach a contradiction, which allows one to


conclude that A and ¬B can never both be true.

That is, whenever A is true, B must also be true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 45 / 84
Proofs Proof by Contradiction

Proof by Contradiction

The technique known as proof by contradiction is one type of


indirect proof.

In a proof by contradiction, in order to prove a statement of the


form “If A, then B", one assumes that both A and ¬B are true.

The goal is then to reach a contradiction, which allows one to


conclude that A and ¬B can never both be true.

That is, whenever A is true, B must also be true.

This method of proof is useful when assuming ¬B allows you to


easily utilize a definition or theorem.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 45 / 84
Proofs Proof by Contradiction

Proof by Contradiction . . .
Example
Only if part of previous theorem:
Proof.
Now, we have to show that if n2 is odd, then n must be odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 46 / 84
Proofs Proof by Contradiction

Proof by Contradiction . . .
Example
Only if part of previous theorem:
Proof.
Now, we have to show that if n2 is odd, then n must be odd.
Suppose this is not true for all n, and that n is a particular integer s/t n2 is odd but
n is not odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 46 / 84
Proofs Proof by Contradiction

Proof by Contradiction . . .
Example
Only if part of previous theorem:
Proof.
Now, we have to show that if n2 is odd, then n must be odd.
Suppose this is not true for all n, and that n is a particular integer s/t n2 is odd but
n is not odd.
Now if n is even, we can write n = 2k where k ∈ Z

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 46 / 84
Proofs Proof by Contradiction

Proof by Contradiction . . .
Example
Only if part of previous theorem:
Proof.
Now, we have to show that if n2 is odd, then n must be odd.
Suppose this is not true for all n, and that n is a particular integer s/t n2 is odd but
n is not odd.
Now if n is even, we can write n = 2k where k ∈ Z

n2 = (2k)2
= 4k2
= 2(2k2 )
= 2. j, where j = 2k2
Thus, n2 is even which contradicts our assumption.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 46 / 84
Proofs Proof by Contradiction

Proof by Contradiction . . .
Example
Only if part of previous theorem:
Proof.
Now, we have to show that if n2 is odd, then n must be odd.
Suppose this is not true for all n, and that n is a particular integer s/t n2 is odd but
n is not odd.
Now if n is even, we can write n = 2k where k ∈ Z

n2 = (2k)2
= 4k2
= 2(2k2 )
= 2. j, where j = 2k2
Thus, n2 is even which contradicts our assumption.
That is, the assumption, n is an integer s/t n2 is odd but n is not odd, was false.
So its negation is true: if n2 is odd, then n is odd.
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 46
/ 84
Proofs Proof by Contradiction

Corollary

Corollary
If n is odd, then n4 is odd.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 47 / 84
Proofs Proof by Contradiction

Corollary

Corollary
If n is odd, then n4 is odd.

Proof.
Note that n4 = (n2 )2 .

Since n is odd, by previous theorem, n2 is also odd.

Then since n2 is odd, again the theorem, n4 is odd.




Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 47 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive

Proof by contrapositive makes use of the fact, which relies on the


equivalence of an implication with its contrapositive.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 48 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive

Proof by contrapositive makes use of the fact, which relies on the


equivalence of an implication with its contrapositive.

The proof begins by assuming ¬B is true.

Referencing axioms, definitions, previously proven theorems, and


rules of inference, the proof ultimately reaches the conclusion that
¬A is true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 48 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive

Proof by contrapositive makes use of the fact, which relies on the


equivalence of an implication with its contrapositive.

The proof begins by assuming ¬B is true.

Referencing axioms, definitions, previously proven theorems, and


rules of inference, the proof ultimately reaches the conclusion that
¬A is true.

In other words, this is a direct proof on the contrapositive of the


original statement A ⇒ B.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 48 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive – Example

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

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 49 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive – Example

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

Proof.
1 The first step in a proof by contraposition is to assume that the
conclusion of the conditional statement “If 3n + 2 is odd, then n is
odd" is false.
2 Then n = 2k for some k ∈ Z.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 49 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive – Example

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

Proof.
1 The first step in a proof by contraposition is to assume that the
conclusion of the conditional statement “If 3n + 2 is odd, then n is
odd" is false.
2 Then n = 2k for some k ∈ Z.
3 We find that 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1).
4 This tells us that 3n + 2 is even.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 49 / 84
Proofs Proof by Contrapositive

Proof by Contrapositive – Example

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

Proof.
1 The first step in a proof by contraposition is to assume that the
conclusion of the conditional statement “If 3n + 2 is odd, then n is
odd" is false.
2 Then n = 2k for some k ∈ Z.
3 We find that 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1).
4 This tells us that 3n + 2 is even.
5 This is the negation of the premise of the theorem.
We have proved that if 3n + 2 is odd, then n is odd. 

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 49 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Constructive Proofs

While proofs of universally quantified statements are more


commonly encountered, knowing how to prove an existentially
quantified statement is essential.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 50 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Constructive Proofs

While proofs of universally quantified statements are more


commonly encountered, knowing how to prove an existentially
quantified statement is essential.

Recall that an existentially quantified statement simply makes a


claim about the existence of a particular entity.

If a single example of the desired object can be produced, the


statement has been proven.

Such a proof is often called a constructive proof.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 50 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Constructive Proofs – Example

Exercise
Prove that there exists an integer n s/t

n2 + n
= 1.
3n + 8

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 51 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Constructive Proofs – Example

Exercise
Prove that there exists an integer n s/t

n2 + n
= 1.
3n + 8

Solution
First Thoughts – find such n

Prove the statement for those n.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 51 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

One is presented with a statement that may or may not be true


and is asked to prove or disprove the given statement.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 52 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

One is presented with a statement that may or may not be true


and is asked to prove or disprove the given statement.

In this case, experimentation may be required in order to decide


whether to attempt a proof or a disproof.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 52 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

One is presented with a statement that may or may not be true


and is asked to prove or disprove the given statement.

In this case, experimentation may be required in order to decide


whether to attempt a proof or a disproof.

To disprove a universally quantified statement, providing a single


counterexample is sufficient.

Thus disproof of a universally quantified statement is constructive.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 52 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

One is presented with a statement that may or may not be true


and is asked to prove or disprove the given statement.

In this case, experimentation may be required in order to decide


whether to attempt a proof or a disproof.

To disprove a universally quantified statement, providing a single


counterexample is sufficient.

Thus disproof of a universally quantified statement is constructive.

On the other hand, disproving an existentially quantified statement


amounts to proving a quantified statement:
one must show that the given statement does not hold for any
elements of the domain of discourse.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 52 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Example

Exercise
Prove that the irrational numbers are not closed under multiplication.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 53 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Example

Exercise
Prove that the irrational numbers are not closed under multiplication.

Solution
First Thoughts. The statement p : irrational numbers are closed under multiplication
is a universal statement.
¬p : It is not the case that the irrational numbers are closed under multiplication.
This means the given statement is logically equivalent to an existential statement.
We can prove it false if we can produce two irrational numbers whose product is
rational.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 53 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Example

Exercise
Prove that the irrational numbers are not closed under multiplication.

Solution
First Thoughts. The statement p : irrational numbers are closed under multiplication
is a universal statement.
¬p : It is not the case that the irrational numbers are closed under multiplication.
This means the given statement is logically equivalent to an existential statement.
We can prove it false if we can produce two irrational numbers whose product is
rational.
√ √
Let x = 2 & y = 8. Then x & y are both irrational, but xy = 4 is rational.
Thus the irrational numbers are not closed under multiplication.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 53 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

In summary,
A single example cannot prove a universally quantified statement
(unless the domain of discourse contains only one element);

A single counterexample can disprove a universally quantified


statement;

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 54 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Counterexamples

In summary,
A single example cannot prove a universally quantified statement
(unless the domain of discourse contains only one element);

A single counterexample can disprove a universally quantified


statement;

A single example can prove an existentially quantified statement;

A single counterexample cannot disprove an existentially


quantified statement (unless the domain of discourse contains
only one element).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 54 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Vacuous Proofs

Now, we consider the situation in which a statement of the form “if


A, then B" is to be proven, but the statement A is never true.

Since a conditional statement is always true when the antecedent


is false.

We would regard such a statement as vacuously true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 55 / 84
Proofs Constructive Proofs, Counterexamples, and Vacuous Proofs

Vacuous Proofs – Example

Exercise
For all x ∈ R, if x2 < 0 then 3x2 + 5 = −7x

Solution
For any x ∈ R, x2 ≥ 0.
Thus, since the antecedent (x2 < 0) is always false, the implication is
vacuously true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 56 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 57 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.

Example
n(n+1)
=
Pn
Show that the sum of the first n natural numbers i=1 i 2

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 57 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.

Example
n(n+1)
=
Pn
Show that the sum of the first n natural numbers i=1 i 2

Solution
1.(1+1)
1 First, we consider the case when n = 1 and clearly 1 = 2 .

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 57 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.

Example
n(n+1)
=
Pn
Show that the sum of the first n natural numbers i=1 i 2

Solution
1.(1+1)
1 First, we consider the case when n = 1 and clearly 1 = 2 .
2 Next, we assume that it is true for n = k, i.e.,

k(k + 1)
1 + 2 + ... + k =
2

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 57 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.

Example
n(n+1)
=
Pn
Show that the sum of the first n natural numbers i=1 i 2

Solution
1.(1+1)
1 First, we consider the case when n = 1 and clearly 1 = 2 .
2 Next, we assume that it is true for n = k, i.e.,

k(k + 1)
1 + 2 + ... + k =
2

3 Prove it for n = k + 1
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 57 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.
There are three parts to a proof by induction:
the base step
the induction hypothesis
the induction step/inductive leap

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 58 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.
There are three parts to a proof by induction:
the base step
the induction hypothesis
the induction step/inductive leap
In the base step, we show that the statement is true for some natural
number (usually the number 1).
In the induction hypothesis, we assume the statement is true for some
natural number n = k.
In the induction step, we have to prove that the statement is true for its
successor n = k + 1. This is often written as P(k) ⇒ P(k + 1).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 58 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .


Mathematical induction is an important proof technique, and it is often
used to establish the truth of a statement for all natural numbers.
There are three parts to a proof by induction:
the base step
the induction hypothesis
the induction step/inductive leap
In the base step, we show that the statement is true for some natural
number (usually the number 1).
In the induction hypothesis, we assume the statement is true for some
natural number n = k.
In the induction step, we have to prove that the statement is true for its
successor n = k + 1. This is often written as P(k) ⇒ P(k + 1).

[P(1) ∧ ∀ k (P(k) ⇒ P(k + 1))] ⇒ ∀ n P(n).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 58 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Example (Bernoulli’s Inequality)


Let x ∈ R s/t x > −1. Then,

(1 + x)n ≥ (1 + nx) ∀ n ∈ N.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 59 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proposition
Every integer greater than 1 can be written as the product of prime
numbers.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 60 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proposition
Every integer greater than 1 can be written as the product of prime
numbers.

Proof.
Let P(n) be the statement that n can be written as the product of
prime numbers.
P(n) is true for each integer greater or equal to 2.
For n = 2, P(n) is true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 60 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proposition
Every integer greater than 1 can be written as the product of prime
numbers.

Proof.
Let P(n) be the statement that n can be written as the product of
prime numbers.
P(n) is true for each integer greater or equal to 2.
For n = 2, P(n) is true.
Now, assume that for some k ≥ 2, each integer n with 2 ≤ n ≤ k
may be written as a product of primes. We need to prove that k + 1
is a product of primes.


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 60 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proof.
Case (a): Suppose k + 1 is a prime. Then we are done.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 61 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proof.
Case (a): Suppose k + 1 is a prime. Then we are done.
Case (b): Suppose k + 1 is a not prime. Then by our assumption,
∃ integers a & b with 2 ≤ a, b ≤ k s/t

k + 1 = a · b.

By the strong inductive hypothesis, since 2 ≤ a, b ≤ k, both a & b


are the product of primes. Thus,
k + 1 = a · b is the product of primes.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 61 / 84
Proofs Mathematical Induction

Proof by Mathematical Induction . . .

Proof.
Case (a): Suppose k + 1 is a prime. Then we are done.
Case (b): Suppose k + 1 is a not prime. Then by our assumption,
∃ integers a & b with 2 ≤ a, b ≤ k s/t

k + 1 = a · b.

By the strong inductive hypothesis, since 2 ≤ a, b ≤ k, both a & b


are the product of primes. Thus,
k + 1 = a · b is the product of primes.
This is proved by strong induction. 

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 61 / 84
Proofs Mathematical Induction

Mathematical Induction

Induction

Math Induction

Weak Strong

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 62 / 84
Proofs Mathematical Induction

Mathematical Induction

Induction

Math Induction

Weak Strong

Definition
Weak Induction: [P(1) ∧ ∀ k (P(k) ⇒ P(k + 1))] ⇒ ∀ n P(n).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 62 / 84
Proofs Mathematical Induction

Mathematical Induction

Induction

Math Induction

Weak Strong

Definition
Weak Induction: [P(1) ∧ ∀ k (P(k) ⇒ P(k + 1))] ⇒ ∀ n P(n).

Strong Induction:
[P(1) ∧ ∀ k (P(1) ∧ P(2) ∧ . . . ∧ P(k) ⇒ P(k + 1))] ⇒ ∀ n P(n).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 62 / 84
Proofs Mathematical Induction

Mathematical Induction . . .

The Induction Principle (Form 1)


Let A ⊆ N. Assume that:
(i) 1 ∈ A, and
(ii) for k ≥ 1, k ∈ A
⇒ (k + 1) ∈ A. Then A = N.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 63 / 84
Proofs Mathematical Induction

Mathematical Induction . . .

The Induction Principle (Form 1)


Let A ⊆ N. Assume that:
(i) 1 ∈ A, and
(ii) for k ≥ 1, k ∈ A
⇒ (k + 1) ∈ A. Then A = N.

The Induction Principle (Form 2)


Suppose for each n ∈ N, a statement P(n) is given. Assume that:
(i) P(1) is true, and
(ii) for k ≥ 1, P(k) is true implies P(k + 1) is true.
Then, P(n) is true for each n ∈ N.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 63 / 84
Proofs Mathematical Induction

Example of Weak Induction

Exercise
n(n+1)
Show that the sum of the first n natural numbers is 2

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 64 / 84
Proofs Mathematical Induction

Example of Weak Induction

Exercise
n(n+1)
Show that the sum of the first n natural numbers is 2

Solution
1.(1+1)
1 First, we consider the case when n = 1 and clearly 1 = 2 .
2 Next, we assume that it is true for n = k, i.e.,

k(k + 1)
1 + 2 + ... + k =
2

3 Prove it for n = k + 1

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 64 / 84
Proofs Mathematical Induction

Importance of Base Step

Example
Consider a statement P(n) as 2 + 4 + . . . + 2n = (n + 2)(n − 1).
Show that if P(k) is true, then P(k + 1) is also true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 65 / 84
Proofs Mathematical Induction

Importance of Base Step

Example
Consider a statement P(n) as 2 + 4 + . . . + 2n = (n + 2)(n − 1).
Show that if P(k) is true, then P(k + 1) is also true.
However, the base case P(1) is false.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 65 / 84
Proofs Mathematical Induction

Importance of Base Step

Example
Consider a statement P(n) as 2 + 4 + . . . + 2n = (n + 2)(n − 1).
Show that if P(k) is true, then P(k + 1) is also true.
However, the base case P(1) is false.

Note:

Let k ≥ 1 and assume that P(k) is true. Show that P(k + 1) is true.

For the induction hypothesis, the case k = 1 is included, because it


is essential.

In fact, this is the base case from where you start making
inductive leap.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 65 / 84
Proofs Mathematical Induction

Importance of Base Step


Let us try to prove n + 1 < n ∀ n ∈ N.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 66 / 84
Proofs Mathematical Induction

Importance of Base Step


Let us try to prove n + 1 < n ∀ n ∈ N.
First we assume that the above inequality is true for n = k for some
k ∈ N, i.e.,

k + 1 < k.

Now, we try to prove this is true for n = k + 1.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 66 / 84
Proofs Mathematical Induction

Importance of Base Step


Let us try to prove n + 1 < n ∀ n ∈ N.
First we assume that the above inequality is true for n = k for some
k ∈ N, i.e.,

k + 1 < k.

Now, we try to prove this is true for n = k + 1.

(k + 1) + 1 < k + 1

k+2 < k+1


Thus, induction step is true.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 66 / 84
Proofs Mathematical Induction

Importance of Base Step


Let us try to prove n + 1 < n ∀ n ∈ N.
First we assume that the above inequality is true for n = k for some
k ∈ N, i.e.,

k + 1 < k.

Now, we try to prove this is true for n = k + 1.

(k + 1) + 1 < k + 1

k+2 < k+1


Thus, induction step is true.
However, it is not true for n = 1.
Thus, the given inequality is not true.
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 66 / 84
Proofs Mathematical Induction

Example of Strong Induction

Proposition
Every integer greater than 1 can be written as the product of prime
numbers.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 67 / 84
Proofs Mathematical Induction

Example of Strong Induction

Proposition
Every integer greater than 1 can be written as the product of prime
numbers.

Proof.
Let P(n) be the statement that n can be written as the product of
prime numbers.
P(n) is true for each integer greater or equal to 2.
For n = 2, P(n) is true.
Now, assume that for some k ≥ 2, each integer n with 2 ≤ n ≤ k
may be written as a product of primes. We need to prove that k + 1
is a product of primes.


Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 67 / 84
Proofs Mathematical Induction

Example of Strong Induction . . .

Proof.
Case (a): Suppose k + 1 is a prime. Then we are done.
Case (b): Suppose k + 1 is a not prime. Then by our assumption,
∃ integers a & b with 2 ≤ a, b ≤ k s/t

k + 1 = ab.

By the strong inductive hypothesis, since 2 ≤ a, b ≤ k, both a & b


are the product of primes. Thus,
k + 1 = ab is the product of primes.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 68 / 84
Proofs Mathematical Induction

Example of Strong Induction . . .

Proof.
Case (a): Suppose k + 1 is a prime. Then we are done.
Case (b): Suppose k + 1 is a not prime. Then by our assumption,
∃ integers a & b with 2 ≤ a, b ≤ k s/t

k + 1 = ab.

By the strong inductive hypothesis, since 2 ≤ a, b ≤ k, both a & b


are the product of primes. Thus,
k + 1 = ab is the product of primes.
This is proved by strong induction. 

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 68 / 84
Proofs Mathematical Induction

Arbitrary Base Step

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 69 / 84
Proofs Mathematical Induction

Arbitrary Base Step

Definition
Let A ⊂ Z and m ∈ Z. Assume that
(i) m∈A
(ii) for k ≥ m, k ∈ A implies k + 1 ∈ A.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 69 / 84
Proofs Mathematical Induction

Arbitrary Base Step

Definition
Let A ⊂ Z and m ∈ Z. Assume that
(i) m∈A
(ii) for k ≥ m, k ∈ A implies k + 1 ∈ A.

With this definition, n = m is the base case.


Note that with m = 1 we get the first condition of the principle.

Exercise
Prove that n! > 2n

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 69 / 84
Proofs Mathematical Induction

Arbitrary Base Step

Definition
Let A ⊂ Z and m ∈ Z. Assume that
(i) m∈A
(ii) for k ≥ m, k ∈ A implies k + 1 ∈ A.

With this definition, n = m is the base case.


Note that with m = 1 we get the first condition of the principle.

Exercise
Prove that n! > 2n for all positive integers n ≥ 4.
(The base case here is 4.)

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 69 / 84
Counting

Outline

1 Propositional Logic

2 Proofs
Direct Proof
Proof by Contradiction
Proof by Contrapositive
Constructive Proofs, Counterexamples, and Vacuous Proofs
Mathematical Induction

3 Counting

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 70 / 84
Counting

What Is Counting?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 71 / 84
Counting

What Is Counting?

The term counting decidedly does not refer to the naming of the
ordinal numbers in sequence.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 71 / 84
Counting

What Is Counting?

The term counting decidedly does not refer to the naming of the
ordinal numbers in sequence.

It is the term we use for the collection of techniques utilized to


answer “how many" questions.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 71 / 84
Counting

What Is Counting?

The term counting decidedly does not refer to the naming of the
ordinal numbers in sequence.

It is the term we use for the collection of techniques utilized to


answer “how many" questions.

A joke among mathematicians is that there are three types of


people in the world:
(i) who can count
(ii) who cannot

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 71 / 84
Counting

What Is Counting?

The term counting decidedly does not refer to the naming of the
ordinal numbers in sequence.

It is the term we use for the collection of techniques utilized to


answer “how many" questions.

A joke among mathematicians is that there are three types of


people in the world:
(i) who can count
(ii) who cannot
(iii) Even those in the latter category would be able to determine that a
room with 11 rows of tables and 4 tables per row contains 44
tables, without counting them.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 71 / 84
Counting

Basic Counting Principles: The Product Rule


The Product Rule:

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 72 / 84
Counting

Basic Counting Principles: The Product Rule


The Product Rule: A procedure can be broken down into a sequence
of two tasks.
There are n1 ways to do the first task and n2 ways to do the
second task.

Then there are n1 × n2 ways to do the procedure.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 72 / 84
Counting

Basic Counting Principles: The Product Rule


The Product Rule: A procedure can be broken down into a sequence
of two tasks.
There are n1 ways to do the first task and n2 ways to do the
second task.

Then there are n1 × n2 ways to do the procedure.

Example
How many different number plates can be made if each plate is of the
form XY αβ WZ γδκν, where X, Y, W, Z ∈ upper-case English letters and
α, β, γ, δ, κ, ν ∈ {0, 1, · · · , 9}?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 72 / 84
Counting

Basic Counting Principles: The Product Rule


The Product Rule: A procedure can be broken down into a sequence
of two tasks.
There are n1 ways to do the first task and n2 ways to do the
second task.

Then there are n1 × n2 ways to do the procedure.

Example
How many different number plates can be made if each plate is of the
form XY αβ WZ γδκν, where X, Y, W, Z ∈ upper-case English letters and
α, β, γ, δ, κ, ν ∈ {0, 1, · · · , 9}?

Solution
There are 262 × 102 × 262 × 104 = 264 × 106 many different number plates

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 72 / 84
Counting

Counting Functions
Example
How many functions are there from a set with m elements to a set with
n elements?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 73 / 84
Counting

Counting Functions
Example
How many functions are there from a set with m elements to a set with
n elements?

Solution
There are n × . . . × }n = nm such functions.
| × n {z
m-times

Example
How many one-to-one functions are there from a set with m elements
to a set with n elements?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 73 / 84
Counting

Counting Functions
Example
How many functions are there from a set with m elements to a set with
n elements?

Solution
There are n × . . . × }n = nm such functions.
| × n {z
m-times

Example
How many one-to-one functions are there from a set with m elements
to a set with n elements?

Solution
There are n(n − 1)(n − 2) . . . (n − m + 1) such functions.
Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 73 / 84
Counting

Basic Counting Principles: The Sum Rule

The Sum Rule:

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 74 / 84
Counting

Basic Counting Principles: The Sum Rule

The Sum Rule:If a task can be done either in one of n1 or in one of n2


ways, where none of the set of n1 ways is the same as any of the n2
ways, then there are n1 + n2 ways to do the task.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 74 / 84
Counting

Basic Counting Principles: The Sum Rule

The Sum Rule:If a task can be done either in one of n1 or in one of n2


ways, where none of the set of n1 ways is the same as any of the n2
ways, then there are n1 + n2 ways to do the task.

Example
The IIITL must choose either a student from 2nd year IT, CS, CSAI, or
CSB as a representative for students’ committee.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 74 / 84
Counting

The Sum Rule

Counting Passwords

Exercise
A password consists of 12 to 14 characters, where each character is
an uppercase letter or a digit. Each password must contain at least
one digit. How many possible ways you can choose your passwords?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 75 / 84
Counting

The Sum Rule

Counting Passwords

Exercise
A password consists of 12 to 14 characters, where each character is
an uppercase letter or a digit. Each password must contain at least
one digit. How many possible ways you can choose your passwords?

Combining the sum and product rule allows us to solve more


complex problems.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 75 / 84
Counting

Counting Passwords

Solution
Let P be the total number of passwords, and let P12 , P13 , & P14 be the
passwords of length 12, 13, and 14.

By the sum rule P = P12 + P13 + P14 .

We find that: P12 = 3612 − 2612

P13 = 3613 − 2613

P14 = 3614 − 2614

Consequently, we have P = P12 + P13 + P14

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 76 / 84
Counting

Basic Counting Principles: Subtraction Rule

Subtraction Rule: If a task can be done either in one of n1 ways or in


one of n2 ways, then the total number of ways to do the task is n1 + n2
minus the number of ways to do the task that are common to the two
different ways.

This is also known as, the principle of inclusion-exclusion:

|A ∪ B| = |A| + |B| − |A ∩ B|

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 77 / 84
Counting

Counting Bit Strings

Exercise
How many bit strings of length 8 either start with a 1 bit or end with the
two bits 00?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 78 / 84
Counting

Counting Bit Strings

Exercise
How many bit strings of length 8 either start with a 1 bit or end with the
two bits 00?

Solution
Number of bit strings of length 8 that start with a 1 bit: 27 = 128

Number of bit strings of length 8 that end with bits 00: 26 = 64

Number of bit strings of length 8 that start with a 1 bit and end with
bits 00 : 25 = 32

Thus, the number is 128 + 64 − 32 = 160.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 78 / 84
Counting

The Pigeonhole Principle

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 79 / 84
Counting

The Pigeonhole Principle

Principle
If you want to place n pigeons into m pigeonholes, and n > m, then at
least one pigeonhole will contain more than one pigeon.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 79 / 84
Counting

The Pigeonhole Principle

Principle
If you want to place n pigeons into m pigeonholes, and n > m, then at
least one pigeonhole will contain more than one pigeon.
– familiar version

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 79 / 84
Counting

The Pigeonhole Principle

Principle
If you want to place n pigeons into m pigeonholes, and n > m, then at
least one pigeonhole will contain more than one pigeon.
– familiar version

Proof.
Suppose none of the m pigeonholes, has more than one pigeon.

Then the total number of pigeons would be at most m.

This contradicts the statement that we have n pigeons and n > m.

Thus, our assumption was wrong. Hence proved!

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 79 / 84
Counting

The Pigeonhole Principle


Corollary
A function f from a set with k + 1 elements to a set with k elements is not
one-to-one.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 80 / 84
Counting

The Pigeonhole Principle


Corollary
A function f from a set with k + 1 elements to a set with k elements is not
one-to-one.

Example
Among any group of 366 people, there must be at least 2 having the same
birthday.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 80 / 84
Counting

The Pigeonhole Principle


Corollary
A function f from a set with k + 1 elements to a set with k elements is not
one-to-one.

Example
Among any group of 366 people, there must be at least 2 having the same
birthday.

Problem
Let there be m + 1 people {P1 , P2 , . . . , Pm+1 } in a room. What should be the
value of m so that the probability that atleast one of the persons
{P2 , P3 , . . . , Pm+1 } shares birthday with P1 is greater than 12 ?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 80 / 84
Counting

The Pigeonhole Principle


Corollary
A function f from a set with k + 1 elements to a set with k elements is not
one-to-one.

Example
Among any group of 366 people, there must be at least 2 having the same
birthday.

Problem
Let there be m + 1 people {P1 , P2 , . . . , Pm+1 } in a room. What should be the
value of m so that the probability that atleast one of the persons
{P2 , P3 , . . . , Pm+1 } shares birthday with P1 is greater than 12 ?

Problem
How many people must be there in a room, so that the probability of atleast 2 of them sharing the
same birthday is greater than 12 ?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 80 / 84
Counting

The Pigeonhole Principle

Theorem
Let A be a finite set, partitioned into finite subsets S 1 , S 2 , . . . , S m . If
|A| = n > m, then at least one of these m subsets contains more than
one element.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 81 / 84
Counting

The Pigeonhole Principle

Theorem
Let A be a finite set, partitioned into finite subsets S 1 , S 2 , . . . , S m . If
|A| = n > m, then at least one of these m subsets contains more than
one element.

Principle (Generalized Pigeonhole)


If you want to place n pigeons into m pigeonholes with respective
capacities of c1 , c2 , . . . , cm and n > c1 + c2 + . . . + cm then at least one of
the pigeonholes will contain more pigeons than its capacity.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 81 / 84
Counting

The Pigeonhole Principle

Theorem
Let A be a finite set, partitioned into finite subsets S 1 , S 2 , . . . , S m . If
|A| = n > m, then at least one of these m subsets contains more than
one element.

Principle (Generalized Pigeonhole)


If you want to place n pigeons into m pigeonholes with respective
capacities of c1 , c2 , . . . , cm and n > c1 + c2 + . . . + cm then at least one of
the pigeonholes will contain more pigeons than its capacity.

Principle (Extended Pigeonhole)


If you want to place n pigeons into m pigeonholes, then one of the
m c + 1 pigeons.
pigeonholes will contain at least b n−1

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 81 / 84
Counting

The Pigeonhole Principle

Exercise
Given m integers a1 , . . . , am , ∃ k and ` with 0 ≤ k ≤ ` ≤ m. Prove that
ak+1 + ak+2 + · · · + a` is divisible by m.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 82 / 84
Counting

The Pigeonhole Principle

Exercise
Given m integers a1 , . . . , am , ∃ k and ` with 0 ≤ k ≤ ` ≤ m. Prove that
ak+1 + ak+2 + · · · + a` is divisible by m.

Solution
First, consider a1 , (a1 + a2 ), . . . , (a1 + a2 + · · · + am ).

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 82 / 84
Counting

The Pigeonhole Principle

Exercise
Given m integers a1 , . . . , am , ∃ k and ` with 0 ≤ k ≤ ` ≤ m. Prove that
ak+1 + ak+2 + · · · + a` is divisible by m.

Solution
First, consider a1 , (a1 + a2 ), . . . , (a1 + a2 + · · · + am ).
This list contains m numbers.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 82 / 84
Counting

The Pigeonhole Principle

Exercise
Given m integers a1 , . . . , am , ∃ k and ` with 0 ≤ k ≤ ` ≤ m. Prove that
ak+1 + ak+2 + · · · + a` is divisible by m.

Solution
First, consider a1 , (a1 + a2 ), . . . , (a1 + a2 + · · · + am ).
This list contains m numbers.
1 If m divides any of these, we are done.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 82 / 84
Counting

The Pigeonhole Principle

Exercise
Given m integers a1 , . . . , am , ∃ k and ` with 0 ≤ k ≤ ` ≤ m. Prove that
ak+1 + ak+2 + · · · + a` is divisible by m.

Solution
First, consider a1 , (a1 + a2 ), . . . , (a1 + a2 + · · · + am ).
This list contains m numbers.
1 If m divides any of these, we are done.
2 Otherwise, this means these all leave a remainder when divided by
m, in the set {1, . . . , m − 1}.
By the pigeonhole principle, there are 2 numbers, say
(a1 + · · · + ak ), (a1 + · · · + a` ) that leave the same remainder.
Thus (a1 + · · · + a` ) − (a1 + · · · + ak ) = ak+1 + · · · + a` is divisible by m.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 82 / 84
Counting

The Pigeonhole Principle

Exercise
1 Prove that in any set of 99 natural numbers, there is a subset of 15
of them with the property that the difference of any two numbers in
the subset is divisible by 7.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 83 / 84
Counting

The Pigeonhole Principle

Exercise
1 Prove that in any set of 99 natural numbers, there is a subset of 15
of them with the property that the difference of any two numbers in
the subset is divisible by 7.
2 There are 75 students in a class. Each got an A, B, C, or D on a
test. Show that there are at least 19 students who received the
same grade.

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 83 / 84
Counting

The Pigeonhole Principle

Exercise
1 Prove that in any set of 99 natural numbers, there is a subset of 15
of them with the property that the difference of any two numbers in
the subset is divisible by 7.
2 There are 75 students in a class. Each got an A, B, C, or D on a
test. Show that there are at least 19 students who received the
same grade.
3 How many students, each from one of the 36 states or union
territories, need to be enrolled in IIITL to ensure that there are at
least 12 from the same state or union territory?

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 83 / 84
Counting

The End

Thanks a lot for your attention!

Dhananjoy Dey (IIITL) Logic, Proofs, and Counting January 28, 2025 84 / 84

You might also like