0% found this document useful (0 votes)
10 views159 pages

DMS-Notes

The document outlines the syllabus and content for a course on Discrete Mathematical Structures, specifically focusing on Mathematical Logic. It covers topics such as basic connectives, truth tables, tautology, contradiction, logical equivalence, and rules of inference, along with examples and problems for practice. The document includes detailed explanations of logical connectives like negation, conjunction, disjunction, and conditional statements, as well as truth tables for various propositions.
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)
10 views159 pages

DMS-Notes

The document outlines the syllabus and content for a course on Discrete Mathematical Structures, specifically focusing on Mathematical Logic. It covers topics such as basic connectives, truth tables, tautology, contradiction, logical equivalence, and rules of inference, along with examples and problems for practice. The document includes detailed explanations of logical connectives like negation, conjunction, disjunction, and conditional statements, as well as truth tables for various propositions.
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/ 159

BCS405A

Discrete Mathematical Structures


(For the 4th Semester Computer Science and Engineering Stream)

Module 1
Mathematical Logic
Content

S.No Topic Page No


1 Syllabus 1-1
2 Basic Connectives and Truth table 1-4
3 Problems on Basic Connectives and Truth tables 5-7
4 Tautology and contradiction 8-12
5 Logic Equivalence-The Laws of Logic 13-15
6 Problems on The Laws of Logic 16-21
7 Logical implication 22-24
8 Rules of Inference 25-31
9 The Quantifiers 32-33
10 Problems on Quantifiers 33-38
11 Definition and Proofs of Theorems 39-42
Module-1
Mathematical Logic
☻Syllabus:
Fundamentals of Logic: Basic Connectives and Truth Tables, Logic Equivalence – The Laws
of Logic, Logical Implication – Rules of Inference. The Use of Quantifiers, Quantifiers,
Definitions and the Proofs of Theorems.
☻Basic Connectives and Truth table:
Proposition:
A proposition is a declarative sentence that is either true or false, but not both.
Example:
1. 2 is a prime number. (true)
2. All sides are equal in scalene triangle. (false)
3. 2+3=4. (false)
4. What is the time now?
5. Read this carefully.

From the above examples we note that 1, 2, 3 are proposition, whereas 4 and 5 are not the
propositions.
Logical Connectives and Truth table:
New propositions are obtained by starting with given propositions with the aid of words or
phrases like ‘not’, ‘and’, ‘if … then, and ‘if and only if’. Such words or phrases are called
Logical connectives.
1. Negation:
A proposition is obtained by inserting the word ‘not’ at an appropriate place in the given
proposition is called the negation of the given proposition.
The negation of a Proposition p is denoted by ¬ p (read ‘not p’). For any Proposition p, if p
is true, then ¬ p is false, and if p is false, then ¬ p is true. i.e., If the truth value of a proposition
p is 1 then the truth value of ¬ p is 0 and If the truth value of a proposition p is 0 then the truth
value of ¬ p is 1.
Example:
p: 4 is an even number.
¬ p: 4 is not an even number.
Truth table for Negation

p ¬p

0 1

1 0

2. Conjunction:
A compound proposition obtained by combining two given propositions by inserting the
word ‘and’ in between them is called the conjunction of the given proposition.

The conjunction of two propositions p and q is denoted by p ˄ q (read ‘p and q’). The
conjunction p ˄ q is true only when p is true and q is true, in all other cases it is false. i.e., the
truth value of the conjunction p ˄ q is 1 only when the truth value of p is 1 and truth value of
q is 1, in all other cases the truth value of p ˄ q is 0.
Example:

p: √2 is an irrational number.
q: 9 is a prime number.

p ˄ q: √2 is an irrational number and 9 is a prime number.


Truth table for conjunction

p q p˄q

0 0 0

0 1 0

1 0 0

1 1 1

3. Disjunction:
A compound proposition obtained by combining two given propositions by inserting the word
‘or’ in between them is called the disjunction of the given propositions.

The disjunction of two propositions p and q is denoted by p ˅ q (read ‘p or q’). The disjunction
p ˅ q is false only when p is false and q is false, in all other cases it is true. i.e., the truth value
of the disjunction p ˅ q is 0 only when the truth value of p is 0 and truth value of q is 0, in all
other cases the truth value of p ˅ q is 1.
Example:
p: All triangles are equilateral.
q: 2+5=7.
p ˅ q: All triangles are equilateral or 2+5=7.
Truth table for Disjunction

p q p˅q

0 0 0

0 1 1

1 0 1

1 1 1

4. Exclusive Disjunction:
We require that the compound proposition “p or q” to be true only when either p is true or q
is true but not both. The exclusive or is denoted by the ⊻.
The compound proposition p ⊻ q (read as either p or q but not both) is called as exclusive
disjunction of the propositions p and q. i.e., p ⊻ q = (p ˄ ¬ q) ⅴ (q ˄ ¬ p)
Example:
p:9 is a prime number
q: all triangles are isosceles.
p ⊻ q: Either 9 is prime number or all triangles are isosceles, but not both
Truth table for Exclusive Disjunction

p q p⊻q

0 0 0

0 1 1

1 0 1

1 1 0

5. Conditional:
A compound proposition obtained by combining two given propositions by using the words
‘if’ and ‘then’ at appropriate places is called a conditional.
The Conditional “If p, then q” is denoted by p → q and the Conditional “If q, then p” is
denoted by q → p. The Conditional p → q is false only when p is true and q is false, in all
other cases it is true. i.e., the truth value of the conditional p → q is 0 only when the truth
value of p is 1 and the truth value of q is 0, in all other cases the truth value of p → q is 1.
Example:
p: 3 is a prime number.
q: 9 is a multiple of 6
Truth table for Conditional
6.
p q p→q

0 0 1

0 1 1

1 0 0

1 1 1

Biconditional:
Let p and q be two sample propositions then the conjunction of the conditionals p → q and q
→ p is called the biconditional of p and q. It is denoted by p ↔ q and it is same as (p → q) ˄
(q → p) is read as “If p then q and if q then p”.
Truth table for Biconditional

p q p→q q→p p↔q

0 0 1 1 1

0 1 1 0 0

1 0 0 1 0

1 1 1 1 1
Problems:
1. Construct the truth tables for the following propositions.
(i). p ˄ (¬ q) (ⅱ). (¬ p) ˅ q (ⅲ). p → (¬ q) (ⅳ). (¬ p) ⊻ (¬ q)
Solution:
The desired truth tables are obtained by considering all possible combinations of the
truth values of p and q. the combined form of required truth table is given below

p q ¬p ¬q p ˄ (¬ q) (¬ p) ˅ q p → (¬ q) (¬ p) ⊻ (¬ q)

0 0 1 1 0 1 1 0

0 1 1 0 0 1 1 1

1 0 0 1 1 0 1 1

1 1 0 0 0 1 0 0

2. Let p, q and r be propositions having truth values 0, 0 and 1 respectively. Find the truth
values if the following compound propositions:
(ⅰ). (p ˅ q) ˅ r (ⅱ). (p ˄ q) ˄ r (ⅲ). (p ˄ q) → r
(ⅳ). p → (q ˄ r) (ⅴ). p ˄ (q → r) (ⅵ). p → (q →¬ r)
Solution:
(i) Since both p and q are false then (p ˅ q) is also false. Since r true it follows that (p ˅ q) ˅ r
is true. Thus, the truth value of (p ˅ q) ˅ r is 1.

(ii) Since both p and q are false, (p ˄ q) is false. Since (p ˄ q) is false and r is true (p ˄ q) ˄ r is
false. Thus, the truth value of (p ˄ q) ˄ r is 0.

(iii) Since (p ˄ q) is false and r is true, (p ˄ q) → r is true. Thus, the truth value of (p ˄ q) → r
is 1.

(iv) Since q is false and r is true, (q ˄ r) is false. Also, p is false, therefore p → (q ˄ r) is true.
Thus, the truth value of p → (q ˄ r) is 1.

(v) Since r is true and q is false (q → r) is true. Also, p is false. Therefore, p ˄ (q → r) is false.
Thus, the truth value of p ˄ (q → r) is 0

(vi) Since r is true, ¬ r is false. Since q is false, q → (¬ r) is true. Also, p is false. Therefore,
p → (q →¬ r) is true. Thus, the truth value of p → (q→¬ r) is 1.
3. Indicate how many rows are needed in the truth table for the compound proposition
(p ˅ (¬ q)) ↔ ((¬ r) ˄ s) → t. Find the truth value of the proposition if p and r, are true
and q, s, t, are false.
Solution:
The given compound proposition contains five primitives p, q, r, s, t. Therefore, the number of
possible combinations of the truth values of these components which we have to consider is
25=32. Hence 32 rows are needed in the truth table for the given compound proposition.
Next, suppose that p and r, are true and q, s, t are false, then ¬ q is true and ¬ r is false. Since p
is true and ¬ q is true, (p ˅ (¬ q)) is true on the other hand, since ¬ r is false and s is false, ¬ r
˄ s is false. Also, t is false. Hence ((¬ r) ˄ s) →t is true.
Since (p ˅ (¬ q)) is true and ((¬ r) ˄ s) → t is true, it follows that the truth values of the given
propositions (p ˅ (¬ q)) ↔ ((¬ r ˄ s) → t is 1.

4. Let p: A circle is a conic, q: √5 is a real number, r: Exponential series is convergent.


Express the following compound Proposition in words:
(i). p ˄ (¬ q) (ii). (¬ p) ˄ q (iii) q → (¬ p)
(iv). p ⊻ (¬ q) (v). p → (q ⊻ r) (vi). ¬ p ↔ q
Solution:

(i) A circle is a conic and √5 is not a real number.


(ii) A circle is not a conic and √5 is a real number.
(iii) If √5 is a real number, then a circle is not a conic.
(iv) Either a circle is a conic or √5 is not a real number (but not both).
(v) If a circle is a conic then either √5 is a real number or the exponential series is
convergent (but not both).

(vi) If a circle is not a conic then √5 is a real number and if √5 is a real number then a
circle is not a conic.

5. Construct the truth table for the following compound propositions:


(ⅰ). (p ˄ q) → ¬ r (ⅱ). q ˄ ((¬ r) → p)
Solution:
The required truth table are shown below in a combined form
p q r ¬r p˄q (p ˄ q) → ¬ r (¬ r) → p q ˄ ((¬ r) → p)

0 0 0 1 0 1 0 0

0 0 1 0 0 1 1 0

0 1 0 1 0 1 0 0

0 1 1 0 0 1 1 1

1 0 0 1 0 1 1 0

1 0 1 0 0 1 1 0

1 1 0 1 1 1 1 1

1 1 1 0 1 0 1 1
☻Tautology and Contradiction:

A compound proposition which is true for all possible truth values of its components is called
a tautology.
A compound proposition which is false for all possible truth values of its components is called
Contradiction or an absurdity.
A compound proposition that can be true or false is called a contingency. In other words, a
contingency is a compound proposition which is neither a tautology nor a contradiction.

Problems:

1. Show that for any proposition p and q, the compound proposition p → (p ˅ q) is a tautology
and the compound proposition p ˄ (¬ p ˄ q) is called contradiction.
Solution:
Let us first prepare the truth tables for p → (p ˅ q) and p ˄ (¬ p ˄ q). these truth tables are
shown below in the combined form.

p q p˅q p → (p ˅ q) ¬p (¬ p ˄ q) p ˄ (¬ p ˄ q)

0 0 0 1 1 0 0

0 1 1 1 1 1 0

1 0 1 1 0 0 0

1 1 1 1 0 0 0

From the above table we note that, for all possible values of p and q the compound proposition
p → (p ˅ q) is true and the compound proposition p ˄ (¬ p ˄ q) is false.
Therefore p ˄ (¬ p ˄ q) is contradiction and p → (p ˅ q) is tautology.

2. Prove that, for any proposition p, q, r the compound proposition


(p → q) ˄ (q → r) → (p → r) is a tautology

Solution:
The following truth table gives the required result.
p q r p→q q→r (p → q) ˄ (q → r) p→r (p → q) ˄ (q → r) → (p → r)

0 0 0 1 1 1 1 1

0 0 1 1 1 1 1 1

0 1 0 1 0 0 1 1

0 1 1 1 1 1 1 1

1 0 0 0 1 0 0 1

1 0 1 0 1 0 1 1

1 1 0 1 0 0 0 1

1 1 1 1 1 1 1 1

3. Prove that for any proposition p, q, r the compound proposition


(p ˅ q) ˅ (p → r) ˄ (q → r) is tautology.
Solution:
The following truth table gives the required result.

p q r p→r q→r (p → r) ˄ (q → r) p˅q (p ˅ q) ˅ (p → r) ˄ (q → r)

0 0 0 1 1 1 0 1

0 0 1 1 1 1 0 1

0 1 0 1 0 0 1 1

0 1 1 1 1 1 1 1

1 0 0 0 1 0 1 1

1 0 1 1 1 1 1 1

1 1 0 0 0 0 1 1

1 1 1 1 1 1 1 1

4. Prove that for any proposition p, q, r the compound proposition


(p → q) ˅ (p → r) ↔ (p → (q ˅ r)) is tautology.
Solution:
The following truth table gives the required result.

p q r p→q p→r (p → q) ˅ (p → r) q˅r p → (q ˅ r) (p →q) ˅ (p → r)


↔ (p → (q ˅ r))

0 0 0 1 1 1 0 1 1

0 0 1 1 1 1 1 1 1

0 1 0 1 1 1 1 1 1

0 1 1 1 1 1 1 1 1

1 0 0 0 0 0 0 0 1

1 0 1 0 1 1 1 1 1

1 1 0 1 0 1 1 1 1

1 1 1 1 1 1 1 1 1

5. Prove that for any proposition p, q, r the compound proposition


[(p → q) ˄ (p → r)] → (p → r)) is tautology.

Solution:
The following truth table gives the required result.

p q r p→q q→r (p → q) ˄ (p → r) p→r (p →q) ˄ (p → r) → (p → r)

0 0 0 1 1 1 1 1

0 0 1 1 1 1 1 1

0 1 0 1 0 0 1 1

0 1 1 1 1 1 1 1

1 0 0 0 1 0 0 1

1 0 1 0 1 0 1 1

1 1 0 1 0 0 0 1

1 1 1 1 1 1 1 1

6. Prove that for any proposition p, q, r the compound proposition


[(p ˅ q) ˄ {(p → r) ˄ (q → r)}] → r is tautology.
Solution:
The following truth table proves the gives result.

p q r p→r q→r (p → r) ˄ p˅q (p ˅ q) ˄ {(p → r) [(p ˅ q) ˄ {(p → r)


(q → r) ˄ (q → r)} ˄ (q → r)}] → r

0 0 0 1 1 1 0 0 1

0 0 1 1 1 1 0 0 1

0 1 0 1 0 0 1 0 1

0 1 1 1 1 1 1 1 1

1 0 0 0 1 0 1 0 1

1 0 1 1 1 1 1 1 1

1 1 0 0 0 0 1 0 1

1 1 1 1 1 1 1 1 1

7. Verify the Compound Proposition (p ˅ q) → r ↔ (¬ r → ¬ (p ˅ q)) is tautology or not.

p q r ¬r p˅q (p ˅ q) → r ¬ (p ˅ q) ¬ r → ¬ (p ˅ q) (p ˅ q) → r ↔ (¬ r →
¬ (p ˅ q))

0 0 0 1 0 1 1 1 1

0 0 1 0 0 1 1 1 1

0 1 0 1 1 0 0 0 1

0 1 1 0 1 1 0 1 1

1 0 0 1 1 0 0 0 1

1 0 1 0 1 1 0 1 1

1 1 0 1 1 0 0 0 1

1 1 1 0 1 1 0 1 1

Hence the compound Proposition (p ˅ q) → r ↔ (¬ r → ¬ (p ˅ q)) is tautology


8. Prove that for any proposition p, q, r the compound proposition
{p → (q → r)} → {(p → q) → (p → r)} is tautology.
Solution:
The following truth table gives the required result.

p q r p→q p→r q → r p → (q → r) {(p → q) → {p → (q → r)} → {(p →


(p → r) q) → (p → r)}

0 0 0 1 1 1 1 1 1

0 0 1 1 1 1 1 1 1

0 1 0 1 1 0 1 1 1

0 1 1 1 1 1 1 1 1

1 0 0 0 0 1 1 1 1

1 0 1 0 1 1 1 1 1

1 1 0 1 0 0 0 0 1

1 1 1 1 1 1 1 1 1
☻Logic equivalence:
Two statement s1, s2 are said to be logically equivalent, and we write s1↔s2, when the statement
s1 is true (respectively false) if and only if the statement s2 is true (respectively false). Or the
biconditional s1↔s2 is a tautology
Problems:

1. For any two propositions p, q Prove that (p → q)⇔( ¬ p) ˅ q


Solution: The following truth table gives the required result.

p q ¬p ¬p˅q p→q

0 0 1 1 1

0 1 1 1 1

1 0 0 0 0

1 1 0 1 1

From the column 4 and 5 of the above truth table, we find that ¬ p ˅ q and p → q has the same
truth values of p and q. Therefore (p → q)⇔( ¬ p) ˅ q.

2. For any two propositions p, q Prove that (p →¬ q)⇔ (q → ¬ p)


Solution: The following truth table gives the required result.

p q ¬p ¬q p→¬q q→¬p

0 0 1 1 1 1

0 1 1 0 1 1

1 0 0 1 1 1

1 1 0 0 0 0

From the column 5 and 6 of the above truth table, we find that p → ¬ q and q → ¬ p has the
same truth values of p and q. Therefore (p →¬ q)⇔ (q → ¬ p).
3. For any two propositions p, q Prove that (p ⊻ q)⇔(p ˅ q) ˄ ¬ (p ˄ q).
Solution: The following truth table gives the required result.
p q (p ˅ q) (p ⊻ q) (p ˄ q) ¬ (p ˄ q) (p ˅ q) ˄ ¬ (p ˄ q)

0 0 0 0 0 1 0

0 1 1 1 0 1 1

1 0 1 1 0 1 1

1 1 1 0 1 0 0

From the column 4 and 7 of the above truth table, we find that (p ⊻ q) and (p ˅ q) ˄ ¬ (p ˄ q)
has the same truth values of p and q. Therefore (p ⊻ q)⇔(p ˅ q) ʌ¬ (p ˄ q).
4. For any propositions p, q, r. Prove that [(p → (q → r)]⇔ [(p ˄¬ r) → ¬ q)]
Solution: The following truth table gives the required result.

p q r ¬q ¬r q→r p ˄¬ r p → (q → r) (p ˄¬ r) → ¬ q)

0 0 0 1 1 1 0 1 1

0 0 1 1 0 1 0 1 1

0 1 0 0 1 0 0 1 1

0 1 1 0 0 1 0 1 1

1 0 0 1 1 1 1 1 1

1 0 1 1 0 1 0 1 1

1 1 0 0 1 0 1 0 0

1 1 1 0 0 1 0 1 1

From the column 8 and 9 of the above truth table, we find that [p → (q → r)] and [(p ˄¬ r) →
¬ q)] has the same truth values of p and q. Therefore [(p → (q → r)]⇔ [(p ˄¬ r) → ¬ q)].
5. Show that the compound propositions p ˄ ((¬ q) ˅ r) and p ˅ (q ˄ (¬ r)) are not logically
equivalent.
Solution: The following truth table gives the required result
p q r ¬q ¬r ¬q˅r q˄¬r p ˄ ((¬ q) ˅ r) p ˅ (q ˄ (¬ r))

0 0 0 1 1 1 0 0 0

0 0 1 1 0 1 0 0 0

0 1 0 0 1 0 1 0 1

0 1 1 0 0 1 0 0 0

1 0 0 1 1 1 0 1 1

1 0 1 1 0 1 0 1 1

1 1 0 0 1 0 1 0 1

1 1 1 0 0 1 0 1 1

From the last two rows we note that p ˄ ((¬ q) ˅ r) and p ˅ (q ˄ (¬ r)) do not have the same
values in all possible situations. Therefore, they are not logically equivalent.
The Laws of Logic:
For any primitive statements p, q, r any tautology To and any contradiction Fo

Sl. No Name of laws Laws of logic


1 Laws of double negation ¬ ¬ p⇔p
¬ (p ˅ q)⇔(¬ p ˄ ¬ q)
2 De Morgan’s laws
¬ (p ˄ q)⇔(¬ p ˅ ¬ q)
(p ˅ q)⇔(q ˅ p)
3 Commutative laws
(p ˄ q)⇔(q ˄ p)
p ˅ (q ˅ r) ⇔ (p ˅ q) ˅ r
4 Associative laws
p ˄ (q ˄ r) ⇔ (p ˄ q) ˄ r
p ˅ (q ˄ r)⇔(p ˅ q) ˄ (p ˅ r)
5 Distributive laws
p ˄ (q ˅ r)⇔(p ˄ q) ˅ (p ˄ r)
p ˅ p⇔p
6 Idempotent laws
p ˄ p⇔p
p ˅ Fo⇔p
7 Identity laws
p ˄ To⇔p
p ˅ ¬ p⇔To
8 Inverse laws
p ˄ ¬ p⇔Fo
p ˅ To⇔To
9 Domination laws
p ˄ Fo⇔Fo
p ˅ (p ˄ q)⇔p
10 Absorption laws
p ˄ (p ˅ q)⇔p
Problems:

1. Prove distributive law p ˅ (q ˄ r)⇔(p ˅ q) ˄ (p ˅ r)


Solution:
p q r q˄r p ˅ (q ˄ r) p˅q p˅r (p ˅ q) ˄ (p ˅ r)

0 0 0 0 0 0 0 0

0 0 1 0 0 0 1 0

0 1 0 0 0 1 0 0

0 1 1 1 1 1 1 1

1 0 0 0 1 1 1 1

1 0 1 0 1 1 1 1

1 1 0 0 1 1 1 1

1 1 1 0 1 1 1 1

From columns 5 and 8 of the above table, we find that {p ˅ (q ˄ r)} and {(p ˅ q) ˄ (p ˅ r)}
has same truth values in all possible situations. Therefore, p ˅ (q ˄ r)⇔(p ˅ q) ˄ (p ˅ r).
Similarly, we can prove p ˄ (q ˅ r)⇔(p ˄ q) ˅ (p ˄ r).

2. Prove De Morgan’s law ¬ (p ˅ q) ⇔ ¬ p ˄ ¬ q


Solution:
p q ¬p ¬q p˅q ¬ (p ˅ q) ¬p˄¬q

0 0 1 1 0 1 1

0 1 1 0 1 0 0

1 0 0 1 1 0 0

1 1 0 0 1 0 0

From columns 5 and 8 of the above table, we find that ¬ (p ˅ q) and ¬ p ˅ ¬ q has same truth
values in all possible situations. Therefore, ¬ (p ˅ q) ⇔ ¬ p ˄ ¬ q.
Similarly, we can prove ¬ (p ˄ q) ⇔ ¬ p ˅ ¬ q
Law for the negation of a conditional:
Given a conditional p → q, its negation is obtained by using the following law.
¬ (p → q)⇔[p ˄ (¬ q)]
Proof:
The following table gives the truth values of ¬ (p → q) and p ˄ (¬ q) for all possible truth
values of p and q.
p q p→q ¬ (p → q) ¬q p ˄ (¬ q)

0 0 1 0 1 0

0 1 1 0 0 0

1 0 0 1 1 1

1 1 1 0 0 0

We note that ¬ (p → q) and p ˄ (¬ q) have same truth values in all possible situations. Hence,
¬ (p → q)⇔[p ˄ (¬ q)].

Problems:
1. Simplify the following compounds propositions using the laws of logic.
(ⅰ) p ˅ q ˄ [ ¬ {(¬ p) ˄ q}] (ⅱ) p ˅ q ˄ [ ¬ {(¬ p) ˅ q}]
(ⅲ) ¬ [ ¬ {(p ˅ q) ˄ r} ˅ (¬ q)]
Solution:
(i) p ˅ q ˄ [ ¬ {(¬ p) ˄ q}]
= p ˅ q ˄ {(¬ ¬ p) ˅ (¬ q)} By De Morgan’s law
= p ˅ q ˄ {p ˅ (¬ q)} By Law of double negation
= p ˅ {q ˄ (¬ q)} By Distributive law
= p ˅ Fo By Inverse law
=p By Identity law

(ii) p ˅ q ˄ [ ¬ {(¬ p) ˅ q}]


= (p ˅ q) ˄ {p ˄ (¬ q)}
= {(p ˅ q) ˄ p)} ˄ (¬ q) Using Associative law
= {p ˄ (p ˅ q)} ˄ (¬ q) Using Commutative law
= p ˄ (¬ q) Using Absorption law
(iii) ¬ [ ¬ {(p ˅ q) ˄ r} ˅ (¬ q)]
= ¬ [ ¬ {((p ˅ q) ˄ r) ˄ q}] Using De Morgan’s law
= ((p ˅ q) ˄ r) ˄ q Law of Double negation
= (p ˅ q) ˄ (q ˄ r) Using Associative and Commutative law
= {(p ˅ q) ˄ q} ˄ r Using Associative law
=q˄r Using Associative law
2. Prove the following logically without using truth table.
(i). [p ˅ q ˅ (¬ p ˄ ¬ q ˄ r)]⇔ p ˅ q ˅ r (ii). [(¬ p ˅ ¬ q) → (p ˄ q ˄ r)]⇔ p ˄ q
(iii). p→ (q → r) ⇔ (p ˄ q) →r
Solution:

(ⅰ) [p ˅ q ˅ (¬ p ˄ ¬ q ˄ r)]⇔ p ˅ q ˅ r

We have, ¬ p ˄ ¬ q ˄ r ⇔ ¬ (p ˅ q) ˄ r By De Morgan’s law

Therefore, [pⅴq ⅴ (¬ p ˄ ¬ q ˄ r)] ⇔ (pⅴq) ⅴ (¬ (pⅴq) ˄ r)

⇔ [(pⅴq) ⅴ¬ (pⅴq)] ˄ (p ⅴ q ⅴ r) By Distributive law

⇔ To ˄ (p ⅴ q ⅴ r) By Inverse and Associative law

⇔(p ⅴ q ⅴ r) By Commutative law

(ii) [(¬ pⅴ¬ q) → (p ˄ q ˄ r)]⇔ p ˄ q

We have, [(¬ pⅴ¬ q) → (p ˄ q ˄ r)]⇔ ¬ (¬ pⅴ¬ q) ⅴ (p ˄ q ˄ r)

Because (u → v) ⇔ (¬ u ⅴ v)

⇔ (p ˄ q) ⅴ [(p ˄ q) ˄ r] By De Morgan’s law and Associative law

⇔p˄q By Absorption law

(ⅲ) we have, p → (q → r) ⇔ ¬ p ⅴ (¬ q ⅴ r) Because (u → v) ⇔ (¬ u ⅴ v)

⇔ (¬ p ⅴ ¬ q) ⅴ r Associative law

⇔ (p ˄ q) ⅴ r De-Morgan’s law

⇔ (p ˄ q) →r Because (u → v) ⇔ (¬ u ⅴ v)
Duality:

Let s be a statement. If s contains no logical connectives other than ˄ and ⅴ, the dual of s
denoted by sd, is the statement obtained from s by replacing each occurrence of ˄ and ⅴ by ⅴ
and ˄ respectively, and each occurrence of To and Fo by Fo and To, respectively.
Example: Given the primitive statements p, q, r and the compound statements

s: (p ˄ (¬ q)) ⅴ (r ˄ To)

sd: (p ⅴ (¬ q)) ˄ (r ⅴ Fo)

Principle of Duality:
Let s and t be two statements that contains no logical connections than ˄ and ⅴ. If s⇔t, then
sd⇔td.
Problems:
1. Write duals of the following propositions.
(i). p → q (ii). (p → q) → r (iii). p → (q → r)

Solution: we recall that (u → v) ⇔ (¬ u ⅴ v)


Therefore, by the principle of duality we find that

(ⅰ) (p → q)d ⇔ (¬ p ⅴ q)d ⇔ ¬ p ˄ q

(ⅱ) [(p → q) → r]d ⇔ [ ¬ (¬ p ⅴ q) ⅴ r]d

⇔ [ (p ˄ ¬ q) ⅴ r]d

⇔ (p ⅴ ¬ q) ˄ r

(iii) [p→ (q → r)]d ⇔ [ ¬ p ⅴ (q →r)]d


⇔ [ ¬ p ⅴ (¬ q ⅴ r)]d

⇔ ¬ p ˄ (¬ q ˄ r)
2. Write duals of the following propositions.
(i). q → p (ii). (p ⅴ q) ˄ r (iii). (p ˄ q) ⅴT0
(iv). p → (q ˄ r) (v). p ↔ q (vi). p ⊻ q

Solution: we recall that (u → v) ⇔ (¬ u ⅴ v)


Therefore, by the principle of duality we find that

(ⅰ) (q → p)d ⇔ (¬ q ⅴ p)d ⇔ ¬ q ˄ p

(ⅱ) [(p ⅴ q) ˄ r]d ⇔ (p ˄ q) ⅴr

(iⅱ) [(p ˄ q) ⅴT0]d ⇔ (p ⅴ q) ˄ F0


(iv) [p → (q ˄ r)]d ⇔ [¬ p ⅴ (q ˄ r)]d ⇔ ¬ p ˄ (q ⅴ r)

(v) [p ↔ q]d ⇔ [(p → q) ˄ (q → p)]d ⇔ [(¬ pⅴq) ˄ (¬ qⅴp)]d

⇔ (¬ p ˄ q) ⅴ (¬ q ˄ p)

(vi) [p ⊻ q]d ⇔ [(p ˄ ¬ q) ⅴ (q ˄ ¬ p)]d ⇔ [( pⅴ¬ q) ˄ (qⅴ¬ p)]

NAND and NOR:


The compound proposition ¬ (p ˄ q) is read as “Not p and q” and also denoted by (p ↑ q). The
symbol ↑ is called NAND connective.

The compound proposition ¬ (p ⅴ q) is read as “Not p or q” and also denoted by (p ↓ q). The
symbol ↓ is called the NOR connective.
Truth table

p q p↑q p↓q

0 0 1 1

0 1 1 0

1 0 1 0

1 1 0 0

Where p ↑ q = ¬ (p ˄ q) ⇔ ¬ p ⅴ ¬ q and p ↓ q = ¬ (p ⅴ q) ⇔¬ p ˄ ¬ q

Problems:
1. For any propositions p, q Prove the following
(i). ¬ (p ↓ q) ⇔ ¬ p ↑ ¬ q (ii). ¬ (p ↑ q) ⇔ ¬ p ↓ ¬ q
Solution: Using definition, we find that

i. ¬ (p ↓ q) ⇔ ¬ [ ¬ (pⅴq)]
⇔ ¬ [ ¬ p ˄ ¬ q]
⇔¬ p ↑ ¬ q
ii. ¬ (p ↑ q) ⇔ ¬ [ ¬ (p ˄ q)]
⇔ ¬ [ ¬ p ⅴ ¬ q]

⇔ ¬p↓¬q
2. For any propositions p, q, r Prove the following
(i). p ↑ (q ↑ r) ⇔ ¬ pⅴ (q ˄ r) (ii). (p ↑ q) ↑ r ⇔ (p ˄ q) ⅴ¬ r
(iii). p ↓ (q ↓ r) ⇔ ¬ p ˄ (q ⅴr) (iv). (p ↓ q) ↓ r ⇔ (p ⅴ q) ˄ ¬ r
Solution: Using definition, we find that
(i). p ↑ (q ↑ r) ⇔ ¬ [p ˄ (q ↑ r))]

⇔ ¬ [p ˄ ¬ (q ˄ r)]

⇔ ¬ p ⅴ ¬ [ ¬ (q ˄ r)]

⇔ ¬ pⅴ (q ˄ r)

(ii). (p ↑ q) ↑ r ⇔ ¬ [(p ↑ q) ˄ r]

⇔ ¬ [¬ (p ˄ q) ˄ r]

⇔ ¬ [¬ (p ˄ q)] ⅴ ¬ r

⇔ (p ˄ q) ⅴ¬ r

(iii). p ↓ (q ↓ r) ⇔ ¬ [p ⅴ (q ↓ r))]

⇔ ¬ [p ⅴ ¬ (q ⅴ r)]

⇔ ¬ p ˄ ¬ [ ¬ (q ⅴ r)]

⇔ ¬ p ˄ (q ⅴr)

(iv). (p ↓ q) ↓ r ⇔ ¬ [(p ↓ q) ⅴ r]

⇔ ¬ [¬ (p ⅴ q) ⅴ r]

⇔ ¬ [¬ (p ⅴ q)] ˄ ¬ r

⇔ (p ⅴ q) ˄ ¬ r
Converse, Inverse and Contrapositive:
Consider a conditional p → q then:
1. q → p is called the converse of p → q.
2. ¬ p →¬ q is called the inverse of p → q.
3. ¬ q →¬ p is called the contrapositive of p → q.
Truth table for converse, inverse and contrapositive
p q ¬p ¬q p→q q→p ¬ p→¬ q ¬ q →¬ p

0 0 1 1 1 1 1 1

0 1 1 0 1 0 0 1

1 0 0 1 0 1 1 0

1 1 0 0 1 1 1 1

Note: 1. A conditional and its contrapositive are logically equivalent i.e., p → q ⇔ ¬ q →¬ p


2. A converse and the inverse of a conditional are logically equivalent
q → p ⇔ ¬ p → ¬q
Logical implication:
Logical implication is a type of relationship between two statements or sentences. The relation
translates verbally into "logically implies" or "if/then" and is symbolized by a double-lined
arrow pointing toward the right (⇒). If p and q represent statements, then p ⇒ q means "p
implies q" or "If p, then q." The word "implies" is used in the strongest possible sense.
Example:
Suppose the sentences p and q are assigned as follows:
p = The sky is overcast.
q = The sun is not visible.
In this instance, p ⇒ q is a true statement (assuming we are at the surface of the earth, below
the cloud layer.) However, the statement p ⇒ q is not necessarily true; it might be a clear night.
Logical implication does not work both ways. However, the sense of logical implication is
reversed if both statements are negated. i.e., ( p ⇒ q) ⇒ (¬ q ⇒ ¬ p)
Using the above sentences as examples, we can say that if the sun is visible, then the sky is not
overcast. This is always true. In fact, the two statements p ⇒ q and ¬ q ⇒ ¬ p are logically
equivalent.
Necessary and Sufficient Conditions:
Consider two propositions p and q whose truth values are interrelated. Suppose that p ⇒ q.
Then in order that q may be true it is sufficient that p is true. Also, if p is true then it is necessary
that q is true. In view of this interpretation, all of the following statements are taken to carry
the same meaning:
(i). p ⇒ q (ii). p is sufficient for q (iii). q is necessary for p

Problems:
1. State the converse inverse and contrapositive of
i) If the triangle is not isosceles, then it is not equilateral
ii) If the real number x2 is greater than zero, then x is not equal to zero.
iii) If a quadrilateral is a parallelogram, then its diagonals bisect each other.
Solution:
(i) p: Triangle is not isosceles and q: Triangle is not equilateral.
Implication: p → q. if triangle is not isosceles then it is not equilateral.
Converse: q → p. if a triangle is not equilateral then it is not isosceles.
Inverse: ¬ p →¬ q. if a triangle is isosceles then it is equilateral.
Contrapositive: ¬ q→¬ p: if a triangle is equilateral then it is isosceles.

(ii) p: A real number x2 is greater than zero and q: x is not equal to zero.
Implication: p → q. if a real number x2 is greater than zero then, x is not equal to zero.
Converse: q → p. if a real number x is not equal to zero then, x2 is greater zero.
Inverse: ¬ p→¬ q. if a real number x2 is not greater than zero then, x is equal to zero.
Contrapositive: If a real number x is equal to zero then, x2 is not greater than zero
(ⅰii) p: If Quadrilateral is a parallelogram and q: its Diagonals Bisects each other.
Implication: p → q. If Quadrilateral is a parallelogram, then its diagonals bisects each
other.
Converse: q → p. If the diagonals of the Quadrilateral bisect each other, then it is a
parallelogram.
Inverse: ¬ p →¬ q. If Quadrilateral is not a parallelogram, then its diagonals do not bisect
each other.
Contrapositive: ¬ q→¬ p: If the diagonals of the Quadrilateral do not bisect each other,
then it is a not a parallelogram.

2. Write down the following statements in the ‘Necessary and Sufficient Condition’
Language.
i) If the triangle is not isosceles, then it is not equilateral
ii) If the real number x2 is greater than zero, then x is not equal to zero.
iii) If a quadrilateral is a parallelogram, then its diagonals bisect each other.
Solution:
Necessary Condition Language:
(i). For a triangle to be non-isosceles it is necessary that is not equilateral.
(ii). A necessary condition for a real number x2 to be greater than zero is that x is not equal to
zero.
(iii). A necessary condition for a quadrilateral to be a parallelogram is that its diagonals bisect
each other.
Necessary Condition Language:
(i). A sufficient condition for a triangle to be not equilateral is that it is not isosceles.
(ii). For a real number x, the condition x2 to be greater than zero is sufficient for x to be not
equal to zero.
(iii). A sufficient condition for the diagonals of a quadrilateral to bisect each other is that the
quadrilateral is a parallelogram.
☻Rules of inference:
Let us consider the implication (p1 ˄ p2 ˄ …. ˄ pn) → q
Here n is a positive integer, the statements p1, p2, …. pn are called the premises of the argument
and q is called the conclusion of the argument.
We write the above argument in the following tabular form:
𝑝1
𝑝2
𝑝3


𝑝𝑛
∴q
The preceding argument is said to be valid if whenever each of the premises p1, p2, …. pn is
true, then the conclusion q is likewise true.
i.e., (p1 ˄ p2 ˄ …. ˄ pn) → q is valid when (p1 ˄ p2 ˄ …. ˄ pn) ⇒ q
It is to be emphasized that in an argument, the premises are always taken to be true whereas
the conclusion may be true or false. The conclusion is true only in the case of valid argument.
There exist rules of logic which can be employed for establishing the validity of arguments.
These rules are called Rules of Inference.

Name of the rule and rule of inference

Sl.no Rules of inference Name of rule


p
p→q Rule of Detachment
1
(modus pones)
∴q
p→q
2 q→r Law of Syllogism
∴p→r
p→q
3 ¬q Modus Tollens
∴¬ p
p
4 q Rule of Conjunction
∴p˄q
pⅴq
5 ¬𝑝 Rule of Disjunctive Syllogism
∴𝑞
¬ p → Fo
6 Rule of Contradiction
∴p
p˄q
7 Rule of Conjunctive Simplification
∴p
p
8 Rule of Disjunctive Amplification
∴ pⅴq
Problems:
1. Test whether the following is valid argument.
If Sachin hits a century, then he gets a free car.
Sachin hits a century.
∴ Sachin gets a free car.
Solution: Let p: Sachin hits a century.
q: Sachin gets a free car.
The given statement reads
p→q
𝑝
∴𝑞
In view of Modus Pones Rule, this is a valid argument.
2. Test the validity of the following arguments.
If Ravi goes out with friends, he will not study.
If Ravi does not study, his father will become angry.
His father is not angry.
∴ Ravi has not gone out with friends.
Solution: Let p: Ravi goes out with friends.
q: Ravi does not study.
r: His father gets angry.
Then the given argument reads.
p→q
q→r
¬𝑟
∴¬𝑝
This argument is logically equivalent to (Using the rule of syllogism)
𝑝→𝑟
¬𝑟
∴¬𝑝
In view of Modus Tollens Rule, this is a valid argument.
3. Test whether the following is valid argument.
If Sachin hits a century, then he gets a free car.
Sachin does not get a free car.
∴ Sachin has not hit a century
Solution: Let p: Sachin hits a century.
q: Sachin gets a free car.
The given statement reads
p → q
¬q
∴¬𝑝
In view of Modus Tollens Rule, this is a valid argument.
4. Test the validity of the following argument
If I study, then I’ll not fail in the examination.
If I do not watch tv in the evenings, I will study.
I failed in the examination.
∴ I must have watched tv in the evenings.
Solution: Let p: I study
q: I fail in the examination
r: I watch tv in the evenings.
Then the given argument reads
𝑝 → ¬𝑞
¬𝑟 → 𝑝
𝑞
∴𝑟
This argument is logically equivalent to
𝑞 → ¬𝑝
¬𝑝 → 𝑟
𝑞
∴𝑟

(because (p →¬ q) ⇔ (¬ ¬ q → ¬ p))

(because (¬ r → p) ⇔ (¬ p → r))

This is equivalent to (Using rule of syllogism)


𝑞→𝑟
𝑞
∴𝑟
In view of Modus Pones Rule, this is a valid argument.
5. Test the validity of the following argument
I will become famous or I will not become a musician.
I will become a musician.
∴ I will become famous.
Solution: Let p: I will become famous
q: I will become a musician
Then the given argument reads
𝑝ⅴ¬ 𝑞
q
∴p
This argument is logically equivalent to
𝑞→𝑝
𝑞
∴𝑝
Because 𝑝ⅴ¬ 𝑞 ⇔ ¬ 𝑞ⅴ𝑝 ⇔ 𝑞 → 𝑝
In view of Modus Pones Rule, this is a valid argument.
6. Test the validity of the following argument
I will get grade A in this course or I will not graduate.
If I do not graduate, I will join army.
I got grade A.
∴ I will not join army.
Solution: Let p: I will get grad A in this course
q: I do not graduate.
r: I will join army.
Then the given argument reads
𝑝ⅴ 𝑞
q→𝑟
𝑝
∴ ¬𝑟
This argument is logically equivalent to
¬𝑞 → 𝑝
¬𝑟 →¬q
𝑝
∴ ¬𝑟
Because 𝑝ⅴ¬ 𝑞 ⇔ 𝑞ⅴ𝑝 ⇔ ¬ 𝑞 → 𝑝 and using Contrapositive.
This is equivalent to (Using rule of syllogism)
¬𝑟 → 𝑝
𝑝
∴ ¬𝑟
This is not a valid argument.
7. Test whether the following is valid argument.
If Sachin hits a century, then he gets a free car.
Sachin gets a free car.
∴ Sachin has hit a century.
Solution: Let p: Sachin hits a century.
q: Sachin gets a free car.
The given statement reads
p→q
𝑞
∴𝑝
We note that if p → q and q are true, there is no rule which asserts that p must be true.
Indeed, p can be false when p → q and q are true. See the table below.
p q p→q (p → q) ˄ q
0 1 1 1

Thus, [(p → q) ˄ q] → p is not a tautology. Hence, this is not a valid argument.


8. Test the Validity of the following argument:

(i). p˄q (ii). p (iii). p→r


p → (q → r) p→¬q q→r

∴ r ¬q→¬r ∴ (p ⅴ q) → r
∴ ¬r
Solution:
(i). Since p ˄ q is true, both p and q are true. Since p is true and p → (q → r) is true, q → r
Should be true. Since q is true and q → r is true, r should be true. Hence the given argument is
valid.
(ii). The premises p → ¬ q and ¬ q → ¬ r together yields the premise p → ¬ r. since p is true,
this premise p → ¬ r establishes that ¬ r is true. Hence the given argument is valid.
(iii) We note that

(p → r) ˄ (q → r) ⇔ (¬ p ⅴ r) ˄ (¬ q ⅴ r)

⇔ (r ⅴ¬ p) ˄ (r ⅴ¬ q) By Commutative law

⇔ r ⅴ (¬ p ˄ ¬ q) By Distributive law

⇔ ¬ (p ⅴ q) ⅴr By Commutative & De Morgan’s Law

⇔ (p ⅴ q) → r
This Logical equivalence shows that the given argument is valid.
9. Test whether the following arguments are valid:

(i). p→q (ii). p→q


r→s r→s

pⅴr ¬qⅴ¬s
∴ qⅴs ∴ ¬ (p ˄ r)

Solution:
(i) We note that

(p → q) ˄ (r → s) ˄ (p ⅴ r) ⇔ (p → q) ˄ (r → s) ˄ (¬ p → r)

⇔ (p → q) ˄ (¬ p → r) ˄ (r → s) By Commutative law
⇔ (p → q) ˄ (¬ p → s) Using Rule of Syllogism
⇔ (¬ q → ¬ p) ˄ (¬ p → s) Using Contrapositive
⇔ (¬ q → s) Using Rule of Syllogism

⇔qⅴs
This Logical equivalence shows that the given argument is valid.
(ii) We note that

(p → q) ˄ (r → s) ˄ (¬ q ⅴ ¬ s) ⇔ (p → q) ˄ (r → s) ˄ (q → ¬ s)

⇔ (p → q) ˄ (q → ¬ s) ˄ (r → s) By Commutative law
⇔ (p → ¬ s) ˄ (r → s) Using Rule of Syllogism
⇔ (p → ¬ s) ˄ (¬ s → ¬ r) Using Contrapositive
⇔ (p → ¬ r) Using Rule of Syllogism

⇔ ¬ p ⅴ¬ r)

⇔ ¬ (p ˄ r)
This Logical equivalence shows that the given argument is valid.
10. Show that the following argument is not valid:
p
pⅴq
q → (r → s)
t→r
∴¬s→¬t
Solution:

Here p is true (premise) and (p ⅴ q) is true (premise). Therefore, q may be true or false.
Suppose q is false. Then, since q → (r → s) is true (premise), r → s must be false. This
means that r must be true, and s must be false. Since r is true and t → r is true (premise), t may
be true or false. Suppose t is true, then ¬ t is false. Since s must be false, ¬ s must be true.
Consequently, ¬ s → ¬ t is false.
Thus, when q is false and t is true, the given conclusion does not follow from the given
premise. As such, the given argument is not valid argument.
☻Open statement:
A declaration statement is an open statement
i. If it contains one or more variables.
ii. If it is not statement.
iii. But it becomes statement when the variables in it are replaced by certain allowable
choices.
Example: “The number x+2 is an even integer” is denoted by P(x) then ¬ P(x) may be read as
“The number x+2 is not an even integer”.
Quantifiers:
The words “all”, “every”, “some”, “there exist” are associated with the idea of a quantity such
words are called quantifiers.
1. Universal quantifiers:
The symbol Ɐ has been used to denote the phrases “for all” and “for every” in logic “for
each” and “for any” are also taken up to equivalent to these. These equivalent phrases are
called universal quantifiers.
2. Existential quantifiers:
The symbol ∃ has been used to denote the phrases “there exist”, “for some” and “for at
least one” each of these equivalent phrases is called the existential quantifiers.

Example: 1. For every integer x, x2 is a non-negative integer ∃ x ∈ s, P(x).


2. For the universe of all integers, let
p(x): x>0.
q(x): x is even.
r(x): x is a perfect square.
s(x): x is divisible by 3.
t(x): x is divisible by 7.
Problems:
Write down the following quantified statements in symbolic form:
i) At least one integer is even.
ii) There exists a positive integer that is even.
iii) Some integers are divisible by 3.
iv) every integer is either odd or even.
v) if x is even and a perfect square, then is not divisible by 3.
vi) if x is odd or is not divisible by 7, then x is divisible by 3.
Solution:
Using the definition of quantifiers, we find that the given statement read as follows in
symbolic form
i) ∃x, q(x)
ii) ∃x, [ p(x) ˄ q(x)]
iii) ∃x, [ q(x) ˄ s(x)]
ⅵ) Ɐx, [ q(x) ⊻ ¬ q(x)]
v) Ɐx [ {q(x) ˄ r(x)} → s(x)]

vi) Ɐx, [{¬ q(x) ⅴ ¬ t(x)} →s(x)]

Rules employed for determining truth value:


Rule1: The statement “Ɐ x ∈ s, p(x)” is true only when p(x) is true for each x ∈ s.
Rule2: The statement “∃ x ∈ s, p(x)” is false only when p(x) is false for every x ∈ s.
*Rules of inference:
Rule3: If an open statement p(x) is known to be true for all x in a universe s and if a ∈ s then
p(a) is true. (this is known as the rule of universal specification).
Rule4: if an open statement p(x) is proved to be true for any (arbitrary) x chosen from a set s
then the quantified statement Ɐ x ∈ s, p(x) is true. (this is known as the rule of universal
generalization)
*Logical equivalence:
Two quantified statements are said to be logically equivalent whenever they have the same
truth values in all possible situations.
The following results are easy to prove.
i) Ɐ x [p(x) ˄ q(x)] ⇔ (Ɐ x, p(x)) ˄ (Ɐ x, q(x))

ii) ∃ x [p(x) ⅴ q(x)] ⇔ (∃ x, p(x)) ⅴ (∃ x, q(x))

iii) ∃ x, [p(x) → q(x)] ⇔ ∃ x, (¬ p(x) ⅴ q(x))


*Rule for negation of a quantified statement:
Rule5: To construct the negation of a quantified statement, change the quantifier from
universal
to existential and vice versa.
i.e., ¬ [Ɐ x, p(x)] ≡ ∃ x, [ ¬ p(x)]
¬ [(∃ x, p(x)] ≡ Ɐ x [ ¬ p(x)]
Problems:
1. Consider the open statements with the set of real numbers as the universe.
p(x): |x|>3, q(x): x>3
Find the truth value of the statement Ɐ x, [p(x) → q(x)]. Also, write down the converse, inverse
and the contrapositive of this statement and find their truth values
Solution:
We readily note that
p(-4) ≡ |-4|>3 is true and q(-4) ≡ -4>3 is false
Thus, p(x) →q(x) is false for x= -4.
Accordingly, the given statement Ɐ x, [p(x) → q(x)] ......................... (ⅰ) is false.
The converse of the statement (ⅰ) is Ɐ x, [q(x) → p(x)] ....................... (ⅱ)
In words, this reads “For every real number x, x>3 then |x|>3”
Or Equivalently, “Every real number greater than 3 has its absolute value (magnitude) greater
than 3”
This is a true statement.
Next, the inverse of the statement (ⅰ) is Ɐ x, [¬ p(x) → ¬ q(x)] ............... (ⅲ)
In words this reads “For every real number x, if |x| ≤3 then x≤3”
Or equivalently, “If the magnitude of a real number is less than or equal to 3, then the number
is less than or equal to 3”
Since the converse and inverse of a conditional are logically equivalent the statements (ⅱ) and
(iii) have the same truth values. Thus ⅲ) is a true statement.
Then the contrapositive of statement (i) is Ɐ x, [¬ q(x) → ¬ p(x)]........................... (ⅳ)
“Every real number which is less than or equal to 3 has its magnitude less than or equal to 3”.
2. Let p(x): x2-7x+10, q(x): x2-2x-3, r(x): x<0.
Determine the truth or falsity of the following statements. When the universe U contains
only the integers 2 and 5. If a statement is false. Provide a counter example or explanation.

(ⅰ). Ɐ x, [p(x) →¬ r(x)] (ⅱ). Ɐ x, [q(x) → r(x)]


(ⅲ). ∃ x, [q(x) → r(x)] (ⅳ). ∃ x, [p(x) → r(x)]
Solution:
Here, the universe is U= {2, 5}.
We note that x2-7x+10 = (x-5) (x-2). Therefore, p(x) is true for x=5 and 2. That is p(x) is true
for all x ∈ U.
Further, x2-2x-3 = (x-3) (x+1). Therefore, q(x) is only true for x=3 and x=-1. Since x=3 and
x=-1 are not in the universe, q(x) is false for all x ∈ U
Obviously, r(x) is false for all x ∈ U.
Accordingly:
(i) Since p(x) is true for all x ∈ U and ¬ r(x) is true for all x ∈ U, the statement Ɐ x,
[p(x) → ¬ r(x)] is true.
(ii) Since q(x) is false for all x ∈ U and r(x) is false for all x ∈ U, the statement Ɐ x,
[q(x) → r(x)] is true.
(iii) Since q(x) and r(x) are false for x=2, the statement ∃ x, [q(x) → r(x)] is true.
(iv) Since p(x) is true for all x ∈ U but r(x) is false for all x ∈ U. the statement p(x) → r(x) is
false for all x ∈ U. consequently, ∃ x, [p(x) → r(x)] is false.
3. Negate and simplify each of the following.

(i). ∃ x, [p(x) ⅴ q(x)] (ⅱ). Ɐ x, [p(x) ˄ ¬ q(x)]


(ⅲ). Ɐ x, [p(x) → q(x)] (ⅳ). ∃ x, [p(x) ⅴ q(x)] → r(x)
Solution:
By using the rule of negation for quantified statements and the laws of logic, we find that

(i) ¬ [∃ x, {p(x) ⅴ q(x)}] ≡ Ɐ x, [ ¬ {p(x) ⅴ q(x )]


≡ Ɐ x, [ ¬ p(x) ˄ ¬ q(x)]
(ii) ¬ [Ɐ x, {p(x) ˄ ¬ q(x)}] ≡ ∃ x, [ ¬ {p(x) ˄ ¬ q(x)}]

≡ ∃ x, [ ¬ p(x) ⅴ q(x)]

(iii) ¬ [Ɐ x, {p(x) → q(x)}] ≡ ∃ x, [ ¬ {¬ p(x) ⅴ q(x)}]

≡ ∃ x, [p(x) ˄ ¬ q(x)}]

(iv) ¬ [∃ x, {p(x) ⅴ q(x)} →r(x)] ≡ Ɐ x, [ ¬ {¬ (p(x) ⅴ q(x)) ⅴ r(x)}]

≡ Ɐ x, [ {p(x) ⅴ q(x)} ˄ ¬ r(x)]


4. Write down the following proposition in symbolic form, and find its negation:
“If all triangles are right angled, then no triangle is equiangular”.
Solution:
Let T denote set of all triangles. Also, p(x): x is right angled, q(x): x is equiangular.
Then in symbolic form, the given proposition reads
{Ɐ x ∈ T, p(x)} → {Ɐ x ∈ T, ¬ q(x)}
The negation of this is
{Ɐ x ∈ T, p(x)} ˄ {∃ x ∈ T, q(x)}
In words, this reads “All triangles are right angled and some triangles are equiangular”.
Logical implication involving quantifiers
5. Prove that ∃ x, [p(x) ˄ q(x)] ⇒ ∃ x, p(x) ˄ ∃ x, q(x)
Is the converse true
Solution:
Let S denote the universe, we find that
∃ x, [p(x) ˄ q(x)] ⇒ p(a) ˄ q(a) for some a ∈ S
⇒ p(a), for a ∈ S and q(a) for some a ∈ S
⇒ ∃ x, p(x) ˄ ∃ x, q(x)
This proves the required implication.
Next, we observe that ∃ x, p(x) ⇒ p(a) for some a ∈ S and ∃ x, q(x) ⇒ q(b) for some b ← S.
Therefore, ∃ x, p(x) ˄ ∃ x, q(x) ⇒ p(a) ˄ q(b)
⇎ p(a) ˄ q(a) because b need not be a
Thus, ∃ x, [p(x) ˄ q(x)] need not be true when ∃ x, p(x) ˄ ∃ x, q(x) is true.
That is ∃ x, p(x) ˄ ∃ x, q(x) ⇎ [p(x) ˄ q(x)]
Accordingly, the converse of the given implication is not necessarily true.
6. Find whether the following arguments is valid:
No engineering student of first or second semester studies logic
Anil is a student who studies logic.
∴ Anil is not in second semester
Solution:
Let us take the universe to be the set of all engineering students
p(x): x is in first semester.
q(x): x is in second semester.
r(x): x studies logic.
Then the given argument reads
Ɐ x,[{p(x)ⅴq(x)} → ¬ r(x)]
r(a)
∴ ¬ q(a)
We note that

Ɐ x, [{p(x) ⅴ q(x)} →¬ r(x)] ⇒ {p(a) ⅴ q(a)} →¬ r(a)

By rule of universal specification.


Therefore,

[Ɐ x, {p(x) ⅴ q(x)} →¬ r(x)] ˄ r(a)

⇒ [{p(a) ⅴ q(a)} →¬ r(a)] ˄ r(a)

⇒ r(a) ˄ [r(a) → ¬ [p(a) ⅴ q(a)]], Using Commutative law and Contrapositive

⇒¬ [p(a) ⅴ q(a)], By the Modus Pones law

⇒ ¬ p(a) ˄ ¬ q(a), By De Morgan’s law


⇒ ¬ q(a), by the rule of conjunctive specification,
This proves that the given argument is valid.
7. Find whether the following argument is valid.
If a triangle has 2 equal sides then, it is isosceles.
If the triangle is isosceles, then it has 2 equal angles.
A certain triangle ABC does not have 2 equal angles.
∴ the triangle ABC does not have 2 equal sides.
Solution:
Let the universe be set of all triangles
And let p(x):x has equal sides.
q(x): x is isosceles.
r(x): x has 2 equal angles.
Also let C denote the triangle ABC.
Then, in symbols, the given argument reads as follows:
Ɐ x, [p(x) → q(x)]
Ɐ x, [q(x) → r(x)]
¬ r(c)
∴p(c)

We note that
Ɐ x, [p(x) → q(x)] ˄ {Ɐ x, [q(x) → r(x)]} ˄ ¬ r(c)
⇒ {Ɐ x, [p(x) → r(x)] ˄ ¬ r(c)}, By Rule of Syllogism
⇒ {[p(c) → r(c)] ˄ ¬ r(c)}, By Rule of Universal Specification
⇒ ¬ p(c) By Modus Tollens Rule
This proves that the given argument is valid.
8. Prove that the following argument is valid.
Ɐ x, [p(x) ⅴ q(x)]
∃ x, ¬ p(x)
Ɐ x, [¬ q(x) ⅴ r(x)]
Ɐ x, [s(x) → ¬ r(x)]
∴ ∃ x, ¬ s(x)
Solution:
We note that

{Ɐ x, [p(x) ⅴ q(x)]} ˄ [∃ x, ¬ p(x)]


⇒ [p(a) ⅴ q(a)] ˄ ¬ p(a) For some as in the universe
⇒ q(a) By Disjunctive Syllogism
Therefore, {Ɐ x, [p(x) ⅴ q(x)]} ˄ [∃ x, ¬ p(x)] ˄ {Ɐ x, [¬ q(x) ⅴ r(x)]}
⇒ q(a) ˄ [¬ q(a) ⅴ r(a)]
⇒ r(a) By Rule of Disjunctive Syllogism
Consequently,

{Ɐ x, [p(x) ⅴq(x)]} ˄ {∃ x, ¬ p(x)} ˄ {Ɐ x, [¬ q(x) ⅴ r(x)]} ˄ {Ɐ x, [s(x) → ¬ r(x)]}


⇒ r(a) ˄ {s(a) → ¬ r(a)}
⇒ ¬ s(a) By Modus Tollens rule
⇒ ∃ x, ¬ s(x).
This proves the given argument is valid.
Quantified statements with more than one variable
9. Determine the truth value of each of the following quantified statements. The universe
being the set of all non-zero integer.
i) ∃ x, ∃ y [xy=1]
ii) ∃ x Ɐ y [xy=1]
iii) Ɐ x ∃ y [xy=1]
iv) ∃ x, ∃ y, [(2x+y=5) ʌ (x-3y=-8)]
v) ∃ x, ∃ y, [(3x-y=17) ʌ (2x+4y=3)]
Solution: (ⅰ) true (take x=1, y=1)
(ii) False (for specified x, xy=1 for every y is not true)
(iii) false (for x=2, there is no integer y such that xy=1)
(iv) true (take x=1, y=3)
(v) false (equation 3x-y=17 and 2x+4y=3 do not have a common integer solution)
☻Methods of proof and methods of disproof:

Direct proof:

1. Hypothesis: first assume that p is true.


2. Analysis: starting with the hypothesis and employ the rules/ Laws of logic and other known
facts infer that q is true.
3. Conclusion: p → q is true.
Indirect proof:
A conditional p → q and its contrapositive ¬ q →¬ p is logically equivalent. In some
situations, given a condition p → q, a direct proof of the contrapositive ¬ q→¬ p is easier. On
the basis of this proof, we infer that the conditional p → q is true. This method of proving a
conditional is called an indirect method of proof.
Proof by contradiction:
1. Hypothesis: assume that p → q is false, that is assume that p is true and q is false.
2. Analysis: starting with the hypothesis that q is false and employing the rules of logics and
other known facts, this infer that p is false. This contradicts the assumption that p is true.
3. Conclusion: because of the contradiction arrived in the analysis, we infer that p → q is
true.
Proof by exhaustion:
Recall that a proposition of the form “Ɐ x ∈ S, p(x)” is true if p(x) is true for every x in
S. if S consists of only a limited number of elements, we can prove that the statement “Ɐ x ∈
S, p(x)” is true by considering p(a) for each a in S and verifying that p(a) is true (in each case).
Such a method of proof is called the method of exhaustion.
Disproof by counter example:
The way of disproving a proposition involving the universal quantifiers is to exhibit
just one case where the proposition is false. This method of disproof is called disproof by
counter example.
Problems:
1. Prove that, for all integers k and l, if k and l are both odd the k+l is even and kl is odd.
Solution:
Take any two integers k and l, and assume that both of these are odd (hypothesis)
Then k=2m+1, l=2n+! for some integers m and n. therefore,
k+1= (2m+1) +(2n+1) = 2(m+n+1)
kl= (2m+1)(2n+1) = 4mn+2(m+n)+1
We observe that k+l is divisible by 2 and kl is not divisible by 2. Therefore k+l is an even
integer and kl is an odd integer.
Since k and l are arbitrary integers, the proof of the given statement is complete.
2. For each of the following statements, provide an indirect proof by stating and proving the
contrapositive of the given statement.
(i) for all integers k and l, if kl is odd then both k and l are odd.
(ii) for all integers k and l if k+l is even, then k and l are both even or both odd.
Solution:
The contrapositive of the given statement is
“For all integers k and l, if k is even or l is even then kl is even.
We now prove this contrapositive.
For any integers k and l, assume that k is even.
Then k=2m for some integer m, and kl=(2m)l=2(ml) which is evidently even. Similarly if l is
even, then kl=k(2n)=2kn for some integer n so that kl is even. This proves the contrapositive.
This proof of contrapositive serves as an indirect proof of the given statement.
(ii). Here, the contrapositive of the given statement is
“for all integers k and l, if one of k and l and is odd and the other is even, then k+l is odd”
We now prove this contrapositive
For any odd integers k and l, assume that, one of k and l is odd and the other is even.
Suppose k is odd and l is even. Then k=2m+1 and l=2n for some integers m and n. consequently
k+l=(2m+1)+2n which is evidently odd.
Similarly, if k is even and l is odd, we find that k+l is odd. This proves the contrapositive.
This proof of contrapositive serves as an indirect proof of the given statement.
3. Give (ⅰ) direct proof (ⅱ) indirect proof (ⅲ) proof by contradiction for the
following statement: “if n is an odd integer, then n+9 is an even integer”.
Solution:
(i) Direct proof: assume that n is an odd integer. Then n=2k+1 for some integer k. This gives
n+9 = (2k+1)+9 = 2(k+5) from which it is evident that n+9 is even. This establishes the truth
of the given statement by a direct proof.
(ii) Indirect proof: assume that n+9 is not an even integer. Then n+9 = 2k+1 for some integer
k. This gives n = (2k+1)-9=2(k-4), which shows that n is even. Thus, if n+9 is not even, then n
is not odd. This proves the contrapositive of the given statement. This proof of the
contrapositive serves as an indirect proof of the given statement.
(iii) proof by contradiction: assume that the given statement is false. That is, assume that n is
odd and n+9 is odd, n+9=2k+1 for some integer k so that n=(2k+1)-9= 2(k-4) which shows that
n is even. This contradicts the assumption that n is odd. Hence the given statement must be
true.
4. Prove that every even integer n with 2≤n≤26 can be written as a sum of most three perfect
squares.
Solution:
Let S={2, 4, 6, …., 24, 26}. We have to prove that the statement: “Ɐ x ∈ S, p(x)” is true,
where p(x): x is a sum of at most three perfect squares.
We observe that
2=12+12 16=42
4=22 18=42+12+12
6=22+12+12 20=32+32+12+12
8=22+22 22=32+32+22
10=32+12 24=42+22+22
12=22+22+22 26=52+12
14=32+22+12
The above facts verify that each x in S is a sum of at most three-perfect square.
5. Prove or disprove that the sum of square of any four non-zero integers is an even integer.
Solution:
Here the proposition is
“For any four non-zero integers a, b, c, d and a2+b2+c2+d2 is an even integer”.
We check that for a=1, b=1, c=1, d=2 the proposition is false. Thus, the given proposition is
not a true proposition. This proposition is disproved through the counter example a=b=c=1 and
d=2.
6. Consider the following statement for the universe of integers if n is an integer then n2=n or
Ɐn {n2=n}.
Solution:
For n=0 it is true that n2=02=0=n and if n=1 is also true that n2=12=1=n. however we cannot
conclude that n2=n for every integer n.
The rule of universal generalisation does not apply here, for we cannot consider the choices of
0 (or 1) as an arbitrarily chosen integer. If n=2, n 2=4≠n=2, and this one counter example is
enough to tell us that the given statement is false.
However, either replacement namely n=0 or n=1 is not enough to establish the truth of the
statement. For some integer n, n2=n or ∃ n {n2=n}.
7. For all positive integers x and y if the product xy exceeds 25, then x>5 or y>5.
Solution:
Consider the negation of the conclusion that is suppose that 0 < x≤ 5 and 0 < y≤ 5. Under these
circumstances we find that 0< 𝑥 ∙ 𝑦 < 5 ∙ 5 = 25.
So, the product of xy does not exceed 25.
BCS405A
Discrete Mathematical Structures
(For the 4th Semester Computer Science and Engineering Stream)

Module 2
Properties of Integers & Principles of Counting
Content

S.No Topic Page No


1 Syllabus 1-1
2 Mathematical Induction-well Ordered Principle 1-1
3 Problems on Mathematical Induction 1-8
4 Recursive Definition 9-12
5 The Rules of Sum and Product 13-14
6 Permutations 15-17
7 Combinations 18-21
8 Binomial and Multinomial Theorems 22-24
9 Combination with Reputations 25-27
MODULE 2

PROPERTIES OF INTEGERS & PRINCIPLES OF COUNTING


☻Syllabus:

Properties of the Integers: The Well Ordering Principle – Mathematical Induction.

Fundamental Principles of Counting: The Rules of Sum and Product, Permutations, Combinations – The
Binomial Theorem, Combinations with Repetition.

☻Mathematical Induction:

Mathematical induction is a mathematical proof technique. It is essentially used to prove that a


statement 𝑃(𝑛) holds for every natural number 𝑛 = 0, 1, 2, 3, … …. i.e., the overall statement is a sequence of
infinitely many cases 𝑃(0), 𝑃(1), 𝑃(3), … … … ..

Well ordering principle:

Every non empty subset of 𝑍 +contains a smallest element. (we often express this by saying that 𝑍+ is well
ordered).

Finite induction principle (principle of Mathematical induction):

Let 𝑆(𝑛) denote an open mathematical statement that involves one or more occurrences of the variable n.
Which represents a positive integer

(a) If 𝑆(1) is true; and

(b) If whenever 𝑆(𝑘)is true (for some particular but arbitrarily chosen 𝑘 ∈ 𝑍+), then 𝑆 (𝑘 + 1)is true,
then 𝑆(𝑛) is true for all 𝑛 ∈ 𝑍+.

Proof:

Let 𝑆(𝑛) be such an open statement satisfying conditions (a) and (b) and let 𝐹 = {𝑡 ∈ 𝑍 +/ 𝑆(𝑡) is false}. We
wish to prove that 𝐹 = ∅ so to obtain a contradiction we assume that 𝐹 ≠ ∅. Then by the well-ordering
Principle, F has a least element. Since 𝑆(1) is true. It follows that 𝑆 ≠ 1. so 𝑠 > 10, and consequently 𝑠 −
1 ∈ 𝑍+. With 𝑠 − 1 ∉ 𝐹, 𝑆(𝑠 − 1) we have true. So, by condition (b) it follows that 𝑆((𝑠 − 1) + 1) = 𝑆(𝑠)
is true, contradicting 𝑠 ∈ 𝐹. This contradiction arose from the assumption that 𝐹 ≠ ∅. Consequently 𝐹 = ∅.

Problems:

1. Prove by mathematical induction that, for all positive integers 𝑛 ≥ 1.


1
1 + 2 + 3 + ⋯ ⋯ ⋯ + 𝑛 = 𝑛(𝑛 + 1)
2

Solution:

Here, we have to prove the statement


1
𝑆(𝑛) = 1 + 2 + 3 + ⋯ ⋯ ⋯ + 𝑛 = 𝑛(𝑛 + 1) for all integers 𝑛 ≥ 1.
2
Basic step: We note that 𝑆(1) is the statement
1
1 = ∙ 1 ∙ (1 + 1)
2

Which is clearly true. thus, the statement 𝑆(𝑛)is verified for 𝑛 = 1.

Induction step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we

assume that the following statement is true:


1
𝑆(𝑘) = 1 + 2 + 3 + ⋯ ⋯ ⋯ + 𝑘 = ∙ 𝑘(𝑘 + 1)
2

Using this we find that (by adding (𝑘 + 1) to both side)


1
𝑆(𝑘) = 1 + 2 + 3 + ⋯ ⋯ ⋯ + 𝑘 + (𝑘 + 1) = ∙ 𝑘(𝑘 + 1) + (𝑘 + 1)
2
1
= (𝑘 + 1) { 𝑘 + 1}
2
1
= (𝑘 + 1)(𝑘 + 2)
2

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.
𝑛(𝑛+1)(2𝑛+1)
2. Prove that, for each 𝑛 ∈ 𝑍+ ∑𝑛𝑖=1 𝑖2 =
6

OR
𝑛(𝑛+1)(2𝑛+1)
Prove that, for each 𝑛 ∈ 𝑍+, 12 + 22 + 32 + ⋯ ⋯ ⋯ + 𝑛2 =
6

Solution:

Let S(n) denote the given statement.

Basic step: We note that is 𝑆(1) is the statement


1
12 = ∙ 1 ∙ (1 + 1) ∙ (2 + 1) which is clearly true.
6

Induction Step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we
assume that the following statement is true.
𝑘(𝑘+1)(2𝑘+1)
𝑆(𝑘) = 12 + 22 + 32 + ⋯ ⋯ ⋯ + 𝑘2 = .
6

Adding (𝑘 + 1) 2 to both sides of this, we obtain


𝑘(𝑘+1)(2𝑘+1)
𝑆(𝑘) = 12 + 22 + 32 + ⋯ ⋯ ⋯ + 𝑘2 + (𝑘 + 1)2 = + (𝑘 + 1)2
6

𝑘 (2𝑘+1)
= (𝑘 + 1) { + (𝑘 + 1)}
6
1
= (𝑘 + 1){𝑘(2𝑘 + 1) + 6(𝑘 + 1)}
6
1
= (𝑘 + 1){2𝑘2 + 𝑘 + 6𝑘 + 6}
6
1
= (𝑘 + 1){2𝑘2 + 7𝑘 + 6}
6
1
= (𝑘 + 1)(𝑘 + 2)(2𝑘 + 3)
6

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.

3. By mathematical induction, Prove That (𝑛!) ≥ 2𝑛−1 for all integers𝑛 ≥ 1.

Solution:

Basic step: For 𝑛 = 1, 𝑆(𝑛) reads (1!) ≥ 21−1 which is obviously true. Thus 𝑆(𝑛) is verified for 𝑛 = 1.

Induction step: We assume that 𝑆(𝑛) is true for 𝑛 = 𝑘, where 𝑘 is an integer ≥ 1; that is, we assume that

(𝑘!) ≥ 2𝑘−1 , or 2𝑘−1 ≤ 𝑘! is true

2𝑘 = 2 ∙ 2𝑘−1 ≤ 2 ∙ 𝑘!

≤ (𝑘 + 1) ∙ 𝑘!, because 2 < (𝑘 + 1) for 𝑘 ≥ 1

= (𝑘 + 1)!

(𝑘 + 1)! ≥ 2𝑘

This is precisely the statement 𝑆(𝑛) for 𝑛 = 𝑘 + 1. Thus, on the assumption that 𝑆(𝑛)is true for 𝑛 = 𝑘 ≥ 1,
We have proved that 𝑆(𝑛) is true for 𝑛 = 𝑘 + 1.

Hence, by mathematical induction, it follows that the statement 𝑆(𝑛) is true for all integers 𝑛 ≥ 1.

4. Prove that every positive integer 𝑛 ≥ 24 can be written as a sum of 5’s and/or 7’s.

Solution:

Basic step: We note that 24 = (7 + 7) + (5 + 5)

This shows 𝑆(24) is true.

Induction step: We assume that 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 ≥ 24. Then

𝑘 = (7 + 7 + ⋯ ⋯ ) + (5 + 5 + ⋯ ⋯ )

Suppose this representation of 𝑘 has 𝑟 number of 7’s and 𝑠 number of 5’s. Since 𝑘 ≥ 24 we should have
𝑟 ≥ 2 and 𝑠 ≥ 2.

Using this representation of 𝑘, we find that


+_⋯ ⋯¸) + (⏟5 + 5_
𝑘 + 1 = {(⏟7 + 7_ +_⋯ ⋯¸)} + 1
𝑟 𝑠

= {⏟ ¸) + (7 + 7) + (⏟5_+ 5_
(7_+ 7_+ ⋯_⋯ +_⋯ ⋯¸)} + 1
𝑟−2 𝑠

= {⏟
(7 + 7_ ( 5 + 5_
+_⋯ ⋯¸) + ⏟ +_⋯ ⋯¸)}
𝑟−2 𝑠+3

This shows that 𝑘 + 1is sum of 7’s and 5’s. Thus, 𝑆(𝑘 + 1) is true.

5. Prove by mathematical induction that, for all positive integers 𝑛 ≥ 1.


1
1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + ⋯ ⋯ ⋯ + 𝑛(𝑛 + 1) = 𝑛(𝑛 + 1)(𝑛 + 2)
3

Solution:

Here, we have to prove the statement


1
𝑆(𝑛) = 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + ⋯ ⋯ ⋯ + 𝑛(𝑛 + 1) = 𝑛(𝑛 + 1)(𝑛 + 2) for all integers 𝑛 ≥ 1.
3

Basic step: We note that 𝑆(1) is the statement


1
1 ∙ 2 = ∙ 1 ∙ (1 + 1) ∙ (2 + 1)
3

Which is clearly true. thus, the statement 𝑆(𝑛)is verified for 𝑛 = 1.

Induction step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we

assume that the following statement is true:


1
𝑆(𝑘) = 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + ⋯ ⋯ ⋯ + 𝑘(𝑘 + 1) = 𝑘(𝑘 + 1)(𝑘 + 2)
3

Using this we find that (by adding (𝑘 + 1)(𝑘 + 2) to both side)

𝑆(𝑘) = 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + ⋯ ⋯ ⋯ + 𝑘(𝑘 + 1) + (𝑘 + 1)(𝑘 + 2)


1
= 𝑘(𝑘 + 1)(𝑘 + 2) + (𝑘 + 1)(𝑘 + 2)
3

1
= (𝑘 + 1)(𝑘 + 2) { 𝑘 + 1}
3
1
= (𝑘 + 1)(𝑘 + 2)(𝑘 + 3)
3

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.
𝑛(2𝑛−1)(2𝑛+1)
6. Prove, by mathematical induction that 12 + 32 + 52 + ⋯ ⋯ ⋯ + (2𝑛 − 1)2 = for all
3
integers 𝑛 ≥ 1.
Solution:

Let S(n) denote the given statement.

Basic step: We note that is 𝑆(1) is the statement


1
12 = ∙ 1 ∙ (2 − 1) ∙ (2 + 1) which is clearly true.
3

Induction Step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we
assume that the following statement is true.
𝑘(2𝑘−1)(2𝑘+1)
𝑆(𝑘) = 12 + 32 + 52 + ⋯ ⋯ ⋯ + (2𝑘 − 1)2 = .
3

Adding (2𝑘 + 1)2 to both sides of this, we obtain


𝑘(2𝑘−1)(2𝑘+1)
𝑆(𝑘) = 12 + 32 + 52 + ⋯ ⋯ ⋯ + (2𝑘 − 1)2 + (2𝑘 + 1)2 = + (2𝑘 + 1)2
3
𝑘 (2𝑘−1)
= (2𝑘 + 1) { + (2𝑘 + 1)}
3
1
= ((2𝑘 + 1){𝑘(2𝑘 − 1) + 3(2𝑘 + 1)}
3
1
= ((2𝑘 + 1){2𝑘2 − 𝑘 + 6𝑘 + 3}
3
1
= ((2𝑘 + 1){2𝑘2 + 5𝑘 + 3}
3
1
= (2𝑘 + 1)(𝑘 + 2)(2𝑘 + 3)
3

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.

7. Prove by mathematical induction that, for all positive integers 𝑛 ≥ 1.


1
1 ∙ 3 + 2 ∙ 4 + 3 ∙ 5 + ⋯ ⋯ ⋯ + 𝑛(𝑛 + 2) = 𝑛(𝑛 + 1)(2𝑛 + 7)
6

Solution:

Here, we have to prove the statement


1
𝑆(𝑛) = 1 ∙ 3 + 2 ∙ 4 + 3 ∙ 5 + ⋯ ⋯ ⋯ + 𝑛(𝑛 + 2) = 𝑛(𝑛 + 1)(2𝑛 + 7) for all integers 𝑛 ≥ 1.
6

Basic step: We note that 𝑆(1) is the statement


1
1 ∙ 3 = ∙ 1 ∙ (1 + 1) ∙ (2 + 7)
6

Which is clearly true. thus, the statement 𝑆(𝑛)is verified for 𝑛 = 1.

Induction step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we

assume that the following statement is true:


1
𝑆(𝑘) = 1 ∙ 3 + 2 ∙ 4 + 3 ∙ 5 + ⋯ ⋯ ⋯ + 𝑘(𝑘 + 2) = 𝑘(𝑘 + 1)(2𝑘 + 7)
6

Using this we find that (by adding (𝑘 + 1)(𝑘 + 3) to both side)


1
𝑆(𝑘) = 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + ⋯ ⋯ ⋯ + 𝑘(𝑘 + 2) + (𝑘 + 1)(𝑘 + 3) = 𝑘(𝑘 + 1)(2𝑘 + 7) + (𝑘 +
6
1)(𝑘 + 3)
1
= (𝑘 + 1) { 𝑘(2𝑘 + 7) + (𝑘 + 3)}
6

= (𝑘 + 1){2𝑘2 + 7𝑘 + 6𝑘 + 18}

= (𝑘 + 1){2𝑘2 + 13𝑘 + 18}


1
= (𝑘 + 1)(𝑘 + 2)(2𝑘 + 9)
6

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.

8. Prove that every positive integer greater than or equal to 14 can be written as a sum of 3’s and/or 8’s.

Solution:

Basic step: We note that 14 = (3 + 3) + 8

This shows 𝑆(14) is true.

Induction step: We assume that 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 ≥ 14. Then

𝑘 = (3 + 3 + ⋯ ⋯ ) + (8 + ⋯ ⋯ )

Suppose this representation of 𝑘 has 𝑟 number of 3’s and 𝑠 number of 8’s. Since 𝑘 ≥ 14 we should have
𝑟 ≥ 2 and 𝑠 ≥ 2.

Using this representation of 𝑘, we find that

𝑘 + 1 = {⏟
(3 + 3_ (8_+ ⋯ ⋯¸)} + 1
+_⋯ ⋯¸) + ⏟
𝑟 𝑠

= {(⏟3_+ 3_+ ⋯_⋯ (8_+ ⋯ ⋯¸) + 8} + 1


¸) + ⏟
𝑟 𝑠−1

= {(⏟3 + 3_ ( 8_+ ⋯ ⋯¸)}


+_⋯ ⋯¸) + ⏟
𝑟+3 𝑠−1

This shows that 𝑘 + 1is sum of 3’s and 8’s. Thus, 𝑆(𝑘 + 1) is true.

9. Prove by mathematical induction for any integer 𝑛 ≥ 1


1 1 1 𝑛
+ + ⋯⋯⋯+ = 6𝑛+4
2∙5 5∙8 (3𝑛−1)(3𝑛+2)
Solution:

Here, we have to prove the statement


1 1 1 𝑛
𝑆(𝑛) = + + ⋯ ⋯ ⋯ + (3𝑛−1)(3𝑛+2) = 6𝑛+4 for all integers 𝑛 ≥ 1.
2∙5 5∙8

Basic step: We note that 𝑆(1) is the statement


1 1
= 6∙1+4
2∙5

Which is clearly true. thus, the statement 𝑆(𝑛)is verified for 𝑛 = 1.

Induction step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we

assume that the following statement is true:


1 1 1 𝑘
𝑆(𝑘) = + + ⋯⋯⋯+ = 6𝑘+4
2∙5 5∙8 (3𝑘−1)(3𝑘+2)

Using this we find that (by adding 1


to both side)
(3𝑘+2)(3𝑘+5)

1 1 1 1 𝑘 1
𝑆(𝑘) = + + ⋯⋯ ⋯+ + = 6𝑘+4 +
2∙5 5∙8 (3𝑘−1)(3𝑘+2) (3𝑘+2)(3𝑘+5) (3𝑘+2)(3𝑘+5)

𝑘(3𝑘+2)(3𝑘+5)+(6𝑘+4)
= (6𝑘+4)(3𝑘+2)(3𝑘+5)

9𝑘3+21𝑘2+16𝑘+4
= (6𝑘+4)(3𝑘+2)(3𝑘+5)

(𝑘−1)(3𝑘+2)2
= (6𝑘+4)(3𝑘+2)(3𝑘+5)

(𝑘+1)(3𝑘+2)
=
(6𝑘+4)(3𝑘+5)

This is precisely the statement 𝑆(𝑘 + 1). Thus, on the basis of the assumption that 𝑆(𝑛) is true for 𝑛 = 𝑘 ≥
1, the truth ness of 𝑆(𝑛) for 𝑛 = 𝑘 + 1 is established.

10. Prove by mathematical induction that, for every positive integer 𝑛, 5 divides 𝑛5 − 𝑛

Solution:

Let 𝑆(𝑛) be the given statement.

Basic step: We note that 𝑆(1) is the statement

5 divides 15 − 1

Since 15 − 1 = 0, this statement is true

Induction step: We assume that the statement 𝑆(𝑛) is true for 𝑛 = 𝑘 where 𝑘 is an integer ≥ 1; that is, we

assume that the following statement is true:


5 divides 𝑘5 − 𝑘,

This means that 𝑘5 − 𝑘 is a multiple of 5; that is 𝑘5 − 𝑘 = 5𝑚, for some positive integer m.

Consequently, we find that

(𝑘 + 1)5 − (𝑘 + 1) = (𝑘5 + 5𝑘4 + 10𝑘3 + 10𝑘2 + 5𝑘 + 1) − (𝑘 + 1)

= (𝑘5 − 𝑘) + 5(𝑘4 + 2𝑘3 + 2𝑘2 + 𝑘)

= 5𝑚 + 5(𝑘4 + 2𝑘3 + 2𝑘2 + 𝑘)

= 5(𝑚 + 𝑘4 + 2𝑘3 + 2𝑘2 + 𝑘)

This shows that (𝑘 + 1)5 − (𝑘 + 1) is a multiple of 5; that is, 5 divides (𝑘 + 1)5 − (𝑘 + 1).

This is precisely the statement 𝑆(𝑛) for 𝑛 = 𝑘 + 1. Thus, on the assumption that 𝑆(𝑛)is true for 𝑛 = 𝑘 ≥ 1,
We have proved that 𝑆(𝑛) is true for 𝑛 = 𝑘 + 1.
☻Recursive Definition:

For describing a sequence, the two methods are commonly used.

(i) Explicit method (ii) Recursive method

In explicit method, the general term of the sequence is explicitly indicated

In recursive method, first few terms of the sequence must be indicated explicitly and in the second part the
rule which will enable us to obtain new term if the sequence from the terms already known must be indicated.

Problems:

1. Find an explicit definition of the sequence defined recursively by

𝑎1 = 7, 𝑎𝑛 = 2𝑎𝑛−1 + 1 for 𝑛 ≥ 2.

Solution: By repeated use of the given recursive definition we find that

𝑎𝑛 = 2𝑎𝑛−1 + 1 = 2{2𝑎𝑛−2 + 1} + 1

= 2{2(2𝑎𝑛−3 + 1) + 1} + 1 = 23𝑎𝑛−3 + 22 + 2 + 1

⋯⋯⋯

⋯⋯⋯

= 2𝑛−1𝑎𝑛−(𝑛−1) + 2𝑛−2 + 2𝑛−3 + ⋯ ⋯ + 22 + 2 + 1

= 2𝑛−1𝑎1 + (1 + 2 + 22 + 23 + ⋯ ⋯ + 2𝑛−3 + 2𝑛−2)

Using 𝑎1 = 7 and the standard result


𝑎𝑛−1
1 + 𝑎 + 𝑎2 + 𝑎3 + ⋯ ⋯ + 𝑎𝑛−1 = for 𝑎 > 1
𝑎−1

2𝑛−1 −1
This becomes 𝑎𝑛 = 7 ∙ 2𝑛−1 + = 8 ∙ 2𝑛−1 − 1
2−1

2. Obtain the recursive definition for the sequence {𝑎𝑛} is each of the following cases.

(𝑖). 𝑎𝑛 = 5𝑛 (𝑖𝑖). 𝑎𝑛 = 6𝑛 (𝑖𝑖𝑖). 𝑎𝑛 = 3𝑛 + 7

(𝑖𝑣). 𝑎𝑛 = 𝑛(𝑛 + 2) (𝑣). 𝑎𝑛 = 𝑛2 (𝑣𝑖). 𝑎𝑛 = 2 − (−1)𝑛

Solution:

(i). Here 𝑎1 = 5, 𝑎2 = 10, 𝑎3 = 15, 𝑎4 = 20, … … …

We can rewrite these as 𝑎1 = 5 and 𝑎𝑛 = 𝑎𝑛−1 + 5 for 𝑛 ≥ 2.

This is the Recursive definition of the given sequence.

(ii). Here 𝑎1 = 6, 𝑎2 = 62, 𝑎3 = 63, 𝑎4 = 64, … … …


We can rewrite these as 𝑎1 = 6 and 𝑎𝑛+1 = 6𝑎𝑛 for 𝑛 ≥ 1.

This is the Recursive definition of the given sequence.

(iii). Here 𝑎1 = 10, 𝑎2 = 13, 𝑎3 = 16, 𝑎4 = 19, … … …

We can rewrite these as 𝑎1 = 10 and 𝑎𝑛 = 𝑎𝑛−1 + 3 for 𝑛 ≥ 2.

This is the Recursive definition of the given sequence.

(iv). Here 𝑎1 = 3, 𝑎2 = 8, 𝑎3 = 15, 𝑎4 = 24, … … …

We observe that 𝑎2 − 𝑎1 = 5 = 2 ∙ 1 + 3, 𝑎3 − 𝑎2 = 7 = 2 ∙ 2 + 3, 𝑎4 − 𝑎3 = 9 = 2 ∙ 3 + 3

We can rewrite these as 𝑎𝑛+1 − 𝑎𝑛 = 2𝑛 + 3 then 𝑎𝑛+1 = 𝑎𝑛 + 2𝑛 + 3 for 𝑛 ≥ 1.

Hence 𝑎1 = 3 and 𝑎𝑛+1 = 𝑎𝑛 + 2𝑛 + 3 for 𝑛 ≥ 1.

This is the Recursive definition of the given sequence.

(v). Here 𝑎1 = 1, 𝑎2 = 4, 𝑎3 = 9, 𝑎4 = 16, … … …

We observe that 𝑎2 − 𝑎1 = 3 = 2 ∙ 1 + 1, 𝑎3 − 𝑎2 = 5 = 2 ∙ 2 + 1, 𝑎4 − 𝑎3 = 7 = 2 ∙ 3 + 1

We can rewrite these as 𝑎𝑛+1 − 𝑎𝑛 = 2𝑛 + 1 then 𝑎𝑛+1 = 𝑎𝑛 + 2𝑛 + 1 for 𝑛 ≥ 1.

Hence 𝑎1 = 1 and 𝑎𝑛+1 = 𝑎𝑛 + 2𝑛 + 1 for 𝑛 ≥ 1.

This is the Recursive definition of the given sequence.

(vi). Here 𝑎1 = 3, 𝑎2 = 1, 𝑎3 = 3, 𝑎4 = 1, … … …

We observe that 𝑎2 − 𝑎1 = −2 = 2 (−1), 𝑎3 − 𝑎2 = 2 = 2(1), 𝑎4 − 𝑎3 = −2 = 2(−1)

We can rewrite these as 𝑎𝑛+1 − 𝑎𝑛 = 2(−1)𝑛 then 𝑎𝑛+1 = 𝑎𝑛 + 2(−1)𝑛

Hence 𝑎1 = 3 and 𝑎𝑛+1 = 𝑎𝑛 + 2(−1)𝑛 for 𝑛 ≥ 1.

This is the Recursive definition of the given sequence.

3. The Fibonacci numbers are defined recursively by 𝐹0 = 0, 𝐹1 = 1 and 𝐹𝑛 = 𝐹𝑛−1 + 𝐹𝑛−2 for 𝑛 ≥ 2
Evaluate 𝐹2 to 𝐹10

Solution:

Given 𝐹𝑛 = 𝐹𝑛−1 + 𝐹𝑛−2 for 𝑛 ≥ 2

𝐹2 = 𝐹1 + 𝐹0 = 1 + 0 = 1

𝐹3 = 𝐹2 + 𝐹1 = 1 + 1 = 2

𝐹4 = 𝐹3 + 𝐹2 = 2 + 1 = 3
𝐹5 = 𝐹4 + 𝐹3 = 3 + 2 = 5

𝐹6 = 𝐹5 + 𝐹4 = 5 + 3 = 8

𝐹7 = 𝐹6 + 𝐹5 = 8 + 5 = 13

𝐹8 = 𝐹7 + 𝐹6 = 13 + 8 = 21

𝐹9 = 𝐹8 + 𝐹7 = 21 + 13 = 34

𝐹10 = 𝐹9 + 𝐹8 = 34 + 21 = 55

Note: The Sequence formed by the Fibonacci numbers is called the Fibonacci sequence.

4. The Lucas numbers are defined recursively by 𝐿0 = 2, 𝐿1 = 1 and 𝐿𝑛 = 𝐿𝑛−1 + 𝐿𝑛−2 for 𝑛 ≥ 2

Evaluate 𝐿2 to 𝐿10

Solution:

Given 𝐿𝑛 = 𝐿𝑛−1 + 𝐿𝑛−2 for 𝑛 ≥ 2

𝐿2 = 𝐿1 + 𝐿0 = 1 + 2 = 3

𝐿3 = 𝐿2 + 𝐿1 = 3 + 1 = 4

𝐿4 = 𝐿3 + 𝐿2 = 4 + 3 = 7

𝐿5 = 𝐿4 + 𝐿3 = 7 + 4 = 11

𝐿6 = 𝐿5 + 𝐿4 = 11 + 7 = 18

𝐿7 = 𝐿6 + 𝐿5 = 18 + 11 = 29

𝐿8 = 𝐿7 + 𝐿6 = 29 + 18 = 47

𝐿9 = 𝐿8 + 𝐿7 = 47 + 29 = 76

𝐿10 = 𝐿9 + 𝐿8 = 76 + 47 = 123

Note: The Sequence formed by the Lucas numbers is called the Lucas sequence.
1 𝑛 𝑛
1−√5
5. For the Fibonacci sequence 𝐹0, 𝐹1, 𝐹2, … … … …. Prove that 𝐹𝑛 = [( 1+√5) − ( )]
√5 2 2

Solution:

For 𝑛 = 0 and 𝑛 = 1, the required results read (respectively)


0 0
1 1
𝐹0 = [( 1+√5) − (1−√5) ] = [1 − 1] = 0
√5 2 2 √5
1 1+√ 5 1−√ 5 1
𝐹= [( )−( )] = [√5] = 1
1 2 2 √5
√5
Which is true.

Thus, the required result is true for 𝑛 = 0 and 𝑛 = 1. We assume that the result is true for 𝑛 = 0, 1, 2, … . 𝑘,
where 𝑘 ≥ 1. Then, we find that

𝐹𝑘+1 = 𝐹𝑘 + 𝐹𝑘−1
𝑘
1+√5 1−√5 𝑘 1 𝑘−1 𝑘−1
𝐹𝑘+1 = 1 [( ) −( ) ]+ [(1+√5 ) −(
1−√5 ) ] using the assumption made
√5 2 2 √5 2 2

1 1+√5 𝑘−1 1+√5 1−√5 𝑘−1 1−√5


𝐹𝑘+1 = [( ) { + 1} − ( ) { + 1}]
√5 2 2 2 2

1 1+√5 𝑘−1 3+√5 1−√5 𝑘−1 3−√5


𝐹𝑘+1 = [( ) { }−( ) { }]
√5 2 2 2 2

1 1+√5 𝑘−1 6+2√5 1−√5 𝑘−1 6−2√5


𝐹𝑘+1 = [( ) { }−( ) { }]
√5 2 4 2 4

1 𝑘+1 𝑘+1
𝐹𝑘+1 = [( 1+√5) −(
1−√5
) ]
√5 2 2

This shows that the required result is true for 𝑛 = 𝑘 + 1. Hence by mathematical induction, the result is true
for all non – negative integers n.
☻The Rules of Sum and Product:

Rule of sum:

Suppose two tasks 𝑇1 and 𝑇2 are to be performed. if the task 𝑇1 can be performed in m different ways and the
task 𝑇2 can be performed in n different ways and if these two tasks cannot be performed simultaneously, then
one of the two tasks (𝑇1 or 𝑇2) can be performed in 𝑚 + 𝑛 ways.

Example: Suppose 𝑇 1 is the task of selecting a prime no. < 10 and 𝑇 2 is the task of selecting an even number
< 10. then 𝑇1 can be performed in 4 ways and 𝑇2 can be performed in 4 ways. But since 2 is both a prime and
an even number < 10 the task T1 or 𝑇2 can be performed in 4 + 4 – 1 = 7 ways.

Rule of product:

Suppose two tasks are to be performed one after the other. If 𝑇1 can be performed in 𝑛1 different ways, and
for each of these ways 𝑇2 can be performed in 𝑛2different ways. then both of the tasks can be performed in
𝑛1 ∗ 𝑛2 different ways.

Example: Suppose a person has 8 shirts and 5 ties. Then He has 8 * 4 = 40 different ways of choosing a shirt
and a tie.

Problems:

1. Cars of a particular manufacturer come in 4 models, 12 colours, 3 engine sizes and 2 transmission
types (a) how many distinct cars can be manufactured? (b) of these how many have the same colour?

Solution:

(a) By the product rule, it follows that the number of distinct cars that can be manufactured is 4*12*3*2 =288

(b) for any chosen colour, the number of distinct cars that can be manufactured is 4*3*2=24

2. A bit is either 0 or 1. A byte is a sequence of 8 bits. Find (i) the number of bytes. (ii) the number of
bytes that begin with 11 and end with 11. (iii) The number of bytes that begin with 11 and do not end
with 11. (iv) the number of bytes that begin with 11 or end with 11.

Solution:

(i) Since each byte contains 8 bits and each bit is 0 or 1, the number of bytes is 28 = 256

(ii) In a byte beginning and ending with 11, there occur 4 open positions. These can be filled un 24 = 16 ways.
Therefore, there are 16 bytes which begin and end with 11.

(iii) These occur 6 open positions in a byte beginning with 11. these positions can be filled is 2 6 = 64 ways.
thus, there are 64 bytes that begin with 11. since there are 16 bytes that begin and end with 11, the number
of bytes that begin with 11 but do not end with 11 is 64-16 = 48.

(iv) As in (iii) the numbers of bytes that end with 11 is 64. Also, the number of bytes that begin and end with
11 is 16. Therefore, the number of bytes that begin or end with 11 is 64 + 64 = 16 = 112.

3. Find the number of 3 digit even numbers with no repeated digits.


Solution:

Here we consider number of the form 𝑥 𝑦 𝑧, where each of 𝑥, 𝑦, 𝑧 represents a digit under the given
restrictions. Since 𝑥 𝑦 𝑧 has to be even, z has to be 0, 2, 4, 6 or 8. If 𝑧 is 0, then 𝑥 has 9 choices and 𝑦 𝑧 has
2, 4, 6, 8 (4 choices) then 𝑥 has 8 choices (Note that 𝑥 cannot be 0). Therefore, 𝑧 and 𝑥 can be chosen in
1 × 9 + 4 × 8 = 41 ways. For each of these ways, 𝑦 can be chosen in 8 ways.

Hence, the desired number is 41 * 8 = 328.

4. Find the number of proper divisors of 441000.

Solution:

We note that 441000 = 23 × 32 × 53 × 72. Therefore, every divisor of 𝑛 = 441000 must be of the form
𝑑 = 2𝑝 × 3𝑞 × 5𝑟 × 7𝑠 where 0 ≤ 𝑝 ≤ 3, 0 ≤ 𝑞 ≤ 2, 0 ≤ 𝑟 ≤ 3, 0 ≤ 𝑠 ≤ 2.

Thus, for a divisor d, p can be chosen in 4 ways, q in 3 ways, r in 4 ways and s in 3 ways. Accordingly, the
number of possible d’s is 4 × 3 × 4 × 3 = 144. Of these, two divisors (namely 1 and 𝑛) are not proper
divisors. Therefore, the number of proper divisors of the given number is 144 − 2 = 142.

5. How many among the first 100,000 positive integers contain exactly one 3, one 4 and one 5 in their
decimal representations?

Solution:

The number 100000 does not contain 3 or 4 or 5. Therefore, we have to consider all possible positive integers
with 5 places that meet the given conditions. In a 5-place integer the digit 3 can be in any one of the 5 places.
Subsequently, the digit 4 can be in any one of the 4 remaining places. Then the digit 5 can be in any one of
the 3 remaining places. There are 2 places left and either of these may be filled by 5 digits (digits from 0 to
9 other tan 3, 4, 5). Thus, there are 5 × 4 × 3 × 7 × 7 = 2940 integers of the required type.
☻Permutations:

Suppose that we are given 𝑛 distinct objects and wish to arrange r of these objects in a line. Since there are
𝑛 ways of choosing the first object, and after this done 𝑛 − 1 ways of choosing the second object…. And
finally, 𝑛 − 𝑟 + 1 ways of choosing 𝑟𝑡ℎ object, it follows by the product rule of counting (stated in the
preceding section) that the number of different arrangements, or permutations (as they are commonly called)
is 𝑛(𝑛 − 1)(𝑛 − 2) ⋯ ⋯ ⋯ (𝑛 − 𝑟 + 1). We denote this number by 𝑃(𝑛, 𝑟) and is referred to as the number
of permutations of size 𝑟 of 𝑛 objects.

𝒏!
𝑷(𝒏, 𝒓) =
(𝒏 − 𝒓)!

Generalization

Suppose it is required to find the number of permutations that can be formed from a collection of 𝑛 objects
of which 𝑛1 are of one type , 𝑛 2 are of a second type ,……… 𝑛𝑘 are of 𝑘𝑡ℎ type, with 𝑛1 + 𝑛2 + ⋯ ⋯ +
𝑛𝑘 = 𝑛. Then, the number of permutations of the objects is

𝒏!
𝒏𝟏! 𝒏𝟐! ⋯ ⋯ 𝒏𝒌!

Problems:

1. Four different mathematics books, five different computer science books and two different control
theory books are to be arranged in a shelf. How many different arrangements are possible if (a) The
books in each particular subject must be together? (b) Only mathematics books must be together?

Solution:

(a) The mathematics books can be arranged among themselves in 4! Ways, the computer science books in
5! Ways the control theory books in 2! Ways, and the three groups in 3! Ways. Therefore, the number of
possible arrangements is 4! * 5! * 2! * 3! = 34560.

(b) Consider the 4 mathematics boos as one single book. Then we have 8 books which can be arranged in 8!
Ways. In all of these ways the mathematics books are together. But the mathematics books can be arranged
among themselves in 4! Ways. Hence, the number of arrangements is 8! * 4! = 967680

2. Find the number of permutations of the letters of the word MASSASAUGA. In how many of these,
all four ‘A’s are together? How many of them begin with S?

Solution:

The given word has 10 letters of which 4 are A, 3 are S and 1 each are M, U and G. Therefore, the required
number of permutations is
10!
= 25200
4! ∗ 3! ∗ 1! ∗ 1! ∗ 1!
It is a permutation all A’s are to be together, we treat all of A’s as one single letter. Then the letters to be
permuted read (AAAA), S, S, S, M, U, G (which are 7 in number) and the number of permutations is
7!
= 840
1! ∗ 3! ∗ 1! ∗ 1! ∗ 1!

For permutations beginning with S, there occur nine open positions to fill, where two are S, four are A, and
one each of M, U, G. The number of such permutations is
9!
= 7560
2! ∗ 4! ∗ 1! ∗ 1! ∗ 1!

3. (a) How many arrangements are there for all letters in the word SOCIOLOGICAL?

(b) In how many of these arrangements (i) A and G are adjacent? (ii) all the vowels are adjacent?

Solution:

(a) The given word has 12 letters of which three are O, two each are C, I, L and one each are S, A, G.
Therefore, the number of arrangements of these letters is

12!
= 25200
3! ∗ 2! ∗ 2! ∗ 2! ∗ 1! ∗ 1! ∗ 1!

(b)

(i) If, in an arrangement, A and G are to be adjacent, we treat A and G together as a single letter, say X so
that we have three numbers of O’s, two each of C, L, I and one each of S and X, totalling 11 letters. These
can be arranged in 11!
Ways
3!∗2!∗2!∗2!∗1!

Further the letters A and G can be arranged among themselves in two ways.

Therefore, the total number of arrangements in this case is


11!
× 2 = 1663200
3! ∗ 2! ∗ 2! ∗ 2! ∗ 1!
(ii) If, in an arrangement, all the vowels are to be adjacent, we treat all the vowels present in the given word
(A, O, I) as a single letter, say Y, so that we have two each of C and L and one each of S, G & Y totalling to
7 letters. These can be arranged in 7!
ways
2!∗2!∗1!∗1!∗1!

Further, since the given words contains 3 O’s, two I’s and one A, the letters A, O, I (clubbed as Y) can be
arranged among themselves is 6! Ways.
3!∗2!∗1!

7! 6!
Therefore, the total number of arrangements in this case is × = 75600
2!∗2!∗1!∗1!∗1! 3!∗2!∗1!

4. How many Positive integers n can we form using the digits 3, 4, 4, 5, 5, 6, 7 if we want n to exceed
5,000,000?

Solution:
Here n must be of the form 𝑛 = 𝑥1𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7

Where 𝑥1, 𝑥2, … … , 𝑥7 are the given digits with 𝑥1 = 5, 6 𝑜𝑟 7. Suppose we take 𝑥1 = 5. Then where
𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which contains two 4’s and one each of 3, 5, 6, 7.
The number of such arrangements is
6!
= 360
1! 2! 1! 1! 1!

Similarly, we take 𝑥1 = 6. Then where 𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which
contains two each of 4 & 5 and one each of 3 & 7. The number of such arrangements is
6!
= 180
1! 2! 2! 1!

Similarly, we take 𝑥1 = 7. Then where 𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which
contains two each of 4 & 5 and one each of 3 & 6. The number of such arrangements is
6!
= 180
1! 2! 2! 1!

Accordingly, by the Sum Rule, the number of 𝑛’s of the desired type is 360 + 180 + 180 = 720.

5. How many numbers greater than 1,000,000 can be formed by using the digits 1, 2, 2, 2, 4, 4, 0?

Solution:

Here n must be of the form 𝑛 = 𝑥1𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7

Where 𝑥1, 𝑥2, … … , 𝑥7 are the given digits with 𝑥1 = 1, 2 𝑜𝑟 4. Suppose we take 𝑥1 = 1. Then where
𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which contains three 2’s and two 4’s. The number
of such arrangements is
6!
= 60
3! 2!

Similarly, we take 𝑥1 = 2. Then where 𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which
contains two 2’s and two 4’s. The number of such arrangements is
6!
= 180
2! 2!
Similarly, we take 𝑥1 = 4. Then where 𝑥2𝑥3𝑥4𝑥5𝑥6𝑥7 is an arrangement of the remaining 6 digits which
contains three 2’s and one 4. The number of such arrangements is
6!
= 120
3! 1!
Accordingly, by the Sum Rule, the number of 𝑛’s of the desired type is 60 + 180 + 120 = 360.
☻Combinations:

Suppose we are interested in selecting (choosing) a set of 𝑟 objects from a set of 𝑛 ≥ 𝑟 objects without regard
to order. The set of 𝑟 objects being selected is traditionally called a Combination of 𝑟 objects (or briefly 𝑟-
combination).

The total number of combinations of 𝑟-different objects that can be selected from 𝑛 different objects can be
obtained by proceeding in the following way. Suppose this number is equal to 𝐶, say; that is, suppose there
is a total of 𝐶 number of combinations of 𝑟 different objects chosen from 𝑛 different objects. Take any one
of these combinations. The 𝑟 objects in this combination can be arranged in 𝑟! Different ways. Since there
are 𝐶 combinations, the total number of permutations is 𝐶 ∙ 𝑟!. But this is equal to 𝑃(𝑛, 𝑟). Thus,
𝑷(𝒏,𝒓) 𝒏!
𝑪(𝒏, 𝒓) = = for 𝟎 ≤ 𝒓 ≤ 𝒏
𝒓! (𝒏−𝒓)! 𝒓!

Problems:

1. A certain question paper contains two parts A and B each containing 4 questions. How many different
ways a student can answer 5 questions by selecting at least 2 questions from each part?

Solution: The different ways a student can select his 5 questions are.

(i) 3 questions from part A and 2 questions from part B. this can be done in 𝐶(4, 3) ∗ 𝐶(4, 2) = 24 ways.

(ii) 2 questions from part A and 3 questions from part B. this can be done in 𝐶(4, 2) ∗ 𝐶(4, 3) = 24 ways.

Therefore, the total number of ways a student can answer 5 questions under given restrictions is 24 + 24 =
48.

2. Prove the following identities.

𝐶(𝑛, 𝑟 − 1) + 𝐶(𝑛, 𝑟) = 𝐶(𝑛 + 1, 𝑟)

𝐶(𝑚, 2) + 𝐶(𝑛, 2) = 𝐶(𝑚 + 𝑛, 2) − 𝑚𝑛

Proof:
𝑛! 𝑛!
(i). 𝐶(𝑛, 𝑟 − 1) + 𝐶(𝑛, 𝑟) = +
(𝑟−1)! (𝑛−𝑟+1)! 𝑟! (𝑛−𝑟)!

𝑛! 1 1
= { + }
(𝑟−1)! (𝑛−𝑟)! 𝑛−𝑟+1 𝑟

𝑛! 𝑛+1
= ∙
(𝑟−1)! (𝑛−𝑟)! 𝑟 (𝑛−𝑟+1)

(𝑛+1)!
=
𝑟! (𝑛−𝑟+1)!

= 𝐶(𝑛 + 1, 𝑟)
𝑚! 𝑛!
(ii). 𝐶(𝑚, 2) + 𝐶(𝑛, 2) = +
(𝑚−2)! ∙ 2 (𝑛−2)! ∙2

1
= {𝑚(𝑚 − 1) + 𝑛(𝑛 − 1)}
2
1
= {𝑚2 + 𝑛 2 − 𝑚 − 𝑛}
2
1
= (𝑚 + 𝑛)(𝑚 + 𝑛 − 1) − 𝑚𝑛
2

(𝑚+𝑛)!
= − 𝑚𝑛
2 (𝑚+𝑛−2)!

= 𝐶(𝑚 + 𝑛, 2) − 𝑚𝑛

3. A woman has 11 close relatives and she wishes to invite 5 of them to dinner. In how many ways can
she invite them in the following situations:
(i). There is no restriction on the choice.
(ii). Two particular persons will not attend separately.
(iii). Two particular persons will not attend together.

Solution:

(i). Since there is no restriction on the choice of invitees, five out of 11 can be invited in
11!
𝐶(11, 5) = = 462 ways
6! 5!

(ii). Since two particular persons will not attend separately, they should both be invited or not invited.

Suppose if both of them are invited, then three are more invitees are to be selected from the remaining 9
relatives. This can be done in
9!
𝐶(9, 3) = = 84 ways
6! 3!

Suppose if both of them are not invited, then five invitees are to be selected from the remaining 9 relatives.
This can be done in
9!
𝐶(9, 5) = = 126 ways
5! 4!

Therefore, the total number of ways in which the invitees can be selected in this case is 84 + 126 = 210.

(iii). Since two particular persons (Say 𝑃1 & 𝑃2) will not attend together, only one of them can be invited or
none of them can be invited. The number of ways of choosing the invitees with 𝑃1 invited is
9!
𝐶(9, 4) = = 126 ways
5! 4!

Similarly, the number of ways of choosing the invitees with 𝑃2 invited is 126 ways

If both 𝑃1 & 𝑃2 are not invited, then the number of ways of inviting the invitees is
9!
𝐶(9, 5) = = 126 ways
5! 4!

Therefore, the total number of ways in which the invitees can be selected in this case is
126 + 126 + 126 = 378.

4. Find the number of arrangements of all the letters in TALLAHASSEE. How many of these
arrangements have no adjacent A’s?

Solution:

The number of letters in the given word is 11 of which 3 are A’s, 2 each are L’s, S’s, E’s and 1 each are T
and H. Therefore, the number of arrangements (permutations) of the letters in the given word is
11!
= 831600
3! 2! 2! 2! 1! 1!

If we disregard the A’s, the remaining 8 letters can be arranged in


8!
= 5040
2! 2! 2! 1! 1!

In each of these arrangements, there are 9 possible locations for the three A’s. These locations can be chosen
in 𝐶(9, 3) ways. Therefore, the number of arrangements having no adjacent A’s is

9!
5040 × 𝐶(9, 3) = 5040 × = 5040 × 84 = 423360
3! 6!
5. A committee of 12 is to be selected from 10 men and 10 women. In how many ways can the selection
be carried out if
(a) there are no restrictions?
(b) there must be six men and six women?
(c) there must be an even number of women?
(d) there must be more women than men?
(e) there must be at least eight men?

Solution:

(a). If there is no restriction than it is a simple selection of 12 out of 20.

20!
𝐶(20, 12) = = 125970
12! 8!
(b). For 6 men out of 10 and 6 women out of 10. These are two different stages of selection that's why product
rule is used
10! 10!
𝐶(10, 6) × 𝐶(10, 6) = × = 44100
6! 4! 6! 4!
(c). 2, 4, 6, 8 or 10 can be the number of women in committee and corresponding to that men will be 10, 8,
6, 4 and 2.

𝐶(10, 2) × 𝐶(10, 10) + 𝐶(10, 4) × 𝐶(10, 8) + 𝐶(10, 6) × 𝐶(10, 6) + 𝐶(10, 8) × 𝐶(10, 4) + 𝐶(10, 10) ×
𝐶(10, 2) = 63090

(d). Number of women can be 7, 8, 9 or 10 and number of men will be 5, 4, 3, 2 respectively.


𝐶(10, 7) × 𝐶(10, 5) + 𝐶(10, 8) × 𝐶(10, 4) + 𝐶(10, 9) × 𝐶(10, 3) + 𝐶(10, 10) × 𝐶(10, 2) = 40935

(e). Number of men can be 8, 9 or 10 in this case and respectively number of women can be 4, 3 and 2.

𝐶(10, 8) × 𝐶(10, 4) + 𝐶(10, 9) × 𝐶(10, 3) + 𝐶(10, 10) × 𝐶(10, 2) = 10695


☻Binomial and Multinomial Theorems:

Binomial Theorem:
𝑛
On the basic properties of 𝐶(𝑛, 𝑟) = ( ) is that it is the coefficient of 𝑥𝑟𝑦𝑛−𝑟 and 𝑥𝑛−𝑟𝑦𝑟 in the expansion
𝑟
of the expression (𝑥 + 𝑦)𝑛, where 𝑥 and 𝑦 are real numbers. In other words,
(𝑥 + 𝑦)𝑛 = ∑𝑛 𝑛 𝑛 𝑟−𝑛𝑦𝑟
𝑟 𝑛−𝑟 = ∑ 𝑛
𝑟=0 ( ) 𝑥 𝑦 (
𝑟=0 𝑟 ) 𝑥
𝑟
This result is known as the binomial theorem for a positive integral index.

Multinomial Theorem:
For positive integers n and k the coefficient of 𝑥𝑛1 𝑥𝑛2 𝑥𝑛3 … … . . 𝑥𝑛𝑘 in the expansion of
1 2 3 𝑘
(𝑥1 + 𝑥2 + 𝑥3 + ⋯ ⋯ ⋯ + 𝑥𝑘 )𝑛 is 𝑛!
𝑛1! 𝑛2! 𝑛3!……𝑛 𝑘!

Problems:

1. Find the coefficient of

(i) 𝑥 9𝑦 3 in the expansion of (2𝑥 − 3𝑦)12

(ii) 𝑥12 in the expansion of 𝑥3(1 − 2𝑥)10

2 15
(iii) 𝑥0 in the expansion of (3𝑥2 − )
𝑥

Solution:
By the Binomial theorem, we have (𝑥 + 𝑦)𝑛 = ∑𝑛 𝑛 𝑟 𝑛−𝑟 = ∑𝑛 𝑛 𝑟−𝑛 𝑟
𝑦
𝑟=0 ( ) 𝑥 𝑦 𝑟=0 ( ) 𝑥
𝑟 𝑟
12
(i). (2𝑥 − 3𝑦)12 = ∑12 𝑟 12−𝑟
𝑟=0 ( ) (2𝑥) (−3𝑦)
𝑟
12 𝑟( )12−𝑟 𝑟 12−𝑟
= ∑12 𝑥 𝑦
𝑟=0 ( ) 2 −3
𝑟
In the expansion, the coefficient of 𝑥 9 𝑦 3 (which corresponds to 𝑟 = 9) is
12 12−9 = −29 × 33 × 12!
( ) 2 9(−3 ) 9! ∙3!
9
12×11×10
= −29 × 33 ×
6

= −(210 × 33 × 11 × 10)
10
(ii). 𝑥3(1 − 2𝑥)10 = ∑10 𝑟 10−𝑟
𝑟=0 ( ) (−2𝑥) 1
𝑟
10
𝑥3(1 − 2𝑥)10 = ∑10 𝑟 𝑥𝑟+3
𝑟=0 ( 𝑟 ) (−2)

In the expansion, the coefficient of 𝑥12 (which corresponds to 𝑟 = 9) is


10
( ) (−2 )9 = −(10 × 29) = −5120
9
2 15
(iii). (3𝑥2 − ) = ∑15 (15 2 𝑟 2 15−𝑟
𝑟=0 ) (3𝑥 ) (− )
𝑥 𝑥
𝑟
= ∑15 15 𝑟( )15−𝑟 3𝑟−15
𝑟=0 ( ) 3 −2 𝑥
𝑟
In the expansion, the coefficient of 𝑥 9 𝑦 3 (which corresponds to 𝑟 = 5) is
15 15−5 = (−2)10 × 35 × 15!
( ) 3 5(−2 ) 5! ∙10!
5
= 210 × 35 × 3003

2. Determine the coefficient of

(i) 𝑥𝑦𝑧2 in the expansion of (2𝑥 − 𝑦 − 𝑧)4

(ii) 𝑥11𝑦4 in the expansion of (2𝑥3 − 3𝑥𝑦2 + 𝑧2)6

(iii) 𝑥 2 𝑦2𝑧 3 in the expansion of (3𝑥 − 2𝑦 − 4𝑧)7

(iv) 𝑎2𝑏 3𝑐2𝑑5 in the expansion of (𝑎 + 2𝑏 − 3𝑐 + 2𝑑 + 5)16

(v) 𝑤 3𝑥 2 𝑦𝑧 2 in the expansion of (2𝑤 − 𝑥 + 3𝑦 − 2𝑧)8

Solution:

By the multinomial theorem, we have (𝑥1 + 𝑥2 + 𝑥3 + ⋯ ⋯ ⋯ + 𝑥𝑘 )𝑛 is 𝑛!


𝑛1! 𝑛2! 𝑛3!……𝑛 𝑘!

4
(i). The general term is the expansion of (2𝑥 − 𝑦 − 𝑧)4 is ( ) (2𝑥)𝑛1(−𝑦)𝑛2 (−𝑧)𝑛3
𝑛1 , 𝑛2 , 𝑛3

For 𝑛1 = 1, 𝑛2 = 1, 𝑛 3 = 2 this becomes

4 4
( ) (2𝑥)1(−𝑦)1(−𝑧)2=( ) (2)(−1)(−1)2𝑥𝑦𝑧2
1, 1, 2 1, 1, 2
4 4!
This shows that the required coefficient is ( ) (2)(−1)(−1)2 = × (−2) = −12
1, 1, 2 1! 1! 2!

6
(ii). The general term is the expansion of (2𝑥3 − 3𝑥𝑦2 + 𝑧2)6 is ( ) (2𝑥3)𝑛1 (−3𝑥𝑦2)𝑛2 (𝑧2)𝑛3
𝑛1 , 𝑛2 , 𝑛3

For 𝑛3 = 0, 𝑛2 = 2, 𝑛 1 = 3 this becomes

6 6
( ) (2𝑥3)3(−3𝑥𝑦2)2(𝑧2)0 = ( ) (2)3(−3)2(1)0𝑥11𝑦4
3, 2, 0 3, 2, 0
6 6!
This shows that the required coefficient is ( ) (2)3(3)2 = × 72 = 4320
3, 2, 0 3! 2!

7
(iii). The general term is the expansion of (3𝑥 − 2𝑦 − 4𝑧) 7 is ( ) (3𝑥)𝑛1(−2𝑦)𝑛2(−4𝑧)𝑛3
𝑛1 , 𝑛2 , 𝑛3
For 𝑛1 = 2, 𝑛2 = 2, 𝑛 3 = 3 this becomes

7 7
( ) (3𝑥)2(−2𝑦)2(−4𝑧)3=( ) (3) 2(−2)2(−4)3𝑥2𝑦2𝑧 3
2, 2, 3 2, 2, 3
This shows that the required coefficient is

7 ) (3)2(−2)2(−4)3 =
7!
( × 9 × 4 × (−64) = −483840
2, 2, 3 2! 2! 3!

(iv). The general term is the expansion of (𝑎 + 2𝑏 − 3𝑐 + 2𝑑 + 5)16 is

16
( (𝑎)𝑛1(2𝑏)𝑛2(−3𝑐)𝑛3(2𝑑)𝑛4(5)𝑛5
𝑛1, 𝑛2, 𝑛3, 𝑛4, 𝑛5 )

For 𝑛1 = 2, 𝑛 2 = 3, 𝑛3 = 2, 𝑛 4 = 5, 𝑛5 = 16 − (2 + 3 + 2 + 5) = 4, this becomes

16 16
( ) (𝑎)2(2𝑏)3(−3𝑐)2(2𝑑) 5(5)4 = ( ) (2)3(−3)2(2)5(5)4𝑎2𝑏3𝑐2𝑑5
2, 3, 2, 5, 4 2, 3, 2, 5, 4

This shows that the required coefficient is

16 ) (2)3(−3)2(2)5(5)4 =
16!
× 28 × 32 × 54 =
16!
( × 25 × 3 × 53
2, 3, 2, 5, 4 2! 3! 2! 5! 4! (4!)2

(v). The general term is the expansion of (2𝑤 − 𝑥 + 3𝑦 − 2𝑧)8 is

8 𝑛1 𝑛2 𝑛3 𝑛4
(
𝑛1, 𝑛 , 𝑛3 , 𝑛42 ) (2𝑤) (−𝑥) (3𝑦) (−2𝑧)

For 𝑛1 = 3, 𝑛2 = 2, 𝑛3 = 1, 𝑛4 = 2 this becomes


8 8
( ) (2𝑤)3(−𝑥)2(3𝑦)1(−2𝑧)2 = ( ) (2)3(−1)2(3)1(−2) 2) 𝑤 3𝑥 2 𝑦𝑧 2
3, 2, 1, 2 3, 2, 1, 2
This shows that the required coefficient is

8 ) (2)3(−1)2(3)1(−2)2) =
8!
( × 23 × 3 × 22 = 161280
3, 2, 1, 2 3! 2! 1! 2!
☻Combinations with repetitions:

Suppose we wish to select, with repetition, a combination of r objects from a set of n distinct objects. The
(𝑛+𝑟−1)!
number of such selections is given by 𝐶(𝑛 + 𝑟 − 1, 𝑟) ≡ ≡ 𝐶(𝑟 + 𝑛 − 1, 𝑛 − 1).
𝑟! (𝑛−1)!

In other words, 𝐶(𝑛 + 𝑟 − 1, 𝑟) ≡ 𝐶(𝑟 + 𝑛 − 1, 𝑛 − 1) represents the number of combinations of m distinct


objects, taken r at a time, with repetition allowed.

The following are other interpretations of this number:

𝐶(𝑛 + 𝑟 − 1, 𝑟) ≡ 𝐶(𝑟 + 𝑛 − 1, 𝑛 − 1) represents the number of ways in which r identical objects can be
distributed among 𝑛 distinct containers.

𝐶(𝑛 + 𝑟 − 1, 𝑟) ≡ 𝐶(𝑟 + 𝑛 − 1, 𝑛 − 1) represents the number of nonnegative integer solutions of the


equation.

Problems:

1. In how many ways we can distribute 10 identical marbles among 6 distinct containers?

Solution:

The selection consists in choosing with repetitions 𝑟 = 10 marbles for 𝑛 = 6 distinct containers
15!
The required number is 𝐶(6 + 10 − 1, 10) = 𝐶(15, 10) = = 3003
10! 5!

2. Find the number of non-negative integer solutions of the inequality 𝑥 1 + 𝑥 2 + 𝑥3 + ⋯ + 𝑥6 < 10

Solution:

We have to find the number of nonnegative integer solutions of the equation

𝑥 1 + 𝑥2 + 𝑥3 + ⋯ + 𝑥6 = 9 − 𝑥7

where 9 − 𝑥7 ≤ 9 so that 𝑥7 is non negative integer. Thus, the required number in the number of nonnegative
solutions of the equation.

x1 + x2 + x3 + ……+ x7 = 9
15!
This number is 𝐶(7 + 9 − 1, 9) = 𝐶(15, 9) = = 5005
9! 6!

3. In How many ways can we distribute 7 apples and 6 oranges among 4 children so that each child gets
at least 1 apple?

Solution:

Suppose we first give 1 apple to each child. This exhausts 4 apples. The remaining 3 apples can be distributed
among 4 children in 𝐶(4 + 3 − 1, 3) = 𝐶(6, 3) ways. Also, 6 oranges can be distributed among the 4
children in 𝐶(4 + 6 − 1, 6) = 𝐶(9, 6) ways. Therefore, by the product rule, the number ways of distributing
the given fruits under the given condition is
6! 9!
𝐶(6, 3) × 𝐶(9, 6) = × = 20 × 84 = 1680
3! 3! 6! 3!

4. A message is made up of 12 different symbols and it is to be transmitted through a communication


channel. In addition to the 12 symbols, the transmitter will also send a total of 45 blank spaces
between the symbols, with at least three spaces between each pair of consecutive symbols. In how
many ways can the transmitter send such a message?

Solution:

The 12 symbols can be arranged in 12! Ways. For each of these arrangements, there are 11 positions between
the 12 symbols. Since there must be at least three spaces between successive symbols, 33 of the 45 spaces
will be used up. The remaining 12 spaces are to be accommodated in 11 positions. This can be done in
𝐶(11 + 12 − 1, 12) = 𝐶(22, 12) ways. Consequently, by the product rule, the required number is
22!
12! × 𝐶(22, 12) = 12! × = 3.097445 × 1014
12! × 10!
5. In how many ways can one distribute eight identical balls into four distinct containers so that (i) no
container is left empty? (ii) the fourth container gets an odd number of balls?

Solution:

(i). First, we distribute one ball in to each container. Then we distribute the remaining 4 balls into 4
containers. The number of ways of doing this is the required number. This number is

7!
𝐶(4 + 4 − 1, 4) = 𝐶(7, 4) = = 35
4! × 3!
(ii). If the fourth container has o get an odd number of balls, we have to put 1 or 3 or 5 or 7 balls into it.

Suppose we put 1 ball into the fourth container and the remaining 7 balls can be put into the remaining three
containers in

𝐶(3 + 7 − 1, 7) = 𝐶(9, 7) ways

Similarly, we put 3 balls into the fourth container and the remaining 5 balls can be put into the remaining
three containers in

𝐶(3 + 5 − 1, 5) = 𝐶(7, 5) ways

Similarly, we put 5 balls into the fourth container and the remaining 3 balls can be put into the remaining
three containers in

𝐶(3 + 3 − 1, 3) = 𝐶(5, 3) ways

Similarly, we put 7 balls into the fourth container and the remaining 1 ball can be put into the remaining
three containers in

𝐶(3 + 1 − 1, 1) = 𝐶(3, 1) ways

Thus, the total number of ways of distributing the given balls so that the fourth container gets an odd number
of balls is
9! 7! 5! 3!
𝐶(9, 7) + 𝐶(7, 5) + 𝐶(5, 3) + 𝐶(3, 1) = + + + = 36 + 21 + 10 + 3 = 70
7!×2! 5!×2! 3!×2! 1!×2!

6. Find the number of integer solutions of 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 = 32 where 𝑥𝑖 ≥ 0, 1 ≤ 𝑖 ≤ 4.

Solution:

Given 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 = 32, where 𝑥𝑖 ≥ 0, 1 ≤ 𝑖 ≤ 4.


35!
The required number is 𝐶(4 + 32 − 1, 32) = 𝐶(35, 32) = = 6545
32!×3!

7. Find the number of positive integer solutions of the equation 𝑥1 + 𝑥2 + 𝑥3 = 17

Solution:

Given 𝑥1 + 𝑥2 + 𝑥3 = 17, we require 𝑥𝑖 ≥ 1, 1 ≤ 𝑖 ≤ 3.

Let us set 𝑦1 = 𝑥1 − 1, 𝑦2 = 𝑥2 − 1, 𝑦3 = 𝑥3 − 1, then 𝑦1, 𝑦2, 𝑦3 are all nonnegative integers.

Then the given equation is reads (𝑦1 + 1) + (𝑦2 + 1) + (𝑦3 + 1) = 17 or 𝑦1 + 𝑦2 + 𝑦3 = 14


16!
The required number is 𝐶(3 + 14 − 1, 14) = 𝐶(16, 14) = = 120
14!×2!

8. Find the number of positive integer solutions of the equation 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 = 30 where


𝑥1 ≥ 2, 𝑥2 ≥ 3, 𝑥3 ≥ 4, 𝑥4 ≥ 2, 𝑥5 ≥ 0

Solution:

Given 𝑥 1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 = 30

Let us set 𝑦1 = 𝑥1 − 2, 𝑦2 = 𝑥2 − 3, 𝑦3 = 𝑥3 − 4, 𝑦4 = 𝑥4 − 2, 𝑦5 = 𝑥5 then 𝑦1, 𝑦2, 𝑦3, 𝑦4, 𝑦5 are all


nonnegative integers.

Then the given equation is reads

(𝑦1 + 2) + (𝑦2 + 3) + (𝑦3 + 4) + (𝑦4 + 2) + (𝑦5 + 0) = 30 or 𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 = 19


23!
The required number is 𝐶(5 + 19 − 1, 19) = 𝐶(23, 19) = = 8855
19!×4!
BCS405A
Discrete Mathematical Structures
(For the 4th Semester Computer Science and Engineering Stream)

Module 3
Relations & Functions
Content

S.No Topic Page No


1 Syllabus 1-1
2 Cartesian Products, Relations and Functions 1-1
3 Types of Functions 1-4
4 Pigeonhole Principle 5-6
5 Composite functions 7-7
6 Invertible Functions 7-8
7 Properties of Functions 8-9
8 Zero-one matrices and Directed graphs 10-12
9 Properties of Relations 13-13
10 Equivalence relation 14-16
11 Partial orders 17-21
12 External elements in Posets 22-23
MODULE -3
RELATIONS AND FUNCTIONS
☻Syllabus:
Relations and Functions: Cartesian Products and Relations, Functions – Plain and One-to One,
Onto Functions. The Pigeon-hole Principle, Function Composition and Inverse Functions.
Relations: Properties of Relations, Computer Recognition – Zero-One Matrices and Directed
Graphs, Partial Orders – Hasse Diagrams, Equivalence Relations and Partitions.
☻Cartesian Products:
For set A, B ⊆ U, the Cartesian product of A and B is denoted by A × B and equals
{(a, b) |a ϵ A, b ϵ B}
Example: Let U = {1,2,3, … .7}, A = {2,3,4}, B = {4,5}
Then (a). A × B = {(2, 4), (2 ,5), (3, 4), (3, 5), (4, 4), (4, 5)}
(b). B2 = B × B = {(4, 4), (4, 5), (5, 4), (5, 5)}
(c). B3 = B × B × B = {(a, b, c)|a, b, c ϵ B}
☻Relation:
For sets A, B ⊆ U any subset of A × B is Called a Relation From A to B and any subset of A × A
is called a Binary relation on A.
Example:
Let A and B be finite sets with |B| = 3. If there are 4096 relations from A to B what is |A|?
Solution: If |A| = m, |B| = n then there are 2mn relations from A to B.
Given n = 3, 2mn = 4096 ∴ m = 4 = |A|.
☻Functions:
Let A and B be two non-empty sets. Then a function f from A to B is a relation from A to B such
that for each a in A there is a unique b in B such that (𝐚, 𝐛) 𝖾 𝐟
Types of Functions:
(a). Floor function:
The function 𝑓: 𝑅 → 𝑍, is given by
𝑓(𝑥) = ⌊𝑥⌋ = The greatest integer less than or equal to x.
⌊3.8⌋ = 3
⌊−3.8⌋ = −4
(b). Ceiling Function:
The function 𝑔: 𝑅 → 𝑍 is defined by 𝑔(𝑥) = ⌈𝑥⌉
⌈3⌉ = 3, ⌈3.01⌉ = ⌈3.7⌉ = 4 = ⌈4⌉
⌈−3.01⌉ = ⌈−3.7⌉ = −3
(c). Identity function:
A function 𝑓: 𝐴 → 𝐴 such that 𝑓(𝑎) = 𝑎 for every 𝑎 ∈ 𝐴 is called the identity function (or identity
mapping) on A.
In other words, a function f on a set A is an identity function if the image of every element of A
(under 𝑓) is itself.

(d). Constant function:


A function 𝑓: 𝐴 → 𝐵 such that 𝑓(𝑎) = 𝑐 for every 𝑎 ∈ 𝐴, where 𝑐 is a fixed element of B, is called
a Constant function.
In other words, a function f from A to B is a constant function if all elements of A have the same
image (say c) in B.

(e). Injective or one-to-one: A function 𝑓: 𝐴 → 𝐵 is called one-to-one, if each element of B


appears at most once as the image of an element of A.
In other words, If different elements of A have different images in B under 𝑓; If whenever 𝑓(𝑎1) =
𝑓(𝑎2) for 𝑎1, 𝑎2 ∈ 𝐴, then 𝑎1 = 𝑎2

(f). Surjective or onto: A function 𝑓: 𝐴 → 𝐵 is called onto if for every element b of B there is an
element a of A such that 𝑓(𝑎) = 𝑏
In other words. 𝑓 is an onto function from A to B if every element of B has a Preimage in A.

(g). Bijective or one-to-one correspondence: A function which is both one-to-one and onto is
called Bijective.

Note: Number of one-to-one functions from A to B is


𝑛!
𝑃(𝑛, 𝑚) = Where |𝐴| = 𝑚, |𝐵| = 𝑛 & 𝑚 >= 𝑛
(𝑛−𝑚)!

Number of onto functions from A to B is


n
𝑃(𝑛, 𝑚) = ∑ (−1)k( n )(n − k) m
n−k
k=0

Problems:
1. Let 𝐴 = {1,2,3,4,5,6,7}, 𝐵 = {𝑤, 𝑥, 𝑦, 𝑧}. Find the number of Onto Functions from A to B.
Solution: Given 𝑚 = |𝐴| = 7 & 𝑛 = |𝐵| = 4
n
𝑃(7,4) = ∑ (−1)k( 4 )(4 − k)7 = 8400
4−k
k=0
☻Pigeonhole Principle:
If 𝑚 pigeons occupy 𝑛 pigeon holes and if 𝑚 > 𝑛, then two or more pigeons occupy the same
pigeonhole.
Generalization:
If 𝑚 pigeons occupy 𝑛 pigeonholes, then at least one pigeonhole must contain (𝑝 + 1) or more
(𝑚−1)
pigeons, where 𝑝 = ⌊ ⌋
𝑛
Problems:
1. ABC is an equilateral triangle whose sides are of length 1cm each. If we select 5 points
inside the triangle, prove that at least 2 of these points are such that the distance between
them is less than 1 cm.
2

Solution:
Consider the triangle DEF formed by the mid points of the sides BC, CA and AB of the given
triangle ABC. Then the triangle ABC is partition into 4 small equilateral triangles, each of which
has sides equal to 1 cm treating each of these four portions as a pigeonhole and 5 points chosen
2
inside the triangle as pigeons, we find by using the pigeonhole principle that at least one portion
1
must contain two or more points. Evidently the distance between such points is < cm.
2

2. A magnetic tape contains a collection of 5 lakh strings made up to four or fewer number of
English Letters can all the strings is the collection be distinct?
Solution:
Each place is an n letter string can be filled in 26 ways. Therefore, the possible number of strings
made up of n letters is 26𝑛 consequently, the total number of different possible strings made up of
four or fewer letter is 264 + 263 + 262 + 26 = 4,75,254.
Therefore, if there are 5 lakh strings in the tape, then at least one string is repeated. Thus, all the
strings in the collection cannot be distinct.
3. Shirts numbered consecutively from 1 to 20 are worn by 20 students of a class. When any
3 of these students are chosen to be a debating team from the class, the sum of their shirt
numbers is used as a code number of the team. Show that if any 8 of the 20 are selected,
then from these 8 we may form at least two different teams having the same code number.
Solution:
From the 8 of the 20 students selected the numbers of teams of 3 students that can be formed is
8𝐶 =56. According to the way in which the code number of a team is determined, we note that the
3
smallest possible code number is 1 + 2 + 3 = 6 and the largest possible code number is 18 +
19 + 20 = 57. Thus, the code number vary from 6 to 57, and these are 52 in number. As such
only 52 code number are available for 56 possible teams, consequently by the pigeonhole principle,
at least two different teams will have the same code number.
☻Composition of functions:
Consider three non-empty sets A, B, C and the functions 𝑓: 𝐴 → 𝐵 and 𝑔: 𝐵 → 𝐶. the composition
of these two functions is defined as the function 𝑔𝑜𝑓: 𝐴 → 𝐶 with (𝑔𝑜𝑓)(𝑎) = 𝑔{𝑓(𝑎)} for all
𝑎𝜖𝐴.
Problems:
1. Consider the function 𝑓 and 𝑔 defined by 𝑓(𝑥) = 𝑥3 and 𝑔(𝑥) = 𝑥2 + 1 Ɐ 𝑥𝜖𝑅 find
𝑔𝑜𝑓, 𝑓𝑜𝑔, 𝑓2 and 𝑔2
Solution:
Here, both f and g are defined on R, therefore all of the functions 𝑔𝑜𝑓, 𝑓𝑜𝑔, 𝑓2 = 𝑓𝑜𝑓and 𝑔2 =
𝑔𝑜𝑔 are defined on R and we find
(𝑔𝑜𝑓)(𝑥) = 𝑔{𝑓(𝑥)} = 𝑔(𝑥3) = (𝑥3)2 + 1 = 𝑥6 + 1
(𝑓𝑜𝑔)(𝑥) = 𝑓{𝑔(𝑥)} = 𝑓(𝑥2 + 1) = (𝑥2 + 1)3
𝑓2(𝑥) = (𝑓𝑜𝑓)(𝑥) = 𝑓{𝑓(𝑥)} = 𝑓(𝑥3) = (𝑥3)3 = 𝑥9
𝑔2(𝑥) = (𝑔𝑜𝑔)(𝑥) = 𝑔{𝑔(𝑥)} = 𝑔(𝑥2 + 1) = (𝑥2 + 1)2 + 1

2. Let f and g be function from R to R defined by 𝑓(𝑥) = 𝑎𝑥 + 𝑏 and 𝑔(𝑥) = 1 − 𝑥 + 𝑥2 if


(𝑔𝑜𝑓)(𝑥) = 9𝑥2 − 9𝑥 + 3 determine a, b.
Solution: We have (𝑔𝑜𝑓)(𝑥) = 9𝑥2 − 9𝑥 + 3 = 𝑔{𝑓(𝑥)}
= 𝑔{𝑎𝑥 + 𝑏}
= 1 − (𝑎𝑥 + 𝑏) + (𝑎𝑥 + 𝑏) 2
= 𝑎2𝑥2 + (2𝑎𝑏 − 𝑎)𝑥 + (1 − 𝑏 + 𝑏2)
Comparing the corresponding coefficients
9 = 𝑎2, 9 = 𝑎 − 2𝑎𝑏, 3 = 1 − 𝑏 + 𝑏2.
𝑎 = ±3, 𝑏 = −1,2
☻Invertible Functions:
A function 𝑓: 𝐴 → 𝐵 is said to be invertible if there exists a function 𝑔: 𝐵 → 𝐴 such that 𝑔𝑜𝑓 = 𝐼𝐴
and 𝑓𝑜𝑔 = 𝐼𝐵 where 𝐼𝐴 is the identity function on A and 𝐼𝐵is the identity function on B.
Problems:
1. Let 𝐴 = {1,2,3,4} and 𝑓 and 𝑔 be function From A to A given by 𝑓 =
{(1,4), (2,1), (3,2), (4,3)} 𝑔 = {(1,2), (2,3), (3,4), (4,1)}. Prove that 𝑓 and 𝑔 are inverse
of each other.
Solution:
(𝑔𝑜𝑓)(1) = 𝑔{ 𝑓(1)} = 𝑔(4) = 1 = 𝐼𝐴(1)
(𝑔𝑜𝑓)(2) = 𝑔 {𝑓(2)} = 𝑔(1) = 2 = 𝐼𝐴(2)
(𝑔𝑜𝑓)(3) = 𝑔{ 𝑓(3)} = 𝑔(2) = 3 = 𝐼𝐴(3)
(𝑔𝑜𝑓)(4) = 𝑔{ 𝑓(4)} = 𝑔(3) = 4 = 𝐼𝐴(4)
(𝑓𝑜𝑔)(1) = 𝑓{𝑔(1)} = 𝑓(2) = 1 = 𝐼𝐵(1)
(𝑓𝑜𝑔)(2) = 𝑓{𝑔(2)} = 𝑓(3) = 2 = 𝐼𝐵(2)
(𝑓𝑜𝑔)(3) = 𝑓{𝑔(3)} = 𝑓(4) = 3 = 𝐼𝐵(3)
(𝑓𝑜𝑔)(4) = 𝑓{𝑔(4)} = 𝑓(1) = 4 = 𝐼𝐵(4)
Thus, for all 𝑥 𝜖 𝐴, we have(𝑔𝑜𝑓)(𝑥) = 𝐼𝐴(𝑥) and (𝑓𝑜𝑔)(𝑥) = 𝐼𝐵(𝑥), therefore 𝑔 is an inverse
of 𝑓 and 𝑓 is an inverse of 𝑔.
2. Consider the function 𝑓: 𝑅 → 𝑅 defined by 𝑓(𝑥) = 2𝑥 + 5. Let a function 𝑔: 𝑅 → 𝑅 be
1
defined by 𝑔(𝑥) = Prove that 𝑔 is an inverse of 𝑓.
2(𝑥−5)

Solution:
We check that for any 𝑥𝜖𝑅
(𝑔𝑜𝑓)(𝑥) = 𝑔[𝑓(𝑥)] = 𝑔(2𝑥 + 5)
= 1/2(2𝑥 + 5 − 5) = 𝑥 = 𝐼𝑅(𝑥)
(𝑓𝑜𝑔)(𝑥) = 𝑓[𝑔(𝑥)] = 𝑓{1/2(𝑥 − 5)}
= 2{1/2(𝑥 − 5)} + 5 = 𝑥 = 𝐼𝑅(𝑥)

☻Properties of Functions:
Theorem 1: A function 𝑓: 𝐴 → 𝐵 is invertible if and only if one-to-one and onto.
Proof: Suppose that f is invertible then there exists a unique function 𝑔: 𝐵 → 𝐴 such that 𝑔𝑜𝑓 =
𝐼𝐴 and 𝑓𝑜𝑔 = 𝐼𝐵Take any 𝑎1, 𝑎2 𝜖 𝐴 then
𝑓(𝑎1) = 𝑓( 𝑎2) ⇒ 𝑔{𝑓(𝑎1)} = 𝑔{𝑓( 𝑎2)}
⇒ (𝑔𝑜𝑓)( 𝑎1) = (𝑔𝑜𝑓)( 𝑎2)
⇒ 𝐼𝐴(𝑎1) = 𝐼𝐴( 𝑎2)
⇒ 𝑎1 = 𝑎2
This prove 𝑓 is one-to-one
Next, take any 𝑏 𝜖 𝐵. Then 𝑔(𝑏) 𝜖 𝐴 and 𝑏 = 𝐼𝐵(𝑏)
= (𝑓𝑜𝑔)(𝑏) = 𝑓{𝑔(𝑏)}.
Thus, 𝑏 is the image of an element 𝑔(𝑏) 𝜖 𝐴 under f. therefore, f is onto as well.
Conversely, suppose that f is one-to-one and onto then for each 𝑏 𝜖 𝐵 there is a unique 𝑎 𝜖 𝐴 such
that 𝑏 = 𝑓(𝑎) now consider the function 𝑔: 𝐵 → 𝐴 defined by 𝑔(𝑏) = 𝑎 then
(𝑔𝑜𝑓)(𝑎) = 𝑔{𝑓(𝑎)} = 𝑔(𝑏) = 𝑎 = 𝐼𝐴(𝑎) and (𝑓𝑜𝑔)(𝑏) = 𝑓{𝑔(𝑏)} = 𝑓(𝑎) = 𝑏 = 𝐼𝐵(𝑏)
These show that f is invertible with g as the inverse. This completes the proof of the theorem.

Theorem 2: If 𝑓: 𝐴 → 𝐵 and 𝑔: 𝐵 → 𝐶 are invertible functions, then


𝑔𝑜𝑓: 𝐴 → 𝐶 is an invertible function and (𝑔𝑜𝑓)−1 = 𝑓−1𝑜𝑔−1.
Proof: Since 𝒇 and 𝒈 are invertible functions; they are both one-to-one and onto consequently
𝑔𝑜𝑓 is both one-to-one and onto therefore, 𝑔𝑜𝑓 is invertible. Now the inverse 𝑓−1 of 𝑓 is a function
from 𝐵 to 𝐴 and the inverse 𝑔−1 of 𝑔 is a function from 𝐶 to 𝐵.
Therefore, if ℎ = 𝑓−1𝑜𝑔−1 then ℎ is a function from 𝐶 to 𝐴.
We find that
(𝑔𝑜𝑓)𝑜ℎ = (𝑔𝑜𝑓)𝑜(𝑓−1𝑜𝑔−1) = 𝑔𝑜(𝑓𝑜𝑓−1)𝑜𝑔−1 = 𝑔𝑜𝐼𝐵𝑜𝑔−1
= 𝑔𝑜𝑔−1 = 𝐼𝐶
And
ℎ𝑜(𝑔𝑜𝑓) = (𝑓−1𝑜𝑔−1)𝑜(𝑔𝑜𝑓) = 𝑓−1𝑜(𝑔−1𝑜𝑔)𝑜𝑓 = 𝑓−1𝑜𝐼𝐵𝑜𝑓
= 𝑓−1𝑜 𝑓 = 𝐼𝐴
The above expression show that ℎ is the inverse of 𝑔𝑜𝑓,
i.e., ℎ = (𝑔𝑜𝑓)−1. Thus (𝑔𝑜𝑓)−1 = ℎ = 𝑓−1𝑜𝑔−1 this completes the proof of the theorem.
☻Zero-one matrices and Directed graphs:
Power of 𝑹:
Given a set 𝐴 and a relation 𝑅 on 𝐴 we define the powers of 𝑅 recursively by
(a) 𝑅𝐼 = 𝑅 (b) for 𝑛 ∈ 𝑍+, 𝑅𝑛+1 = 𝑅𝑜𝑅𝑛
Example:
If 𝐴 = {1,2,3,4} and 𝑅 = {(1,2) (1,3) (2,4) (3,2)} then 𝑅2 = {(1,4), (1,2), (3,4)}, 𝑅3 = {(1,4)}
and for 𝑛 ≥ 4, 𝑅𝑛 = ф.
Zero Matrix:
An 𝑚 × 𝑛 Zero-matrix 𝐸 = (𝑒𝑖𝑗)𝑚×𝑛 is a rectangular array of number arranged is m rows and n
columns, where each 𝑒𝑖𝑗, for 1 ≤ 𝑖 ≤ 𝑚 and 1 ≤ 𝑖 ≤ 𝑛 denote the entry is the 𝑖𝑡ℎrow and 𝑗𝑡ℎ
column of 𝐸, and each such entry is 0 or 1.
𝒏 × 𝒏 (𝟎, 𝟏) matrix:

For 𝑛 ∈ 𝑍+, 𝐼𝑛 = (𝛿𝑖𝑗)𝑛×𝒏 is the 𝑛 × 𝑛 (0,1)-matrix where

1, if i = j
δij== {
0, if i ≠ j
☻Digraph of a relation:
Let V be a finite nonempty set. A directed graph G on V is made up of the elements of V, called
the vertices or nodes of G, and a subset E, of 𝑉 × 𝑉 that contains the edges or arcs, of G. The set
V is called the vertex set of G, the set E edge set. We then write 𝐺 = (𝑉, 𝐸) to denote the graph.
If 𝑎, 𝑏 ∈ 𝑉 and (𝑎, 𝑏) ∈ 𝐸 then there is an edge from 𝑎 to 𝑏 vertex 𝑎 is called the origin or source
of the edge with 𝑏 the terminus or terminating vertex and we say that 𝑏 is adjacent from 𝑎 and that
𝑎 is adjacent to 𝑏. In addition, if 𝑎 ≠ 𝑏, then (𝑎, 𝑏) ≠ (𝑏, 𝑎). An edge of the form (𝑎, 𝑎) is called
a loop.
Problems:
1. Let 𝐴 = {1,2,3,4} and let R be the relation on A defined by 𝑥𝑅𝑦 if and only if 𝑦 = 2𝑥.
a) Write down R as asset of ordered pairs.
b) Draw the digraph of R.
c) Determine the in-degrees and out-degrees of the vertices in the digraph.
Solution:
a) We observe that for 𝑥, 𝑦 ∈ 𝐴, (𝑥, 𝑦) ∈ 𝑅 if and only if 𝑦 = 2𝑥. thus 𝑅 = {(1,2), (2,4)}.
b) The digraph of R is as shown below
c) From the above digraph, we note that 3 is an isolated vertex and that for the vertex 1,2,4 the in-
degrees and out-degrees are as shown in the table
Vertex 1 2 4
In-degree 0 1 1

Out-degree 1 1 0

2. Let 𝐴 = {1,2,3,4,6} and R be a relation on A defined by 𝑎𝑅𝑏 if and only if 𝑎 is a multiple


of 𝑏. Represent the relation R as a matrix and draw its digraph.
Solution: 𝑅 = {(1,1), (2,1), (2,2), (3,1), (3,3), (4,1), (4,2), (4,4), (6,1), (6,2), (6,3), (6,6)}
10000
𝖥1 1 0 0 0 1
𝑀𝑅 = 1 0 1 0 0
I1 1 0 1 0I
[ 1 1 1 0 1]

3. Find the relation represented by the digraph given below. Also write down its matrix.
Solution:
By examining the given digraph which has 4 vertices, we note that the relation R represented by it
is defined on the set 𝐴 = {1,2,3,4} and is given by 𝑅 = {(1,2), (1,4), (2,2), (2,3), (4,1), (4,4)}.
The matrix of R is
0101
0110
𝑀𝑅 = [ ]
0000
1001
☻Properties of Relations:
1. Reflexive relation:
A relation R on a set A is said to be reflexive, if (𝑎, 𝑎) ∈ 𝑅, for all 𝑎 ∈ 𝐴.
Example: ≤
2. Irreflexive relation:
A relation is said to be irreflexive, if (𝑎, 𝑎) ∉ 𝑅 for any 𝑎 ∈ 𝐴.
Example: < , >
3. Symmetric Relation:
A relation R on a set is said to be symmetric, If (𝑏, 𝑎) ∈ 𝑅 whenever (𝑎, 𝑏) ∈ 𝑅 for all 𝑎, 𝑏 ∈ 𝐴.
A relation which is not symmetric is called an Asymmetric relation.
Example: If 𝐴 = {1,2,3} and 𝑅1 = {(1,1), (1,2), (2,1)}, 𝑅2 = {(1,2), (2,1), (1,3)}
𝑅1 is symmetric and 𝑅2 is asymmetric.
4. Antisymmetric relation:
A relation R on a set A is said to be antisymmetric, if whenever (𝑎, 𝑏) ∈ 𝑅 and (𝑏, 𝑎) ∈ 𝑅 then
𝑎 = 𝑏.
Example: is less than or equal to.
5. Transitive Relation:
A relation on a set A is said to be transitive if whenever (𝑎, 𝑏) ∈ 𝑅 and (𝑏, 𝑐) ∈ 𝑅 then (𝑎, 𝑐 ) ∈ 𝑅
for all 𝑎, 𝑏, 𝑐 ∈ 𝐴.
Examples:
1. Determine nature of the relations.
[1] 𝐴 = {1,2,3}, 𝑅1 = {(1,2), (2,1), (1,3), (3,1)}
- Symmetric but not reflexive.
[2] 𝑅2 = {(1,1), (2,2), (3,3), (2,3)}
- Reflexive but not symmetric.
[3] 𝑅3 = {(1,1), (2,2), (3,3)}
- Reflexive and symmetric.
[4] 𝑅4 = {(1,1), (2,2), (3,3), (2,3), (3,2)}
- Both reflexive and symmetric.
[5] 𝑅5 = {(1,1), (2,3), (3,3)}
- Neither reflexive nor symmetric
2. If 𝐴 = {1,2,3,4}, 𝑅1 = {(1,1), (2,3), (3,4), (2,4)} is transitive 𝑅2 = {(1,3), (3,2)} is not
transitive.
☻Equivalence relation:
A relation that is reflexive, symmetric and transitive.
Problems:
1. A relation R on a set 𝐴 = {𝑎, 𝑏, 𝑐} is represented by the following matrix.
101
𝑀𝑅 = [0 1 0] determine whether R is an Equivalence relation.
001
Solution: 𝑅 = {(𝑎, 𝑎), (𝑎, 𝑐), (𝑏, 𝑏), (𝑐, 𝑐)} we note that (𝑎, 𝑐) ∈ 𝑅 but (𝑐, 𝑎) ∉ 𝑅
∴ R is not symmetric
∴R is not equivalence

2. For a fixed integer 𝑛 > 1 prove that the relation congruent modulo 𝑛 is an equivalence
relation on the set of all integers 𝑍.
Solution: For 𝑎, 𝑏 ∈ 𝑧, we say that 𝑎 is congruent to 𝑏 modulo 𝑛 if 𝑎 − 𝑏 is a multiple of n or
equivalently, 𝑎 − 𝑏 = 𝑘𝑛 for some 𝑘 ∈ 𝑍.
Let us denote this relation by 𝑅 so that 𝑎𝑅𝑏 means 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑛) we have to prove that 𝑅 is
an equivalence relation.
We note that for every 𝑎 ∈ 𝑍, 𝑎 − 𝑎 = 0 is a multiple of 𝑛 ie, 𝑎 ≡ 𝑎(𝑚𝑜𝑑 𝑛), 𝑎𝑅𝑎
R is reflexive. Next for all 𝑎, 𝑏 ∈ 𝑧
𝑎𝑅𝑏 → 𝑎 ≡ 𝑏 𝑚𝑜𝑑 𝑛.
→ 𝑎 − 𝑏 is a multiple of 𝑛
→ 𝑏 − 𝑎 is a multiple of 𝑛
→ 𝑏 ≡ 𝑎 𝑚𝑜𝑑 𝑛
→ 𝑏𝑅𝑎
R is symmetric.
Lastly, we note that for all 𝑎, 𝑏, 𝑐 ∈ 𝑍
𝑎𝑅𝑏 and 𝑏𝑅𝑐 ⇒ 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑛) and 𝑏 ≡ 𝑐(𝑚𝑜𝑑 𝑛)
= 𝑎 − 𝑏 and 𝑏 − 𝑐 are multiples of 𝑛
= (𝑎 − 𝑏) + (𝑏 − 𝑐) = (𝑎 − 𝑐) is a multiple of 𝑛
= 𝑎 ≡ 𝑐( 𝑚𝑜𝑑 𝑛) = 𝑎𝑅𝑐
R is transitive. This proves that R is equivalence relation.

☻Equivalence Class:
Let R be an equivalence relation on a set A and 𝑎 ∈ 𝐴. Then the set of all those elements
𝑥 of A which are related to a by R is called the equivalence class of a with respect to R.
𝑎 ̅ = [𝑎] = 𝑅(𝑎) = {𝑥 ∈ 𝐴|(𝑥, 𝑎) ∈ 𝑅}
Example:
𝑅 = {(1,1), (1,3), (2,2), (3,1), (3,3)} defined on the set 𝐴 = {1,2,3} we find elements 𝑥 of A for
which (𝑥, 1) ∈ 𝑅 are 𝑥 = 1, 𝑥 = 3. Therefore {1,3} is the equivalence class of 1
i.e., [1] = {1,3}, [2] = [2], [3] = {1,3}
☻Partition of a set:
Let A be a non-empty set suppose that there exist non-empty subsets A1,A2,A3,…… AK of A such
that the following two conditions hold.
1) A is the union of 𝐴1, 𝐴2, 𝐴3, … … 𝐴𝐾 that is 𝐴 = 𝐴1𝑈𝐴2𝑈𝐴3, … 𝑈𝐴𝐾
2) Any two of the subsets 𝐴1, 𝐴2, 𝐴3, … … 𝐴𝐾 are disjoint i.e., 𝐴𝑖 ꓵ 𝐴𝑗 = ф
for 𝑖 ≠ 𝑗 then the set 𝑃 = { 𝐴1, 𝐴2, 𝐴3, … … 𝐴𝐾} is called a partition of A. also
𝐴1, 𝐴2, 𝐴3, … … 𝐴𝐾 are called the blocks or cells of the partition.
A partition of a set A with 6 blocks is as shown below

𝐴 = {1,2,3,4,5,6,7,8} and its following subsets 𝐴1 = {1,3,5,7}, 𝐴2 = {2,4}, 𝐴3 = {6,8}


𝑃 = {𝐴1, 𝐴2, 𝐴3} is a Partition of A with A1 A2 A3 as blocks of the partition?
𝐴4 = {1,3,5} then 𝑃1 = {𝐴2, 𝐴3, 𝐴4} in not a partition of the set A. Because although the subsets
𝐴2, 𝐴3 and 𝐴4 are mutually disjoint A is not the union of these subsets. We find if 𝐴5 = { 5,6,8}
then 𝑃2 = {𝐴1, 𝐴2, 𝐴5} is also not a partition of A because A is the union of 𝐴1, 𝐴2, 𝐴5. 𝐴1, 𝐴5are
not disjoint.
Problems:
1. For the set A and the relation R on A
𝐴 = {1,2,3,4,5}, 𝑅 = {(1,1), (2,2), (2,3), (3,2), (3,3), (4,4), (4,5), (5,4), (5,5)}
Defined on A find the partition of A induced by R.
Solution:
By examining the given 𝑅1 we find that [1] = {1}, [2] = {2,3}, [3] = {2,3}, [4] = {4,5}, [5] =
{4,5} of these equivalence classes only [1], [2] and [4] are distinct these constitute the partition
P of A determined by R then
𝑃 = {[1], [2], [4]} is the partition induced by R
𝐴 = [1] 𝑈 [2] 𝑈 [4] = {1}𝑈{2,3}𝑈{4,5}
☻Partial orders:
A relation R on a set A is said to be a partial ordering relation or a partial order on A if (i) R is
reflexive (ii) R is antisymmetric and (iii) R is transitive on A.
Poset:
A set with a partial order R defined on it is called a partially ordered set or Poset.
Example: less than or equal to. On set of integers.
Total Order:
Let R be a partial order on a set A. Then R is called a total order on A. if for all 𝑥, 𝑦 ∈ 𝐴 either
𝑥𝑅𝑦 or 𝑦𝑅𝑥. In this case the poset (𝐴, 𝑅) is called a totally ordered set.
Hasse Diagram:

A Hasse diagram is a graphical rendering of a partially ordered set displayed via the cover
relation of the partially ordered set with an implied upward orientation. A point is drawn for each
element of the poset, and line segments are drawn between these points according to the following
two rules:

1. If 𝑥 < 𝑦 in the poset, then the point corresponding to 𝑥 appears lower in the drawing than the
point corresponding to 𝑦.

2. The line segment between the points corresponding to any two elements 𝑥 and 𝑦 of the poset is
included in the drawing iff 𝑥 covers 𝑦 or 𝑦 covers 𝑥 .

Problems:
1. Let 𝐴 = {1,2,3,4} and 𝑅 = {(1,1), (1,2), (2,2), (2,4), (1,3), (3,3), (3,4), (1,4), (4,4)}.
Verify that R is a partial order on A. also write down the Hasse diagram for R.
Solution:
We observe that the given relation R is reflexive and transitive. Further R does not contain
ordered pairs of the form (𝑎, 𝑏) and (𝑏, 𝑎) with 𝑏 ≠ 𝑎. R is antisymmetric as such R is a partial
order on A.
The Hasse diagram for R must exhibit the relationships between the elements of A as defined by
R. if (𝑎, 𝑏) ∈ 𝑅 there must be an upward edge from a to b.

2. Let 𝐴 = {1,2,3,4,6,8,12} on A, define the partial ordering relation R by 𝑥𝑅𝑦 if and only
if 𝑥/𝑦 draw the Hasse diagram for R.
Solution:
𝑅 = {(1,1), (1,2), (1,3), (1,4), (1,6), (1,8), (1,12), (2,2), (2,4), (2,6), (2,8), (2,12),
(3,3), (3,6), (3,12), (4,4), (4,8), (4,12), (6,6), (6,12), (8,8), (12,12)}.
The Hasse diagram for this R is as shown below.

3. Draw the Hasse diagram representing the positive divisors of 36.


Solution:
The set of positive divisors of 36 is
𝐷36 = {1,2,3,4,6,9,12,18,36} The relation R of divisibility (that is 𝑎𝑅𝑏 if and only if a
divides b) is a partial order on this set. The Hasse diagram for this partial order is required
here.
1 is related to all elements of 𝐷36
2 is related to 2,4,6,12,18,36
3 is related to 3,6,9,12,18,36
4 is related to 4,12,36
6 is related to 6,12,18,36
9 is related to 9,18,36
12 is related to 12 and 36
18 is related to 18 and 36
36 is related to 36.
The Hasse diagram for R must exhibit all of the above facts.

4. A partial order R on set 𝐴 = {1,2,3,4} is represented by the following diagraph. Draw


the Hasse diagram for R.

Solution:
By observing the given diagraph, we note that
𝑅 = {(1,1), (2,2), (3,3), (4,4), (1,2), (1,3), (1,4), (2,4)}
☻External elements in Posets:
Upper bond of a subset B of A: an element 𝑎 ∈ 𝐴 is called an upper bound of a subset B of A
if 𝑥𝑅𝑎 for all 𝑥 ∈ 𝐵.
Lower bound of a subset B of A: an element 𝑎 ∈ 𝐴 is called lower bound of a subset B is A if
𝑎𝑅𝑥 for all 𝑥 ∈ 𝐵.

Supremum (LꓴB): An element 𝑎 ∈ 𝐴 is called the LꓴB of a subset B of A if the following two
conditions hold.
i) A is an upper bound of B.
ii) If 𝑎𝐼 is an upper bound of B then 𝑎𝑅𝑎𝐼.
Infimum (GLB): An element 𝑎 ∈ 𝐴 is called the GLB of a subset B of A if the following two
conditions hold
i) A is a lower bound of B.
ii) If 𝑎𝐼 is a lower bound of B then 𝑎𝐼𝑅𝑎.
Problems:
1. Consider the Hasse diagram of a Poset (A, R) given below.

If 𝐵 = {𝑐, 𝑑, 𝑒} find (if they exist).


i) All upper bounds of B
ii) All lower bounds of B
iii) The least upper bound of B
iv) The greatest lower bound of B
Solution:
(i) All of 𝑐, 𝑑, 𝑒 which are is B are related to 𝑓, 𝑔, ℎ therefore 𝑓, 𝑔, ℎ re upper bounds of B.
(ii) The elements 𝑎, 𝑏 and 𝑐 are related to all of 𝑐, 𝑑, 𝑒 which are in B. therefore 𝑎, 𝑏 and 𝑐 are
lower bounds of B.
(iii) The upper bound 𝑓 of B is related to the other upper bounds 𝑔 and ℎ of B. Therefore, 𝑓 is
the LꓴB of B.
(iv) The lower bounds 𝑎 and 𝑏 of B are related to the lower bound 𝑐 of B. therefore C is the GLB
of B.

2. Consider the Poset whose Hasse diagram is shown below. Find LꓴB and GLB of 𝐵 =
{𝑐, 𝑑, 𝑒}

By examining all upward paths from 𝑐, 𝑑, 𝑒 is the given Hasse diagram. We find that LꓴB (𝐵) =
𝑒. by examining all upward paths to 𝑐, 𝑑, 𝑒 we find that 𝐺𝐿𝐵(𝐵) = 𝑎.
☻Lattice:
Let (A, R) be a Poset this Poset is called a lattice. For all 𝑥, 𝑦 ∈ 𝐴 the elements 𝐿ꓴ𝐵 {𝑥, 𝑦} and
𝐺𝐿𝐵 {𝑥, 𝑦} exist is A.
Example: Let (𝐴, 𝑅) be Poset. The Poset is called a.
1). Consider the set N of all-natural numbers and let R be the partial order “less than or equal to”
then for any 𝑥, 𝑦 ∈ 𝑁, we note that 𝐿ꓴ𝐵 {𝑥, 𝑦} = 𝑀𝑎𝑥{𝑥, 𝑦} and 𝐺𝐿𝐵 {𝑥, 𝑦} = 𝑚𝑖𝑛{𝑥, 𝑦} and
both of these belong to 𝑁. Therefore, the Poset (𝑁, ≤ ) is a lattice.
2). Consider the Poset (𝑍+, ∣) where 𝑍+ is set of all positive integer & ∣ is the divisibility set. We
can check that for any 𝑎, 𝑏 ∈ 𝑍+, the least common multiple of 𝑎 & 𝑏 is the 𝐿ꓴ𝐵 {𝑎, 𝑏} & the
GCD of 𝑎 & 𝑏 is 𝐺𝐿𝐵 {𝑎, 𝑏}. Since these belongs to 𝑍+ we infer that (𝑍+, ∣) is a lattice.
3). Consider the poset where Hasse Diagram is
By examining the Hasse diagram, we note that 𝐺𝐿𝐵 {3, 4} does not exist.
∴ The poset is not a Lattice
BCS405A
Discrete Mathematical Structures
(For the 4th Semester Computer Science and Engineering Stream)

Module 4
THE PRINCIPLE OF INCLUSION &
EXCLUSION, RECURRENCE RELATIONS
Content

S.No Topic Page No


1 Syllabus 1-1
2 Principle of Inclusion and Exclusion 1-6
3 Derangements 7-9
4 Rook Polynomials 10-13
5 First-order Recurrence Relations 14-16
6 Second-order Homogeneous Recurrence Relations 16-19
MODULE-4
THE PRINCIPLE OF INCLUSION & EXCLUSION, RECURRENCE RELATIONS

☻The principle of Inclusion – Exclusion:


If 𝑆 is a finite set, then the number of elements in S is called the order (or the size, or the
cardinality) of 𝑆 and is denoted by |S|. If A and B are subsets of 𝑆, then the order od 𝐴 𝑈 𝐵 is
given by the formula
|𝐴 𝖴 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵|
Thus, for determining the number of elements that are in 𝐴 𝑈 𝐵, we include all elements in A
and B but exclude all elements common to A and B.
Principle of Inclusion – Exclusion for n sets.
Let 𝑆 be a finite set and 𝐴1, 𝐴2 … … … … 𝐴𝑛 be subset of 𝑆. Then the principle of
inclusion – exclusion for 𝐴1, 𝐴2 .............. 𝐴𝑛 states that
|𝐴1 𝖴 𝐴2 𝖴 𝐴3 … … 𝖴 𝐴𝑛|
= Σ|𝐴𝑖| − Σ|𝐴𝑖 ∩ 𝐴𝑗| + Σ|𝐴𝑖 ∩ 𝐴𝑗 ∩ 𝐴𝑘| + ⋯ + (−1)𝑛−1|𝐴1 ∩ 𝐴2 … .∩ 𝐴𝑛|

Generalization:
The principle of inclusion – exclusion as given by expression
̅ = 𝑆0 − 𝑆1 + 𝑆2 − 𝑆3 + ⋯ + (−1)𝑛 𝑆𝑛
𝑁
The number of elements in 𝑆 that satisfy none of the conditions 𝐶1, 𝐶2 ...... 𝐶𝑛. The following
expression determines the number of elements in S that satisfy exactly m of the n conditions
(0 ≤ 𝑚 ≤ 𝑛 ≤);
𝑚+1 𝑚+2 𝑛−𝑚 𝑛
𝐸𝑚 = 𝑆𝑚 − ( ) 𝑆𝑚+ + ( ) 𝑆𝑚+1 … . +(−1) ( ) 𝑆𝑛
1 2 𝑛−𝑚
Problems:
1. Out of 30 students in a hostel, 15 study History, 8 study Economics, and 6 study
Geography. It is known that 3 students study all these subjects. Show that 7 or more
students’ study none of these subjects.
Solution:
Let ‘S’ denote the set of all students in the hostel and 𝐴1, 𝐴2, 𝐴3 denotes the set of students who
study History, Economics and Geography, respectively.
Given, 𝑆1 = ∑|𝐴𝑖| = 15 + 8 + 6 = 29 and
𝑆3 = |𝐴1 ∩ 𝐴2 ∩ 𝐴3| = 3
The number of students who do not study any of the three subjects is |𝐴̅1 ∩ 𝐴̅2 ∩ 𝐴̅3|
|𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3| = |𝑆|−∑|𝐴𝑖| + ∑|𝐴𝑖 ∩ 𝐴𝑗| − 𝛴|𝐴1 ∩ 𝐴2 ∩ 𝐴3|

= |𝑆| − 𝑆1 + 𝑆2 − 𝑆3
= 30 − 29 − 𝑆2 − 3 = 𝑆2 − 2
Where, 𝑆2 = ∑|𝐴𝑖 ∩ 𝐴𝑗|

We know that ( 𝐴1 ∩ 𝐴2 ∩ 𝐴3) is a subset of (𝐴𝑖 ∩ 𝐴𝑗) for 𝑖, 𝑗 = 1, 2, 3. Therefore, each of


|𝐴𝑖 ∩ 𝐴𝑗|, which are 3 in number, is greater that (or) equal to | 𝐴1 ∩ 𝐴2 ∩ 𝐴3|

𝑆2 = ∑|𝐴𝑖 ∩ 𝐴𝑗| ≥ 3| 𝐴1 ∩ 𝐴2 ∩ 𝐴3| = 9.

|𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3| ≥ 9 − 2 = 7.

2. How many integers between 1 and 300(inclusive) are?


(i) divisible by at least one of 5, 6, 8?
(ii) divisible by none of 5, 6, 8?
Solution:
Let 𝑆 = {1, 2, … . . . , 300}. So that, |𝑆| = 300. Also, let 𝐴1, 𝐴2, 𝐴3 be subset of whose
elements are divisible by 5, 6, 8, resp.
(i) the number of elements of S that are divisible by at least one of 5, 6, 8 is, |𝐴1 𝖴 𝐴2 𝖴 𝐴3|
| 𝐴1 𝖴 𝐴2 𝖴 𝐴3| = | 𝐴1| + | 𝐴2| + | 𝐴3| − { |𝐴1 ∩ 𝐴2| + |𝐴1 ∩ 𝐴3| + |𝐴2 ∩ 𝐴3| } + |𝐴1 ∩
𝐴2 ∩ 𝐴3|
We know that
| 𝐴1| = 60, | 𝐴2| = 50, | 𝐴3| = 37, | 𝐴1 ∩ 𝐴2| = 10
|𝐴1 ∩ 𝐴3| = 7, |𝐴2 ∩ 𝐴3| = 12 | 𝐴1 ∩ 𝐴2 ∩ 𝐴3| = 2
| 𝐴1 ∩ 𝐴2 ∩ 𝐴3| = (60 + 50 + 37) – (10 + 7 + 2) + 2 = 120.
Thus 120 elements of S are divisible by at least one 5, 6, 8.
(ii) The number of elements of S that are divisible by none of 5, 6, 8. Is,
|𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3| = |𝑆| − | 𝐴1 𝖴 𝐴2 𝖴 𝐴3 | = 300 − 120 = 180

3. Find the number of non-negative integer solutions of the equation.


𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 = 18
Under the conditions 𝑋1 ≤ 7, 𝑓𝑜𝑟 1 = 1, 2, 3, 4
Solution:
Let 𝑆 denote the set of all non-negative integer solutions of the given equation. The number of
such solutions is, 𝐶(4 + 18 − 1, 18) = 𝐶(21, 18)
|𝑆| = 𝐶(21, 18).
Let A, be the subset of S that contains the non-negative integer solutions of the given equation
under the conditions 𝑋1 > 7, 𝑋2 ≥ 0, 𝑋3 ≥ 0, 𝑋4 ≥ 0
𝐴1 = { ( 𝑋1, 𝑋2, 𝑋3, 𝑋4) ∈ 𝑆|𝑋1 > 7 }
Similarly, 𝐴2 = { ( 𝑋1, 𝑋2, 𝑋3, 𝑋4) ∈ 𝑆|𝑋2 > 7 }
𝐴3 = { ( 𝑋1, 𝑋2, 𝑋3, 𝑋4) ∈ 𝑆|𝑋3 > 7 }
𝐴4 = { ( 𝑋1, 𝑋2, 𝑋3, 𝑋4) ∈ 𝑆|𝑋4 > 7 }
Therefore, the required solution, |𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3 ∩ 𝐴̅4 |
Let us set 𝑌1 = 𝑋1 − 8. Then, 𝑋1 > 7((𝑖𝑒)𝑋 ≥ 8)
Corresponds to 𝑌1 ≥ 0, when written in terms of 𝑌1, 𝑌1 + 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 = 10.
The number of non-negative integer solutions of this equation is 𝐶(4 + 10 − 1, 10) =
𝐶(13, 10).
|𝐴1| = 𝐶(13, 10)
Similarly, |𝐴2| = |𝐴3| = |𝐴4| = 𝐶(13, 10)
let us take 𝑌1 = 𝑋1 − 8, 𝑌2 = 𝑋2 − 8. Then 𝑋1 > 7 and 𝑋2 > 7 correspond to 𝑌1 ≥ 0 and
𝑌2 ≥ 0.
When written in terms of 𝑌1 𝑎𝑛𝑑 𝑌2 ,
𝑌1 + 𝑌2 + 𝑋3 + 𝑋4 = 2.
The number of non-negative integer solutions of this equation is 𝐶(4 + 2 − 1, 2) = 𝐶(5, 2)
|𝐴1 ∩ 𝐴2|, 𝑡ℎ𝑒𝑟𝑓𝑜𝑟𝑒 |𝐴1 ∩ 𝐴2| = 𝐶(5, 2)
|𝐴1 ∩ 𝐴3| = |𝐴1 ∩ 𝐴4| = |𝐴2 ∩ 𝐴3| = |𝐴2 ∩ 𝐴4| = |𝐴3 ∩ 𝐴4| = 𝐶(5, 2).
The given equation, more than two Xi’s cannot be greater than 7 simultaneously.

|𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3| = |𝑆| − ∑|𝐴𝑖| + ∑|𝐴𝑖 ∩ 𝐴𝑗| − ∑|𝐴𝑖 ∩ 𝐴𝑗 ∩ 𝐴𝑘| + | 𝐴1 ∩ 𝐴2 ∩ 𝐴3 ∩ 𝐴4|


4 4
= 𝐶(21, 18) − ( ) × 𝐶(13, 10) + ( ) × 𝐶(5, 2) − 0 + 0
1 2
= 1330 − (4 × 286) + (6 × 30) = 366

4. In how many ways 5 number of a’s, 4number of b’s and 3 number of c’s can be
arranged so that all the identical letters are not in a single block?
Solution:
The given letters are 5+4+3 = 12 in number of which 5 are a’s, 4are b’s, and 3 are c’s. If S is
the set of all permutations (arrangements) of these letters, we’ve,
12!
|𝑆| =
5! 4! 3!
Let A1 be the set of arrangements of the letters where the 5 a’s are in a single block.
The number of such arrangements is,
8!
|𝐴1| =
4! 3!
Similarly, if A2 is the set of arrangements of the letters where the 4 b’s are in a single block
and A3 is the set of arrangements of the letters where the 3 c’s are in a single block
We have,
9! 10!
|𝐴2 | = and |𝐴3 | = 5!4!
5!3!

Likewise,
5! 6! 7!
|𝐴1 ∩ 𝐴2| = , |𝐴1 ∩ 𝐴2| = , | 𝐴2 ∩ 𝐴3| =
3! 4! 5!
| 𝐴1 ∩ 𝐴2 ∩ 𝐴3| = 3!
The required number of arrangements is,

|𝐴̅1 ∩ 𝐴̅2 ∩ 𝐴̅3|


= |𝑆| − 𝐴1 𝖴 𝐴2 𝖴 𝐴3 |} + {| 𝐴1 ∩ 𝐴2| + | 𝐴1 ∩ 𝐴3| + | 𝐴2 ∩ 𝐴3|} − | 𝐴1
{|
∩ 𝐴2 ∩ 𝐴3|
12! 8! 9! 10! 5! 6! 7!
= −{ + + } + { + + }
5! 4! 3! 4! 3! 5! 3! 5! 4! 3! 4! 5!
= 27720 − (280 + 504 + 1260) + (20 + 30 + 42) − 6
= 25762.

5. In how many ways can the 26 letters of the English alphabet be permuted so that none
of the patterns CAR, DOG, PUN (or) BYTE occurs?
Solution:
Let S denote the set of all permutations of the 26 letters. Then |S|= 26!
Let A1 be the set of all permutations in which CAR appears. This word, CAR consists of three
letters which from a single block.
The set A1 therefore consists of all permutations which contains this single block and the 23
remaining letters. |A1| = 24!
Similarly, if A2 , A3 , A4 are the set of all permutations which contain DOG, PUN and BYTE
respectively.
We have, |𝐴2| = 24! |𝐴3| = 24! |𝐴4| = 23!
Likewise, |𝐴1 ∩ 𝐴2| = |𝐴1 ∩ 𝐴3| = |𝐴2 ∩ 𝐴3| = (26 − 6 + 2)! = 22!
|𝐴1 ∩ 𝐴4| = |𝐴2 ∩ 𝐴4| = |𝐴3 ∩ 𝐴4| = (26 − 7 + 2) = 21!
| 𝐴1 ∩ 𝐴2 ∩ 𝐴3| = (26 − 9 + 3)! = 20!
| 𝐴1 ∩ 𝐴2 ∩ 𝐴4| = | 𝐴1 ∩ 𝐴3 ∩ 𝐴4| = | 𝐴2 ∩ 𝐴3 ∩ 𝐴4| = (26 − 10 + 3)! = 19!
| 𝐴1 ∩ 𝐴2 ∩ 𝐴3 ∩ 𝐴4| = (26 − 13 + 4)! = 17!
Therefore, the required number of permutations is given by,
|𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3 ∩ 𝐴̅4| = |𝑆| − ∑|𝐴𝑖| + ∑|𝐴𝑖 ∩ 𝐴𝑗| − ∑|𝐴𝑖 ∩ 𝐴𝑗 ∩ 𝐴𝑘| + | 𝐴1 ∩ 𝐴2 ∩ 𝐴3 ∩ 𝐴4|

= 26! − (3 × 24! + 23!) + (3 × 22! + 3 × 21!) − (20! + 3 × 19!) + 17!


6. In how many ways can one arrange the letters in the word CORRESPONDENTS so
that
(i) There is no pair of consecutive identical letters?
(ii) There are exactly two pairs of consecutive identical letters?
(iii) There are at least three pairs of consecutive identical letters?
Solution:
In the word CORRESPONDENTS, there occur one each of C, P, D and T and two each of O,
R, E, S, N. If S is the set of all permutations of these 14 letters, we’ve,
14!
|𝑆| =
(2!)5

Let A1 , A2 , A3 , A4 , A5 be the set of permutations in which O’s, R’s, E’s, N’s appear in pairs
respectively.
13!
Then, |𝐴 | = for i = 1, 2, 3, 4, 5
𝑖 (2!)4
12!
Also, |𝐴 ∩ 𝐴 | = , |𝐴 ∩ 𝐴 ∩ 𝐴 | = 11!
𝑖 𝑗 (2!)3 𝑖 𝑗 𝑘 (2!)2
10!
|𝐴 ∩ 𝐴 ∩ 𝐴 ∩ 𝐴 | = , | 𝐴 ∩ 𝐴 ∩ 𝐴 … … ∩ 𝐴 | = 9!
𝑖 𝑗 𝑘 𝑝 (2!) 1 2 3 5
From these,
14! 13!
𝑆0 = 𝑁 = |𝑆| = 5, 𝑆1 = 𝐶(5, 1) ×
(2!) (2!)4
12! 11!
𝑆2 = 𝐶(5, 2) × , 𝑆3 = 𝐶(5, 3) ×
(2!)3 (2!)2
10!
𝑆4 = 𝐶(5, 4) × , 𝑆5 = 𝐶(5, 5) × 9!
(2!)1
Accordingly, the number of permutations where these is no pair of consecutive identical letter
is,
1 2 3 4
𝐸 = 𝑆 − ( )𝑆 + ( )𝑆 − ( )𝑆 + ( )𝑆 − ( 5 )𝑆
0 0 1 2 3 4 5
1 2 3 4 5
5 13! 5 10!
= 14! − ( ) × 5 12! 5 11! + ( ) × − ( 5 ) × 9!
+( )× −( )×
(2!)5 1 (2!)4 2 (2!)3 3 (2!)2 4 (2!)1 5
The number of permutations where there are exactly two pairs of consecutive identical letters,
3 4
𝐸2 = 𝑆2 − ( ) 𝑆3 + ( ) 𝑆4 − ( 5 ) 𝑆5
1 2 3
5 12! 3 5 11! 5 5 ) × 9!
=( )× − ( )( ) × 4 5 10!
+ ( )( ) × − ( )(
2 (2!)3 1 3 (2!)2 2 4 (2!)1 3 5
The number of permutations where there are at least three pair of consecutive identical letter
is,
3 4
𝐸3 = 𝑆3 − ( ) 𝑆4 + ( ) 𝑆5
2 3
5 11! 3 5 10! 4 5
=( )× +( )( )× − ( ) ( ) × 9!
3 (2!)2 2 4 (2!)1 2 5
☻Derangements:
A permutation of n distinct objects in which none of the objects is in its natural place is called
a derangement.
Formula for 𝑑𝑛
The following is the formula for 𝑑𝑛 for 𝑛 ≥ 1:
1 1 1 (−1)𝑛
𝑑𝑛 = 𝑛! {1 − + − + ⋯⋅ + }
1! 2! 3! 𝑛!
𝑛
(−1)𝑘
= 𝑛! × ∑
𝑘!
𝑘=0
1 1
For example, 𝐷 = 2! [1 − + ]=1
2 1! 2!
1 1 1 1 1
𝐷 = 3! [1 − + − ] = 1 (1 − 1 + − ) = 2
3 1! 2! 3! 2 6

𝐷4 = , 𝐷5 = 44, 𝐷6 = 265, 𝐷7 = 1854


Problems:
1. Evaluate 𝑑5, 𝑑6, 𝑑7, 𝑑8
Solution:
1 1 1 1 1
𝑑 = 5! {1 − + − + − }
5 1! 2! 3! 4! 5!
1 1 1 1
= 120 { − + − } = 44
2 6 24 120
1 1 1 1 1 1
𝑑6 = 6! {1 − + − + − + }
1! 2! 3! 4! 5! 6!
1 1 1 1 1
= 720 { − + − − } = 256
2 6 24 120 720

Similarly, 𝑑7 ≈ [7! × 𝑒−1] ≈ [5040 × 0.3679] ≈ 1854


𝑑8 ≈ [8! × 𝑒−1] ≈ [40320 × 0.3679] ≈ 14833

2. From the set of all permutations of n distinct objects, one permutation is chosen at
random. What is the probability that it is not a derangement?
Solution:
The number of permutations of n distinct objects is 𝑛!. The number of derangements of these
objects is 𝑑𝑛.
The probability that a permutation chosen is not a derangement,
𝑑𝑛 1 1 1 (−1)𝑛
𝑃 =1− = 1 − {1 − + − + ⋯+ }
𝑛! 1! 2! 3! 𝑛!
1 1 (−1)𝑛
=1− − + ⋯+
2! 3! 𝑛!

3. In how many ways can the integers 1, 2, 3….10 be arranged in a line so that no even
integer is in its natural place.
Solution:
Let A1 be the set of all permutations of the given integer where 2 is in its natural place. A2 be
the set of all permutations in which 4 is in its natural place, and so on. The number of
permutations where no even integer is in its natural place is |𝐴 ∩ 𝐴̅2 ∩ 𝐴̅3 ∩ 𝐴̅4 ∩ 𝐴̅5|. This
is given by,
|𝐴 ∩ 𝐴̅2 … … ∩ 𝐴̅5| = |𝑆| − 𝑆1 + 𝑆2 − 𝑆3 + 𝑆4 − 𝑆5
We note that |S|=10!
Now, the permutations in A1 are all of the form 𝑏1, 𝑏3, 𝑏4 … 𝑏10 where 𝑏1𝑏3𝑏4 … . 𝑏10is a
permutation of 1,3, 4, 5, …. 10 as such |A1| = 9!
Similarly, |𝐴2|= |𝐴3| = |𝐴4|= |𝐴5| = 9!
So that, 𝑆1 = 𝛴|𝐴𝑖| = 5 × 9! = 𝐶(5, 1) × 9!
The permutations in 𝐴1 ∩ 𝐴2 are all of the form 𝑏1 2 𝑏3 4 𝑏5 𝑏6 … 𝑏10 where
𝑏1𝑏3𝑏5 𝑏6 … . 𝑏10 is a permutations of 1, 3, 5, 6, …10 . As such |𝐴1 ∩ 𝐴2| = 8!

Similarly, each of |𝐴𝑖 ∩ 𝐴𝑗| = 8! Are there are 𝐶(10, 2) such terms, 𝑆2 = 𝛴|𝐴𝑖 ∩ 𝐴𝑗| =
𝐶(5, 2) × 8!
Like wise 𝑆3 = 𝐶(5, 3) × 7!, 𝑆4 = 𝐶(5, 4) × 6!, 𝑆5 = 𝐶(5, 5) × 5!
Accordingly, Expression (1) gives the required number as,
|𝐴̅1 ∩ 𝐴̅2 … … ∩ 𝐴̅5|
= 10! − 𝐶(5, 1) × 9! + 𝐶(5, 2) × 8! − 𝐶(5, 3) × 7! + 𝐶(5, 4) × 6! − 𝐶(5, 5) × 5!

= 2170680
𝑛
4. Prove that, for any positive integer 𝑛, 𝑛! = ∑𝑛
𝑘=0 (
𝑘 ) 𝑑𝑘
Solution:
For any positive integer n, the total number of permutations of 1, 2, 3, … . 𝑁 is 𝑛!. In each such
permutations there exists 𝐾 (where 0 ≤ 𝑘 ≤ 𝑛 ) elements which are in their natural positions
called fixed elements, and n-k elements which are not in their original positions. The k element
𝑛
ca be chosen in ( ) ways and the remaining n-k elements can then be chosen in 𝑑
𝑛−𝑘 ways.
𝑘
𝑛
Hence there are ( ) permutations of 1, 2, 3, …. n with k fixed elements and n-k deranged
𝑘
𝑑𝑛−𝑘
elements. As k varies from 0 to 𝑛, we count all of the n! permutations of 1, 2, 3 … . 𝑛.
𝑛
Thus, 𝑛! = ∑𝑛
𝑘=0 (𝑘) 𝑑𝑛−1
𝑛 𝑛 𝑛 𝑛
= (0) 𝑑𝑛 + (1) 𝑑𝑛−1 + (2) 𝑑𝑛−2 + ⋯ + ( ) 𝑑0
𝑛 𝑛
= ∑𝑛 𝑛 )𝑑 −= ∑ 𝑛
(
𝑘=0 𝑛 − 𝑘 𝑘 𝑘=0 (𝑘) 𝑑𝑘
☻Rook Polynomials:
Consider a board that resembles a full chess board or a part of chess board. Let n be the number
of squares present in the board. Pawns are placed in the squares of the board such that not more
than one pawn occupies a square.
Then, according to the pigeonhole principle, not more than n pawns ca be used. Two pawns
placed on a board having 2 (or) more squares are said to capture (or take) each other if they
(pawns) are in the same row or in the same column of the board. For 2 ≤ 𝑘 ≤ 𝑛, let 𝑟𝑘 denote
the number of ways in which k paws can be placed on a board such that no two pawns capture
each other – that is, no two pawns are in the same row or in the same column of the board.
Then the polynomial: 1 + 𝑟1 𝑥 + 𝑟2 𝑥2 + ⋯ + 𝑟𝑛 𝑥𝑛 is called the rook polynomial for the board
considered. If the board is denoted by 𝑟(𝑐, 𝑥). thus, by definition,
𝑟(𝑐, 𝑥) = 1 + 𝑟1 𝑥 + 𝑟2 𝑥2 + ⋯ + 𝑟𝑛 𝑥𝑛 … … … … …(1)
While defining this polynomial, it has been assumed that 𝑛 ≥ 2. In the trivial case where 𝑛 =
1 (i.e., in the case where a board contains only one square), 𝑟2 , 𝑟3 …are identically zero and the
rook polynomial 𝑟(𝑐, 𝑥) is defined by,
𝑟(𝑐, 𝑥) = 1 + 𝑥 … … … … . . (2)
the expression (1) and (2) can be put in the following combined form which holds for a board
c with 𝑛 ≥ 1 squares.
𝑟(𝑐, 𝑥) = 1 + 𝑟1 𝑥 + 𝑟2 𝑥2 + ⋯ + 𝑟𝑛 𝑥𝑛 … … … … …(3)
Here, 𝑟1 = 𝑛 = number of squares in the board.
Problems:
1. Consider the board containing 6 squares,
1 2

4 5 6

Solution:
For this board 𝑟1 = 6 we observed that 2 non- capturing rooks can have the following
positions: (1, 3), (1, 5), (1, 6), (2, 3), (2, 4), (2, 6), (3, 4), (3, 5). These positions are 8 in
number. therefore 𝑟2 = 8.
Next, 3 mutually non-capturing rooks can be placed only in the following two positions:
(1, 3, 5), (2, 3, 4).
Thus 𝑟3 = 2 we find that four (or) more mutually non-capturing rooks cannot be placed on
the board.
Thus 𝑟4 = 𝑟5 = 𝑟6 = 0. Accordingly, for this board, the rook polynomial is,
𝑟0(𝑐, 𝑥) = 1 + 6𝑥 + 8𝑥2 + 2𝑥3
2. Consider the board containing 8 squares (marked 1 to 8)
1 2 3

4 5

6 7 8

Solution:
For this board, 𝑟1 = 8
In this board, the positions of 2 non-capturing rooks are
(1, 5), (1, 7), (2, 4), (2, 5), (2, 6), (2, 8), (3, 4), (3, 6), (3, 7), (4, 8), (5, 6), (5, 7).
These are 14 numbers, therefore 𝑟2 = 14. The positions of 3 mutually non-capturing rooks
are (1, 5, 7), (2, 4, 8), (2, 5, 6), (3, 4, 7).
These are 4 in number, therefore 𝑟3 = 4.
We check that the board has no positions for more than 3 mutually non-capturing rooks.

Hence, 𝑟4 = 𝑟5 = 𝑟6 = 𝑟7 = 𝑟8 = 0.
Thus, for this board, the rook polynomial is,
𝑟(𝑐, 𝑥) = 1 + 8𝑥 + 14𝑥2 + 4𝑥3.

3. Find the rook polynomial for the 3 * 3 board by using the expansion formula.

Solution:
The 3 X 3 board let us mark the square which is at the centre of the board. The boards D and E
appear as shown below (the shaded parts are the deleted parts),
D E
For the board D, we find that 𝑟1 = 4, 𝑟2 = 2, 𝑟3 = 𝑟4 = 0
𝑟(𝐷, 𝑥) = 1 + 4𝑥 + 2𝑥2
The board E is the same as the one considered (3 X 3) As such for this board,
𝑟(𝐸, 𝑥) = 1 + 8𝑥 + 14𝑥2 + 4𝑥3
Now, the expansion formula gives

𝑟(𝑐3×3, 𝑥) = 𝑥𝑟𝐷(𝑥) + 𝑟(𝐸, 𝑥)


= 𝑥(1 + 4𝑥 + 2𝑥2) + (1 + 8𝑥 + 14𝑥2 + 4𝑥3)
= 1 + 9𝑥 + 18𝑥2 + 6𝑥3
4. Find the rook polynomial for the board shown below (shaded part)
1 2

3 4

5 6

7 8

9 10 11

Solution:
We note that the given board C is made up of two disjoint sub-boards 𝐶1 and 𝐶2, where 𝐶1 is
the 2 X 2 board with squares numbered 1 to 4 and 𝐶2, is the board with squares numbered 5 to
11.
Since 𝐶1 is the 2 X 2 board we’ve.
𝑟(𝐶1, 𝑥) = 1 + 4𝑥 + 2𝑥2
We note that 𝐶2 is the same as the board considered (3 X 3 board). We’ve,
𝑟(𝐶2, 𝑥) = 1 + 7𝑥 + 10𝑥2 + 2𝑥3
Therefore, the product formula yields the rook polynomials for the given board as,
𝑟(𝐶1, 𝑥) = 𝑟(𝐶1, 𝑥) × 𝑟(𝐶2, 𝑥)
= (1 + 4𝑥 + 2𝑥2)(1 + 7𝑥 + 10𝑥2 + 2𝑥3
= 1 + 11𝑥 + 40𝑥2 + 56𝑥3 + 28𝑥4 + 4𝑥5
5. Four persons 𝑃1, 𝑃2, 𝑃3, 𝑃4 who arrive late for a dinner party find that only one chair at
each of five tables 𝑇1, 𝑇2, 𝑇3, 𝑇4 and 𝑇5 is vacant. 𝑃1will not sit at 𝑇1 or 𝑇2, 𝑃2 will not
sit at 𝑇2, 𝑃3 will not sit at 𝑇3 or 𝑇4, and 𝑃4 will not sit at 𝑇4 or 𝑇5. Find he number of
ways they can occupy the vacant chairs.
Solution:
Consider the board shown below, representing the situation. The shaded in the first now
indicate that tables 𝑇1, and 𝑇2 are forbidden for 𝑃1 and so on.
T1 T2 T3 T4 T5
P1

P2

P3

P4

For the board made up of shaded squares in the above figure. The rook polynomial is given by,

𝑟(𝐶, 𝑥) = 1 + 7𝑥 + 16𝑥2 + 13𝑥3 + 3𝑥4


Thus, here, 𝑟1 = 7, 𝑟2 = 16, 𝑟3 = 13, 𝑟4 = 3
𝑆0 = 5! = 120, 𝑆1 = (5 − 1)! × 𝑟1 = 168
𝑆2 = (5 − 2)! × 𝑟2 = 96, 𝑆3 = (5 − 3)! × 𝑟3 = 26
𝑆4 = (5 − 4)! × 𝑟4 = 3
Consequently, the number of ways which the four persons can occupy the chair is
𝑆0 − 𝑆1 + 𝑆2 − 𝑆3 + 𝑆4 = 120 − 168 + 96 − 26 + 3 = 25
☻Recurrence Relations:
First-order recurrence relations: -
We consider for solution recurrence relations of the form,
𝑎𝑛 = 𝑐𝑎𝑛−1 + 𝑓(𝑛), 𝑓𝑜𝑟 𝑛 ≥ 1 … … … … (1)
Where c is a known constant and f(n) is a known function. Such a relation is called a linear
recurrence relation of first-order with constant co-efficient, if 𝑓(𝑛) = 0, the relation is called
homogeneous, otherwise, it is called non-homogeneous
The relation (1) can be solved in a trivial way. First, we note that this relation may be rewritten
as (by changing n to n+1)
𝑎𝑛+1 = 𝑐𝑎𝑛 + 𝑓(𝑛 + 1), 𝑓𝑜𝑟 𝑛 ≥ 1 … … … … . . (2)
For, 𝑛 = 0, 1, 2, 3, … ..This relation yields, respectively
𝑎1 = 𝑐𝑎0 + 𝑓(1)
𝑎2 = 𝑐𝑎1 + 𝑓(2) = 𝑐{𝑐𝑎0 + 𝑓(1)} + 𝑓(2)
= 𝑐2𝑎0 + 𝑐𝑓(1) + 𝑓(2)
𝑎3 = 𝑐𝑎2 + 𝑓(3) = 𝑐{𝑐2𝑎0 + 𝑐𝑓(1) + 𝑓(2)} + 𝑓(3)
= 𝑐2𝑎0 + 𝑐2𝑓(1) + 𝑐𝑓(2) + 𝑓(3)
And so on. Examining these, we obtain, by induction

𝑎𝑛 = 𝑐𝑛𝑎0 + 𝑐𝑛−1𝑓(1) + 𝑐𝑛−2𝑓(2) + ⋯ + 𝑐𝑓(𝑛 − 1) + 𝑓(𝑛)


= 𝑐𝑛𝑎0 + ∑𝑛𝑘=0 𝑐𝑛−𝑘𝑓(𝑘), 𝑓𝑜𝑟 𝑛 ≥ 1 … … … … … … … (3)
This is the general solution of the recurrence relation (2) which is equivalent to the relation (1)
If f(n) = 0. That is if the recurrence relation is homogeneous, the solution (3) becomes

𝑎𝑛 = 𝑐𝑛𝑎0 𝑓𝑜𝑟 𝑛 ≥ 1 … … … (4)


The solutions (3) and (4) yield particular solutions if 𝑎0 is specified value of 𝑎0is called the
initial condition.
Problems:
1. Solve the recurrence relation 𝑎𝑛 = 𝑛𝑎𝑛−1 𝑓𝑜𝑟 𝑛 ≥ 1 given the 𝑎0 = 1
Solution:
From the given relation, we find that,
𝑎1 = 1 × 𝑎0, 𝑎2 = 2𝑎1 = (2 × 1)𝑎0,
𝑎3 = 3 × 𝑎2 = (3 × 2 × 1)𝑎0,
𝑎4 = 4 × 𝑎3 = (4 × 3 × 2 × 1)𝑎0 and so on.
Evidently, the general solution is (by induction)
𝑎𝑛 = (𝑛!)𝑎0 𝑓𝑜𝑟 𝑛 ≥ 1
Using the given initial condition 𝑎0 = 1
Therefore, 𝑎𝑛 = 𝑛!
2. Solve the recurrence relation 𝑎𝑛 − 3𝑎𝑛−1 = 5 × 3𝑛 for 𝑛 ≥ 1 given that 𝑎0 = 2
Solution:
The given relation may be rewritten as

𝑎𝑛+1 = 3𝑎𝑛 + 5 × 3𝑛+1 𝑓𝑜𝑟 𝑛 ≥ 0


= 3𝑎𝑛 + 𝑓(𝑛 + 1) 𝑤ℎ𝑒𝑟𝑒 𝑓(𝑛) = 5 × 3𝑛
The general solution for this relation is,

𝑎𝑛 = 3𝑛𝑎0 + ∑𝑛𝑘=1 3𝑛−𝑘𝑓(𝑘)


= 3𝑛𝑎0 + 3𝑛−1𝑓(1) + 3𝑛−2𝑓(2) + 3𝑛−3𝑓(3) + ⋯ + 30𝑓(𝑛)
Substituting for 𝑎0 and f(n), n = 1, 2, …n in this we get
𝑎𝑛 = 2 × 3𝑛 × 3𝑛−1 × (5 × 31) + 3𝑛−2 × (5 × 32) + 3𝑛−3 × (5 × 33) + ⋯ + 30 × (5 × 3𝑛)

= 2 × 3𝑛 + 5 × (3𝑛 + 3𝑛 + 3𝑛 + ⋯ + 3𝑛) (𝑛 𝑡𝑒𝑟𝑚𝑠)


= 2 × 3𝑛 + 5 × (𝑛3𝑛)
= (2 + 5𝑛)3𝑛
This is the required solution.
3. Find the recurrence relation and the initial condition for the sequence,
2, 10, 50, 250.......... Hence find the general term of the sequence.
Solution:
The given sequence is < 𝑎𝑟 >, where 𝑎0 = 2, 𝑎1 = 10, 𝑎2 = 10, 𝑎2 = 50, 𝑎3 = 250 … ….
𝑎1 = 5𝑎0, 𝑎2 = 5𝑎1, 𝑎3 = 5𝑎2 𝑎𝑛𝑑 𝑠𝑜 𝑜𝑛.
From these, we readily note that the recurrence relation for the given sequence is 𝑎𝑛 =
5𝑎𝑛−1 𝑓𝑜𝑟 𝑛 ≥ 1
With 𝑎0 = 2 as the initial condition
This solution of this relation is, 𝑎 𝑛 = 5 𝑛𝑎 0 = 5 𝑛 × 2
This is the general term of the given sequence
4. Suppose that there are 𝑛 ≥ 2 persons at a party and that each of these persons shakes
hands (exactly once) with all of the other persons present. Using a recurrent relation
find the number of handshakes.
Solution:
Let 𝑎𝑛−2 denotes the number of hand shakes among the 𝑛 ≥ 2 persons present. (If 𝑛 = 2 , the
number of handshakes is 1; that is 𝑎0 = 1). If a new person joins the party, he will shake hands
with each of the n persons already present. Thus, the number of handshakes increases by n
when the number of persons changes to n+1 from n. Thus,
𝑎(𝑛+1) = 𝑎𝑛−2 + 𝑛 for 𝑛 ≥ 2

(or) 𝑎𝑚+1 = 𝑎𝑚 + (𝑚 + 2) for 𝑚 ≥ 0 , where 𝑚 = 𝑛 − 2 setting f(m) = m+1,


𝑎𝑚+1 = 𝑎𝑚 + 𝑓(𝑚 + 1) for 𝑚 ≥ 0
The general solution of this non homogenous recurrence relation is,
𝑛 𝑛

𝑎𝑚 = (1𝑚 × 𝑎0) + ∑ 1𝑛−𝑘𝑓(𝑘) = 𝑎0 + ∑(𝑘 + 1)


𝑘=1 𝑘=1

Since, 𝑎0 = 1, this becomes,


𝑎𝑚 = 1 + {2 + 3 + 4 + ⋯ + 𝑚 + (𝑚 + 1)}
1
= (𝑚 + 1)(𝑚 + 2) 𝑓𝑜𝑟 𝑚 ≥ 0
2
1
(or) 𝑎𝑛−2 = (𝑛 − 1)𝑛 𝑓𝑜𝑟 𝑛 ≥ 2
2

this is the number of handshakes in the party when 𝑛 ≥ 2 persons are present.

Second order homogenous Recurrence Relations:


We now consider a method of solving recurrence relations of the form
𝑐𝑛𝑎𝑛 + 𝑐𝑛−1𝑎𝑛−1 + 𝑐𝑛−2𝑎𝑛−2 = 0 𝑓𝑜𝑟 𝑛 ≥ 2 … … … . . (1)
where 𝑐𝑛, 𝑐𝑛−1 and 𝑐𝑛−2 are real constants with 𝑐𝑛 ≠ 0. A relation of this type is called a second
order linear homogenous recurrence relation with constant co-efficient.
𝑐𝑛𝑘2 + 𝑐𝑛−1𝑘 + 𝑐𝑛−2 = 0 … … … . . (2)
Thus, 𝑎𝑛 = 𝑐𝑘𝑛 is a solution of (1) if k satisfies the quadraric equation (2). This quadratic
equation is the auxiliary equation or the characteristic equation for the relation (1).
Case 1: The two roots k1 and k2 of equation (2) are real and distinct. Then we take,
𝑎𝑛 = 𝐴𝑘𝑛 + 𝐵𝑘𝑛 … … … (3)
1 2

Where A and B are arbitrary real constants as the general equation of the relation (1).
Case 2: The two roots k1 and k2 of equation (2) are equal and real, with k as the common value.
Then we take,
𝑎𝑛 = (𝐴 + 𝐵𝑛)𝑘𝑛 … … … (4)
where A and B are arbitrary real constants, as the general solution of the relation (1).
case 3: The two roots k1 and k2 of equations (2) are complex. Then k1 and k2 are complex
conjugates of each other, so that if 𝑘1 = 𝑝 + 𝑖𝑞, then 𝑘2 = 𝑝 + 𝑖𝑞 and we take,
𝑎𝑛 = 𝑟𝑛(𝐴 cos 𝑛𝜃 + 𝑏 sin 𝑛𝜃).......... (5)
where A and B are arbitrary complex constants,
𝑎
𝑟 = |𝑘1 | = |𝑘2 | = √𝑝2 + 𝑞2 𝑎𝑛𝑑 𝜃 = 𝑡𝑎𝑛−1 ( ) as the general solution of the relation (1).
𝑏

Problems:
1. Solve the recurrence relation
𝑎𝑛 − 6𝑎𝑛−1 + 9𝑎𝑛−2 = 0 𝑓𝑜𝑟 𝑛 ≥ 2, 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑎𝑡 𝑎𝑜 = 5, 𝑎1 = 12
Solution:
The characteristics equation for the given relation is,
𝑘2 − 6𝑘 + 9 = 0, (𝑜𝑟) (𝑘 − 3)2 = 0
Whose roots are 𝑘1 = 𝑘2 = 3. Therefore, the general solution for 𝑎𝑛is,
𝑎𝑛 = (𝐴 + 𝐵𝑛)3𝑛
Where A and B are arbitrary constants using the given initial conditions 𝑎0 = 5 and 𝑎1 = 12
in equation, we get 5 = 𝐴 and 12 = 3(𝐴 + 𝐵) solving these we get, 𝐴 = 5 and 𝐵 = −1
Putting these values in equation we get,
𝑎𝑛 = (5 − 𝑛)3𝑛
This is the solution of the given relation, under the given initial condition.

2. Solve the recurrence relation

𝑎𝑛 = 2(𝑎𝑛−1 − 𝑎𝑛−2), 𝑓𝑜𝑟 𝑛 ≥ 2


Given that 𝑎0 = 1 𝑎𝑛𝑑 𝑎1 = 2
Solution:
For the given relation, the characteristic equation is 𝑘2 − 2𝑘 + 2 = 0
The roots are,
(2 ± √4 − 8)
𝑘= = 1±𝑖
2
Therefore, the general solution for 𝑎𝑛 is,
𝑎𝑛 = 𝑟𝑛[𝐴 𝑐𝑜𝑠𝑛𝜃 + 𝐵𝑠𝑖𝑛𝜃]
Where A and B are arbitrary constants,
𝜋
𝑟 = |1 ± 𝑖| = √2, 𝑎𝑛𝑑 𝑡𝑎𝑛𝜃 = 1, 𝜃 =
4
𝑛 𝑛𝜋 𝑛𝜋
𝑎𝑛 = (√2) [ 𝐴 𝑐𝑜𝑠 + 𝐵 𝑠𝑖𝑛
]
4 4
Using the given initial conditions 𝑎0 = 1 and 𝑎1 = 2 we get, 1 = A and
𝜋 𝜋
2 = (√2)[ 𝐴 𝑐𝑜𝑠 + 𝐵 𝑠𝑖𝑛 ]
4 4
=𝐴+𝐵
𝐴 = 1, 𝐵 = 1 putting these values of A and B
𝑛 𝑛𝜋 𝑛𝜋
𝑎𝑛 = (√2) [ 𝑐𝑜𝑠 + 𝑠𝑖𝑛
]
4 4
This is the solution of the given relation under the given conditions.

3. If 𝑎0 = 0, 𝑎1 = 1, 𝑎2 = 4 𝑎𝑛𝑑 𝑎3 = 37 satisfy the recurrence realtion


𝑎𝑛+2 + 𝑏𝑎𝑛+1 + 𝑐𝑎𝑛 = 0 𝑓𝑜𝑟 𝑛 ≥ 0
Determine the constant b and c and then solve the relation for 𝑎𝑛.
Solution:
For 𝑛 = 0 and 𝑛 = 1, the given relation,

𝑎2 + 𝑏𝑎1 + 𝑐𝑎0 = 0 𝑎𝑛𝑑 𝑎3 + 𝑏𝑎2 + 𝑐𝑎1 = 0


Substituting the given values of 𝑎0, 𝑎1, 𝑎2 𝑎𝑛𝑑 𝑎3 in this we get
4 + 𝑏 + 0 = 0 𝑎𝑛𝑑 37 + 4𝑏 + 𝑐 = 0
=> 𝑏 = −1 𝑎𝑛𝑑 𝑐 = −21
With these values of b and c, the given recurrence relation
𝑎𝑛+2 − 4𝑎𝑛−1 − 21𝑎𝑛 = 0 𝑓𝑜𝑟 𝑛 ≥ 0
(or)

𝑎𝑛 − 4𝑎𝑛−1 − 21𝑎𝑛−2 = 0 𝑓𝑜𝑟 𝑛 ≥ 2


The characteristic equation for this relation is 𝑘2 − 4𝑘 − 21 = 0 whose roots are 𝑘1 =
7 𝑎𝑛𝑑 𝑘2 = −3.
The general solutions for 𝑎𝑛 is,
𝑎𝑛 = 𝐴 × 7𝑛 + 𝐵 × (−3)𝑛
A and B are arbitrary constants.
Using the given conditions 𝑎0 = 0, 𝑎1 = 1 in this we get,
0 = 𝐴 + 𝐵, 1 = 7𝐴 − 3𝐵
1
=> 𝐴 = −𝐵 =
10
1
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑎𝑛 = [7𝑛 − (−3)𝑛
10
BCS405A
Discrete Mathematical Structures
(For the 4th Semester Computer Science and Engineering Stream)

Module 5
INTRODUCTION TO GROUP THEORY
Content

S.No Topic
1 Definitions and Examples of Particular Groups Klein 4-group

2 Additive group of Integers modulo n

3 Multiplicative group of Integers modulo-p

4 permutation groups,

5 Subgroups

6 cyclic groups

7 Cosets, Lagrange’s Theorem


Groups:

Definitions, properties,
Homomrphisms,
Isomorphisms,
Cyclic Groups,
Cosets, and Lagrange’s Theorem.

Coding Theory and Rings:

Elements of CodingTheory,
The Hamming Metric,
The Parity Check, and Generator Matrices.

Group Codes:

Decoding with Coset Leaders,


Hamming Matrices.

Rings and Modular Arithmetic:

The Ring Structure – Definition and Examples,


GROUPS
Introduction:
Definitions, Examples, and Elementary Properties:
In m athematics, a discrete group is a group G equipped with the discrete topology. With
this topology G becomes a topological group. A discrete subgroup of a topological group G
is a subgroup H whose relative topology is the discrete one. For example, the integers, Z,
form a discrete subgroup of the reals, R, but the rational numbers, Q, do not.

Any group can be given the discrete topology. Since every map from a discrete space is
continuous, the topological homomorphisms between discrete groups are exactly the group
homomorphisms between the underlying groups. Hence, there is an isomorphism between
the category of groups and the category of discrete groups. Discrete groups can therefore be
identified with their underlying (non-topological) groups. With this in mind, the term
discrete group theory is used to refer to the study of groups without topological structure, in
contradistinction to topological or Lie group theory. It is divided, logically but also
technically, into finite group theory, and infinite group theory.

There are some occasions when a topological group or Lie group is usefully endowed with
the discrete topology, 'against nature'. This happens for example in the theory of the Bohr
com pactification, and in group cohomology theory of Lie groups.

Properties:

Since topological groups are homogeneous, one need only look at a single point to determine
if the group is discrete. In particular, a topological group is discrete if and only if the
singleton containing the identity is an open set.

A discrete group is the same thing as a zero-dimensional Lie group (uncountable discrete
groups are not second-co untable so authors who require Lie groups to satisfy this axiom do
not regard these groups as Lie groups). The identity component of a discrete group is just the
trivial subgroup while the group of components is isomorphic to the group itself.
Since the only Hausdorff topology on a finite set is the discrete one, a finite Hausdorff
topological group must necessarily be discrete. It follows that every finite subgroup of a
Hausdorff group is discrete.

A discrete subgroup H of G is co compact if there is a compact subset K of G such that HK =


G.
Discrete normal subgroups play an important role in the theory of covering groups and
locally isomorphic groups. A discrete normal subgroup of a connected group G necessarily
lies in the center of G and is therefore abelian.

Other properties:

• every discrete group is totally disconnected


• every subgroup of a discrete group is discrete.
• every quotient of a discrete group is discrete.
• the product of a finite number of discrete groups is discrete.
• a discrete group is compact if and only if it is finite.
• every discrete group is locally compact.
• every discrete subgroup of a Hausdorff group is closed.
• every discrete subgroup of a compact Hausdorff group is finite.

Examples:

• Frieze groups and wallpaper groups are discrete subgroups of the i sometry group of
the Euclidean plane. Wallpaper groups are cocompact, but Frieze groups are not.

• A space group is a discrete subgroup of the i sometry group of Euclidean space of


some dimension.
• A crystallographic group usually means a cocompact, discrete subgroup of the
isometries of some Euclidean space. Sometimes, however, a crystallographic
group can be a cocompact discrete subgroup of a n ilpotent or solvable Lie group.
• Every triangle group T is a discrete subgroup of the isometry group of the sphere
(when T is finite), the Euclidean plane (when T has a Z + Z subgroup of finite index),
or the hyperbolic plane.
Fuchsian groups are, by definition, discrete subgroups of the isometry group of the
hyperbolic plane.
o A Fuchsian group that preserves orientation and acts on the upper half-plane model of the
hyperbolic plane is a discrete subgroup of the Lie group
o A Fuchsian group that preserves orientation and acts on the upper half-plane model of the
hyperbolic plane is a discrete subgroup of the Lie PSL(2,R), the group of orientation
preserving isometries of the upperhalf-plane model of the hyperbolic plane.
A Fuchsian group is sometimes considered as a s pecial case of a Kleinian group, by
embedding the hyperbolic plane isometrically into three dimensional hyperbolic space and ex
tending the group action on the plane to the whole space.
The modular group is PSL(2,Z), thought of as a discrete subgroup of PSL(2,R). The modular
group is a lattice in PSL(2,R), but it is not cocompact.
Kleinian groups are, by definition, discrete subgroups of the isometry group of
hyperbolic 3-space. These include quasi- Fuchsian groups.
A Kleinian group that preserves orientation and acts on the upper half space model of h
yperbolic 3-space is a discrete s ubgroup of the Lie group PSL(2,C), the group of o rientation
preserving isometries of the upper half- space model of h yperbolic 3-space.
A lattice in a Lie group is a discrete subgroup such that the Haar measure of the quotient
space is finite.

Group homomorphism:

Image of a Group homomorphism(h) from G(left) to H(right). The smaller oval inside H is

the image of h. N is the kernel of h and aN is a coset of h.

In mathematics, given two groups (G, *) and (H, ·), a group homomorphism from (G, *) to
(H, ·) is a function h : G → H such that for all u and v in G it holds that

where the group operation on the left hand side of the equation is that of G and on the right
hand side that of H.

From this property, one can deduce that h maps the identity element eG of G to the identity
element eH of H, and it also maps inverses to inverses in the sense that

-1
h(u ) = h(u) - 1.

Hence one can say that h "is compatible with the group s tructure".
Older notations for the homomorphism h(x) may be xh, though this may be confused as an
index or a general subscript. A more recent trend is to write group homomorphisms on the
right of their arguments, omitting brackets, so that h( x) becomes simply x h. This approach is
especially prevalent in areas of group theory where automata play a role, since it accords
better with the convention that automata read words from left to right.

In areas of mathematics where one considers groups endowed with additional structure, a
homomorphism sometimes means a map which respects not only the group structure (as
above) but also the extra structure. For example, a homomorphism of topological groups is
often required to be continuous.

The category of groups

If h : G → H and k : H → K are group homomorphisms, then so is k o h : G → K. This shows


that the class of all groups, together with group homomorphisms as morphisms, forms a
category.

Types of homomorphic maps

If the homomorphism h is a bijection, then one can show that its inverse is also a group
homomorphism, and h is called a group isomorphism; in this case, the groups G and H are
called is omorphic: they differ only in the notation of their elements and are identical for all p
ractical purposes.

If h: G → G is a group h omomorphism, we call it an endomorphism of G. If furthermore


it is bijective and hence an isomorphism, it is called an automorphism. The set of all
automorphisms of a group G, with functional composition as operation, forms itself a group,
the automorphism group of G. It is denoted by Aut(G). As an example, the automorphism
group of (Z, +) contains only two elements, the identity transformationand multiplication with
-1; it is isomorphic to Z/2Z.
An epimorphism is a surjective homomorphism, that is, a homomorphism which is onto as a
function. A monomorphism is an injective homomorphism, that is, a homomorphism which
is one-to-one as a function.

Homomorphisms of abelian groups

If G and H are abelian (i.e. commutative) groups, then the set Hom(G, H) of all group
homomorphisms from G to H is itself an abelian group: the sum h + k of two
homomorphisms is defined by

(h + k)(u) = h(u) + k(u) for all u in G.

The commutativity of H is needed to prove that h + k is again a group homomorphism. The


addition of homomorphisms is compatible with the composition of homomorphisms in the
following sense: if f is in Hom(K, G), h, k are elements of Hom(G, H), and g is in Hom(H,L),
then

(h + k) o f = (h o f) + (k o f) and g o (h + k) = (g o h) + (g o k).

This shows that the set End(G) of all endomorphisms of an abelian group forms a ring, the
endomorphism ring of G. For example, the endomorphism ring of the abelian group
consisting of the direct sum of m copies of Z/nZ is isomorphic to the ring of m-by-m
matrices with entries in Z/nZ. The above compatibility also shows that the category of all
abelian groups with group ho momorphisms forms a preadditive category; the existence of
direct sums and well-behaved kernels makes this category the prototypical example of an
abelian category.

Cyclic group

In group theory, a cyclic group is a group that can be generated by a single element, in the
sense that the group has an element g (called a "generator" of the group) such that, when
written multiplicatively, every element of the group is a power of g (a multiple of g when the
notation is additive).
Definition

The six 6th complex roots of unity form a cyclic group under multiplication. z is a primitive
element, but z2 is not, because the odd powers of z are not a power of z2.

A group G is called cyclic if there exists an element g in G such that G = <g> = { gn | n is an


integer }. Since any group generated by an element in a group is a subgroup of that group,
showing that the only subgroup of a group G that contains g is G itself suffices to show that
G is cyclic.

For example, if G = { g0, g1, g2, g3, g4, g5 } is a group, then g6 = g0, and G is cyclic. In fact,
G is essentially the same as (that is, isomorphic to) the set { 0, 1, 2, 3, 4, 5 } with addition
modulo 6. For example, 1 + 2 = 3 (mod 6) cor responds to g1·g2 = g3, and 2 + 5 = 1 (mod 6)
corresponds to g2·g5 = g7 = g1, and so on. One can use the isomorphism φ defined by φ(gi) =
i.

For every positive integer n there is exactly one cyclic group (up to isomorphism) whose
order is n, and there is exactly one infinite cyclic group (the integers under addition). Hence,
the cyclic groups are the simplest groups and they are completely classified.

The name "cyclic" may be m isleading: it is possible to generate infinitely many elements
and not form any literal cycles; that is, every gn is distinct. (It can be said that it has one
infinitely long cycle.) A group generated in this way is called an infinite cyclic group, and is
isomorphic to the additive group of integers Z.

Furthermore, the circle group (whose elements are uncountable) is not a cyclic group—a
cyclic group always has countable elements.
Since the cyclic groups are abelian, they are often written additively and denoted Zn.
However, this notation can be problematic for number theorists because it conflicts with the
usual notation for p-adic number rings or localization at a prime ideal. The quotient notations
Z/nZ, Z/n, and Z/(n) are standard alternatives. We adopt the first of these here to avoid the
collision of notation. See also the section Subgroups and notation below.

One may write the group multiplicatively, and denote it by Cn, where n is the order (which
can be ∞). For example, g3g4 = g2 in C5, whereas 3 + 4 = 2 in Z/5Z.

Properties

The fundamental theorem of cyclic groups states that if G is a cyclic group of order n then
every subgroup of G is cyclic. Moreover, the order of any subgroup of G is a divisor of n and
for each positive divisor k of n the group G has exactly one subgroup of order k. This
property characterizes finite cyclic groups: a group of order n is cyclic if and only if for every
divisor d of n the group has at most one subgroup of order d. Sometimes the e quivalent s
tatement is used: a group of order n is cyclic if and only if for every divisor d of n the group
has exactly one subgroup of order d.

Every finite cyclic group is i somorphic to the group { [0], [1], [2], ..., [n - 1] } of integers
modulo n under addition, and any infinite cyclic group is isomorphic to Z (the set of all
integers) under addition. Thus, one only needs to look at such groups to understand the
properties of cyclic groups in general. Hence, cyclic groups are one of the simplest groups to
study and a number of nice p roperties are known.

Given a cyclic group G of order n (n may be infinity) and for every g in G,

• G is abelian; that is, their group operation is com mutative: gh = hg (for all h in G).
This is so since g + h mod n = h + g mod n.
• If n is finite, then gn = g0 is the identity element of the group, since kn mod n = 0 for
any integer k.
• If n = ∞, then there are exactly two elements that generate the group on their own:
namely 1 and -1 for Z
• If n is finite, then there are exactly φ(n) elements that generate the group on their
own, where φ is the Euler totient function
• Every subgroup of G is cyclic. Indeed, each finite subgroup of G is a group of { 0,
1, 2, 3, ... m - 1} with addition m odulo m. And each infinite subgroup of G is mZ for
some m, which is bijective to (so is omorphic to) Z.
• Gn is isomorphic to Z/nZ (factor group of Z over nZ) since Z/nZ = {0 + nZ, 1 +
nZ, 2 + nZ, 3 + nZ, 4 + nZ, ..., n - 1 + nZ} { 0, 1, 2, 3, 4, ..., n - 1} under
addition modulo n.
More generally, if d is a divisor of n, then the number of elements in Z/n which have order d
is φ(d). The order of the residue class of m is n / gcd(n,m).

If p is a prime number, then the only group (up to isomorphism) with p elements is the cyclic
group Cp or Z/pZ.

The direct product of two cyclic groups Z /nZ and Z/mZ is cyclic if and only if n and m are
coprime. Thus e.g. Z/12Z is the direct product of Z/3Z and Z/4Z, but not the direct product
of Z/6Z and Z/2Z.

The definition immediately implies that cyclic groups have very simple group presentation
C∞ = < x | > and Cn = < x | xn > for finite n.

A primary cyclic group is a group of the form Z/pk where p is a prime number. The fun
damental theorem of abelian groups states that every finitely generated abelian group is the
direct p roduct of finitely many finite primary cyclic and infinite cyclic groups.

Z/nZ and Z are also commutative rings. If p is a prime, then Z/pZ is a finite field, also
denoted by Fp or GF(p). Every field with p elements is isomorphic to this one.

The units of the ring Z/nZ are the numbers coprime to n. They form a group under
multiplication modulo n with φ(n) elements (see above). It is written as (Z/nZ)×. For
example, when n = 6, we get (Z/nZ)× = {1,5}. When n = 8, we get (Z/nZ)× = {1,3,5,7}.

In fact, it is known that (Z/nZ)× is cyclic if and only if n is 1 or 2 or 4 or pk or 2 pk for an odd


prime number p and k ≥ 1, in which case every generator of (Z/nZ)× is called a primitive
root modulo n. Thus, (Z/nZ)× is cyclic for n = 6, but not for n = 8, where it is instead i
somorphic to the Klein four-group.

The group (Z/pZ)× is cyclic with p - 1 elements for every prime p, and is also written
(Z/pZ)* because it consists of the non-zero elements. More generally, every finite
s ubgroup of the mu ltiplicative group of any field is cyclic.

Examples

In 2D and 3D the symmetry group for n-fold rotational symmetry is Cn, of abstract group
type Zn. In 3D there are also other symmetry groups which are algebraically the same, see
Symmetry groups in 3D that are cyclic as abstract group.
Note that the group S1 of all rotations of a circle (the circle group) is not cyclic, since it is not
even countable.

The nth roots of unity form a cyclic group of order n under multiplication. e.g., 0 = z3 - 1
= (z - s0)(z - s1)(z - s2) where si = e2πi / 3 and a group of {s0,s1,s2} under mul tiplication is
cyclic.

The Galois group of every finite field extension of a finite field is finite and cyclic;
conversely, given a finite field F and a finite cyclic group G, there is a finite field extension
of F whose Galois group is G.

Representation

The cycle graphs of finite cyclic groups are all n-sided polygons with the elements at the
vertices. The dark vertex in the cycle graphs below stand for the identity element, and the
other vertices are the other elements of the group. A cycle consists of successive powers of
either of the elements connected to the identity element.

C1 C2 C3 C4 C5 C6 C7 C8

The rep resentation theory of the cyclic group is a critical base case for the representation
theory of more general finite groups. In the complex case, a representation of a cyclic group
d ecomposes into a direct sum of linear c haracters, making the connection between
character theory and repre sentation theory transparent. In the positive ch aracteristic case,
the indecomposable repre sentations of the cyclic group form a model and inductive basis for
the rep resentation theory of groups with cyclic Sylow subgroups and more generally the
representation theory of blocks of cyclic defect.

Subgroups and notation

All subgroups and quotient groups of cyclic groups are cyclic. Specifically, all subgroups of Z
are of the form mZ, with m an integer ≥0. All of these subgroups are different, and apart from
the trivial group (for m=0) all are isomorphic to Z. The lattice of subgroups of Z is isomorphic
to the dual of the lattice of natural numbers ordered by divisibility. All factor groups of Z are
finite, except for the trivial exception Z/{0} = Z/0Z. For every positive divisor d of n, the
quotient group Z/nZ has precCSEly one subgroup of order d, the one generated by the residue
class of n/d. There are no other subgroups. The lattice of subgroups is thus isomorphic to the
set of divisors of n, ordered by divisibility. In particular, a cyclic group is simple if and only if
its order (the number of its elements) is prime.

Using the quotient group formalism, Z/nZ is a standard notation for the additive cyclic group
with n elements. In ring terminology, the s ubgroup nZ is also the ideal (n), so the quotient
can also be written Z/(n) or Z/n without abuse of notation. These alternatives do not conflict
with the notation for the p-adic integers. The last form is very common in informal
calculations; it has the additional advantage that it reads the same way that the group or ring
is often described verbally, "Zee mod en".

As a p ractical problem, one may be given a finite subgroup C of order n, generated by an


element g, and asked to find the size m of the subgroup generated by gk for some integer k.
Here m will be the smallest integer > 0 such that mk is divisible by n. It is therefore n/m
where m = (k, n) is the greatest common divisor of k and n. Put another way, the index of the
subgroup generated by gk is m. This reasoning is known as the index calculus algorithm, in
number theory.

Endomorphisms

The endomorphism ring of the abelian group Z/nZ is isomorphic to Z/nZ itself as a ring.
Under this isomorphism, the number r corresponds to the endomorphism of Z/nZ that maps
each element to the sum of r copies of it. This is a bijection if and only if r is
coprime with n, so the automorphism group of Z/nZ is isomorphic to the unit group (Z/nZ)×
(see above).

Similarly, the endomorphism ring of the additive group Z is isomorphic to the ring Z. Its
automorphism group is iso morphic to the group of units of the ring Z, i.e. to {-1, +1} C2.

Virtually cyclic groups

A group is called virtually cyclic if it contains a cyclic subgroup of finite index (the number
of cosets that the subgroup has). In other words, any element in a virtually cyclic group can
be arrived at by applying a member of the cyclic subgroup to a member in a certain finite set.
Every cyclic group is virtually cyclic, as is every finite group. It is known that a finitely
generated discrete group with exactly two ends is virtually cyclic

(for instance the product of Z/n and Z). Every abelian subgroup of a Gromov hyperbolic
group is virtually cyclic.

Group isomorphism

In abstract algebra, a group isomorphism is a function between two groups that sets up a
one-to-one corre spondence between the elements of the groups in a way that respects the
given group operations. If there exists an isomorphism between two groups, then the groups
are called isomorphic. From the standpoint of group theory, isomorphic groups have the
same p roperties and need not be distinguished.

Definition and notation

Given two groups (G, *) and (H, ), a group isomorphism from (G, *) to (H, ) is a
bijective group homomorphism from G to H. Spelled out, this means that a group
i somorphism is a bijective function such that for all u and v in G it holds
that

The two groups (G, *) and (H, ) are isomorphic if an isomorphism exists. This is
written:

Often shorter and more simple notations can be used. Often there is no ambiguity about the
group operation, and it can be omitted:

Sometimes one can even simply write G = H. Whether such a notation is possible without
confusion or ambiguity depends on context. For example, the equals sign is not very suitable
when the groups are both subgroups of the same group. See also the examples.

Conversely, given a group (G, *), a set H, and a bijection , we can make H
a group (H, ) by defining

.
If H = G and = * then the bijection is an automorphism (q.v.)

In tuitively, group theorists view two iso morphic groups as follows: For every element g of a
group G, there exists an element h of H such that h 'behaves in the same way' as g (operates
with other elements of the group in the same way as g). For instance, if g generates G, then
so does h. This implies in particular that G and H are in bijective cor respondence. So the
definition of an isomorphism is quite natural.

An i somorphism of groups may equivalently be defined as an i nvertible morphism in the


category of groups.

Examples

,+), is isomorphic to the


• The group of all real numbers with addition, ( group of
+

all positive real numbers with multiplication ( ,×):


via the isomorphism

f(x) = ex

(see ex ponential function).

• The group of integers (with addition) is a subgroup of , and the factor group
1
/ is is omorphic to the group S of complex numbers of absolute value 1 (with
mul tiplication):

An isomorphism is given by

for every x in .

The Klein four-group is isomorphic to the direct product of two copies of


(see modular arithmetic), and can therefore be written .
Another notation is Dih2, because it is a dihedral group .

• Generalizing this, for all odd n, Dih2n is isomorphic with the direct product of Dihn
and Z2.

• If (G, *) is an infinite cyclic group, then (G, *) is isomorphic to the integers (with the
addition operation). From an algebraic point of view, this means that the set of all
integers (with the addition operation) is the 'only' infinite cyclic group.

Some groups can be proven to be isomorphic, relying on the axiom of choice, while it is
even theoretically impossible to construct concrete isomorphisms. Examples:
• The group ( , + ) is isomorphic to the group ( , +) of all complex numbers with
addition.
• The group ( , ·)* of non-zero complex numbers with multiplication as operation is
isomorphic to the group S1 mentioned above.

Properties

• The kernel of an isomorphism from (G, *) to (H, ) , is always {eG} where eG is the
identity of the group (G, *)

• If (G, *) is isomorphic to (H, ) , and if G is abelian then so is H.

• If (G, *) is a group that is isomorphic to (H, ) [where f is the isomorphism],


then if a belongs to G and has order n, then so does f(a).

• If (G, *) is a locally finite group that is isomorphic to (H, ), then (H, ) is also
locally finite.

• The previous examples illustrate that 'group properties' are always preserved by
i somorphisms.

Cyclic groups

All cyclic groups of a given order are i somorphic to .


Let G be a cyclic group and n be the order of G. G is then the group generated by < x > =
{e,x,...,xn - 1}. We will show that

Define

, so that . Clearly, is
bijective.
Then

which proves that


.

Consequences

From the definition, it follows that any isomorphism will map the identity
element of G to the identity element of H,

f(eG) = eH

that it will map inverses to inverses,

and more generally, nth powers to nth powers,

for all u in G, and that the inverse map is also a group isomorphism.

The relation "being isomorphic" satisfies all the axioms of an equivalence relation. If f is an
isomorphism between two groups G and H, then everything that is true about G that is only
related to the group s tructure can be translated via f into a true ditto s tatement about H, and
vice versa.
Automorphisms
An isomorphism from a group (G,*) to itself is called an automorphism of this group.
Thus it is a bijection such that

f(u) * f(v) = f(u * v).

An au tomorphism always maps the identity to itself. The image under an au tomorphism of a
conjugacy class is always a conjugacy class (the same or another). The image of an element
has the same order as that element.

The composition of two automorphisms is again an automorphism, and with this operation
the set of all automorphisms of a group G, denoted by Aut(G), forms itself a group, the au
tomorphism group of G.

For all Abelian groups there is at least the automorphism that replaces the group elements by
their inverses. However, in groups where all elements are equal to their inverse this is the
trivial automorphism, e.g. in the Klein four-group. For that group all permutations of the
three non-identity elements are automorphisms, so the automorphism group is i somorphic to
S3 and Dih3.

In Zp for a prime number p, one non-identity element can be replaced by any other, with cor
responding changes in the other elements. The automorphism group is isomorphic to Z p - 1.
For example, for n = 7, multiplying all elements of Z7 by 3, modulo 7, is an automorphism of
order 6 in the automorphism group, because 36 = 1 ( modulo 7 ), while lower powers do not
give 1. Thus this automorphism generates Z6. There is one more automorphism with this
property: multiplying all elements of Z7 by 5, modulo 7. Therefore, these two correspond to
the elements 1 and 5 of Z6, in that order or conversely.

The automorphism group of Z6 is isomorphic to Z2, because only each of the two elements 1
and 5 generate Z6, so apart from the identity we can only interchange these.

The automorphism group of Z2 × Z2 × Z2 = Dih2 × Z2 has order 168, as can be found as


follows. All 7 non-identity elements play the same role, so we can choose which plays the
role of (1,0,0). Any of the remaining 6 can be chosen to play the role of (0,1,0). This
determines which corresponds to (1,1,0). For (0,0,1) we can choose from 4, which
determines the rest. Thus we have 7 × 6 × 4 = 168 automorphisms. They correspond to those
of the Fano plane, of which the 7 points correspond to the 7 non-identity elements
The lines connecting three points correspond to the group operation: a, b, and c on one line
means a+b=c, a+c=b, and b+c=a. See also general linear group over finite fields.

For Abelian groups all automorphisms except the trivial one are called outer automorphisms.

Non-Abelian groups have a non-trivial inner automorphism group, and possibly also outer
automorphisms.

Coding Theory and Rings

Elements of Coding Theory

Coding theory is studied by various scientific di sciplines — such as info rmation theory,
electrical engineering, mathematics, and computer science — for the purpose of designing
efficient and reliable data transmission methods. This typically involves the removal of r
edundancy and the correction (or detection) of errors in the transmitted data. It also includes
the study of the properties of codes and their fitness for a specific application.

Thus, there are es sentially two aspects to Coding theory:

1. Data compression (or, source coding)


2. Error correction (or, channel coding')

These two aspects may be studied in combination.

The first, source encoding, attempts to compress the data from a source in order to transmit it
more efficiently. This practice is found every day on the Internet where the common "Zip"
data compression is used to reduce the network load and make files smaller. The second,
channel encoding, adds extra data bits to make the transmission of
data more robust to dis turbances present on the transmission channel. The ordinary user may
not be aware of many applications using channel coding. A typical music CD uses the Reed-
Solomon code to correct for scratches and dust. In this application the transmission channel
is the CD itself. Cell phones also use coding techniques to correct
for the fading and noCSE of high frequency radio transmission. Data modems, t elephone
transmissions, and NASA all employ channel coding techniques to get the bits through, for
example the turbo code and LDPC codes.
The hamming metric:

3- bit binary cube for finding Two example distances: 100->011 has distance 3 (red
Hamming distance path); 010->111 has distance 2 (blue path)
4- bit binary h ypercube for finding Hamming distance

Two example dis tances: 0100->1001 has distance 3 (red path); 0110->1110 has distance 1
(blue path)

In information theory, the Hamming distance between two strings of equal length is the
number of positions at which the corresponding symbols are different. Put another way, it
Parity-check matrix

In coding theory, a parity-check matrix of a linear block code C is a generator matrix of


the dual code. As such, a codeword c is in C if and only if the matrix-vector product HTc=0.

The rows of a parity check matrix are parity checks on the codewords of a code. That is, they
show how linear combinations of certain digits of each codeword equal zero. For example,
the parity check matrix

DEPT
specifies that for each codeword, digits 1 and 2 should sum to zero and digits 3 and 4 should
sum to zero.

Creating a parity check matrix

The parity check matrix for a given code can be derived from its generator matrix (and vice-
versa). If the generator matrix for an [n,k]-code is in standard form

then the parity check matrix is given by

because
GHT = P - P = 0.
Negation is performed in the finite field mod q. Note that if the characteristic of the
underlying field is 2 (i.e., 1 + 1 = 0 in that field), as in binary codes, then - P = P, so the
negation is unnecessary.

For example, if a binary code has the generator matrix

The parity check matrix becomes


For any valid codeword x, Hx = 0. For any invalid codeword , the syndrome S satisfies
.

Parity check

If no error occurs during transmission, then the received codeword r is identical to the t
ransmitted codeword x:

The receiver multiplies H and r to obtain the syndrome vector , which indicates
whether an error has occurred, and if so, for mul which codeword bit. Performing this
tiplication (again, entries modulo 2):

Since the syndrome z is the null vector, the receiver can conclude that no error has occurred.
This conclusion is based on the observation that when the data vector is multiplied by , a
change of basis occurs into a vector subspace that is the kernel of . As long as nothing
happens during transmission, will remain in the kernel of and the mul tiplication will yield
the null vector.

Coset

In mathematics, if G is a group, H is a subgroup of G, and g is an element of G, then

gH = {gh : h an element of H�is} a left coset of H in G, and


Hg = {hg : h an element of H�is} a right coset of H in G.

Only when H is normal will the right and left cosets of H coincide, which is one definition of
normality of a subgroup.

( �-1
A coset is a left or right coset of some subgroup in G. Since Hg = g�g Hg�), the right
cosets Hg (of H�and the left cosets g �(� Hg�(of the conjugate subgroup g-1Hg�are the
-1

) g ) )
same. Hence it is not meaningful to speak of a coset as being left or right unless one first
specifies the underlying s ubgroup.

For abelian groups or groups written additively, the notation used changes to g+H and H+g
respectively.

Examples

The additive cyclic group Z4 = {0, 1, 2, 3} = G has a subgroup H = {0, 2} (isomorphic to Z2).
The left cosets of H in G are

0 + H = {0, 2} = H

1 + H = {1, 3}

2 + H = {2, 0} = H

3 + H = {3, 1}.

There are therefore two distinct cosets, H itself, and 1 + H = 3 + H. Note that every

element of G is either in H or in 1 + H, that is, H �(1 + H�)= G, so the distinct cosets of

H in G partition G. Since Z4 is an abelian group, the right cosets will be the same as the left.

Another example of a coset comes from the theory of vector spaces. The elements
(vectors) of a vector space form an Abelian group under vector addition. It is not hard to
show that subspaces of a vector space are subgroups of this group. For a vector space V, a s
ubspace W, and a fixed vector a in V, the sets

are called affine subspaces, and are cosets (both left and right, since the group is Abelian). In
terms of geometric vectors, these affine subspaces are all the "lines" or "planes" parallel to
the subspace, which is a line or plane going through the origin.

General properties

We have gH = H if and only if g is an element of H, since as H is a subgroup, it must be


closed and must contain the identity.

Any two left cosets of H in G are either identical or disjoint — i.e., the left cosets form a
partition of G such that every element of G belongs to one and only one left coset.[1] In
particular the identity is in precCSEly one coset, and that coset is H itself; this is also the only
coset that is a subgroup. We can see this clearly in the above examples.

The left cosets of H in G are the equivalence classes under the equivalence relation on G
given by x ~ y if and only if x -1y �H. Similar statements are also true for right cosets.

A coset representative is a representative in the equivalence class sense. A set of


representatives of all the cosets is called a transversal. There are other types of equivalence
relations in a group, such as conjugacy, that form different classes which do not have the
properties discussed here. Some books on very applied group theory erroneously identify the
conjugacy class as 'the' equivalence class as opposed to a particular type of equivalence class.

Index of a subgroup

All left cosets and all right cosets have the same order (number of elements, or cardinality in
the case of an infinite H), equal to the order of H (because H is itself a coset). Furthermore,
the number of left cosets is equal to the number of right cosets and is
known as the index of H in G, written as [G : H�. ]Lagrange's theorem allows us to
compute the index in the case where G and H are finite, as per the formula:

|G�= [|G : H�· |H] �

This equation also holds in the case where the groups are infinite, although the meaning may
be less clear.
Cosets and normality

If H is not normal in G, then its left cosets are different from its right cosets. That is, there is
an a in G such that no element b satisfies aH = Hb. This means that the partition of G into the
left cosets of H is a different partition than the partition of G into right cosets of H. (It is
important to note that some cosets may coincide. For example, if a is in the center of G, then
aH = Ha.)

On the other hand, the subgroup N is normal if and only if gN = Ng for all g in G. In this

Lagrange's theorem (group theory)

Lagrange's theorem, in the mat hematics of group theory, states that for any finite group G,
the order (number of elements) of every subgroup H of G divides the order of G. The
theorem is named after Joseph Lagrange.

Proof of Lagrange's Theorem

This can be shown using the concept of left cosets of H in G. The left cosets are the
equivalence classes of a certain equivalence relation on G and therefore form a partition of G.
Specifically, x and y in G are related if and only if there exists h in H such that x = yh. If we
can show that all cosets of H have the same number of elements, then each coset of H has
precCSEly |H| elements. We are then done since the order of H times the number of cosets is
equal to the number of elements in G, thereby proving that the order H divides the order of G.
Now, if aH and bH are two left cosets of H, we can define a map f : aH → bH by setting f(x) =
ba-1x. This map is b ijective because its inverse is given by
f -1(y) = ab-1y.

This proof also shows that the quotient of the orders |G| / |H| is equal to the index [G : H]
(the number of left cosets of H in G). If we write this statement as

|G| = [G : H] · |H|,

then, seen as a statement about cardinal numbers, it is equivalent to the Axiom of choice.

Using the theorem


A consequence of the theorem is that the order of any element a of a finite group (i.e. the
smallest positive integer number k with ak = e, where e is the identity element of the group)
divides the order of that group, since the order of a is equal to the order of the cyclic
subgroup generated by a. If the group has n elements, it follows

an = e.

This can be used to prove Fermat's little theorem and its generalization, Euler's theorem.
These special cases were known long before the general theorem was proved.

The theorem also shows that any group of prime order is cyclic and simple.

E xistence of subgroups of given order

Lagrange's theorem raCSEs the converse question as to whether every divisor of the order of a
group is the order of some subgroup. This does not hold in general: given a finite group G and
a divisor d of |G|, there does not necessarily exist a subgroup of G with order d. The smallest
example is the alternating group G = A4 which has 12 elements but no subgroup of order 6. A
CLT group is a finite group with the property that for every divisor of the order of the group,
there is a subgroup of that order. It is known that a CLT group must be solvable and that every
supersolvable group is a CLT group: however there exists solvable groups which are not CLT
and CLT groups which are not super solvable.

There are partial converses to Lagrange's theorem. For general groups, Cauchy's theorem
guarantees the existence of an element, and hence of a cyclic subgroup, of order any prime
dividing the group order; Sylow's theorem extends this to the existence of a s ubgroup of
order equal to the maximal power of any prime dividing the group order. For
s olvable groups, Hall's theorems assert the existence of a subgroup of order equal to any
unitary divisor of the group order (that is, a divisor coprime to its cofactor).

Group Co des: Deco ding wthi Coset L ead ers, Hamming Matrices

R ings a nd Mod ular Arithmetic: The Ring Structure – Definition and E xampl es, Ring P
ro pe rt ies and Sub str uctures, The I ntegers Mod ulo n

In computer science, group codes are a type of code. Group codes consist of n linear block
codes which are subgroups of Gn, where G is a finite Abelian group.

A systematic group code C is a code over Gn of order defined by n - k homomorphisms


which determine the parity check bits. The remaining k bits are the in formation bits
themselves.

Construction

Group codes can be constructed by special generator matrices which resemble generator
matrices of linear block codes except that the elements of those matrices are endomorphisms
of the group instead of symbols from the code's alphabet. For example, consider the
generator matrix

The elements of this matrix are 2x2 matrices which are endomorphisms. In this scenario,
each codeword can be represented as where g1,...gr are the generators of
G.

Decoding with Coset leader

In the field of coding theory, a coset leader is defined as a word of minimum weight in any
particular coset - that is, a word with the lowest amount of non-zero entries. Sometimes there
are several words of equal minimum weight in a coset, and in that case,
any one of those words may be chosen to be the coset leader.
Coset leaders are used in the construction of a standard array for a linear code, which can
then be used to decode received vectors. For a received vector y, the decoded message is y -
e, where e is the coset leader of y. Coset leaders can also be used to construct a fast decoding
strategy. For each coset leader u we calculate the syndrome uH′. When we receive v we
evaluate vH′ and find the matching syndrome. The corresponding coset leader is the most
likely error pattern and we assume that v+u was the codeword sent.

Example

A standard array for an [n,k]-code is a qn - k by qk array where:

1. The first row lists all codewords (with the 0 codeword on the extreme left)
2. Each row is a coset with the coset leader in the first column
3. The entry in the i-th row and j-th column is the sum of the i-th coset leader and the j-
th codeword.

For example, the [n,k]-code C3 = {0, 01101, 10110, 11011} has a standard array as follows:

0 01101 10110 11011

10000 11101 00110 01011

01000 00101 11110 10011

00100 01001 10010 11111

00010 01111 10100 11001

00001 01100 10111 11010

11000 10101 01110 00011

10001 11100 00111 01010


Note that the above is only one possibility for the standard array; had 00011 been chosen as
the first coset leader of weight two, another standard array rep resenting the code would have
been con structed.
Note that the first row contains the 0 vector and the codewords of C3 (0 itself being a
codeword). Also, the leftmost column contains the vectors of minimum weight enumerating
vectors of weight 1 first and then using vectors of weight 2. Note also that each possible
vector in the vector space appears exactly once.

Because each possible vector can appear only once in a standard array some care must be
taken during cons truction. A s tandard array can be created as follows:

1. List the codewords of C, starting with 0, as the first row


2. Choose any vector of minimum weight not already in the array. Write this as the first
entry of the next row. This vector is denoted the 'coset leader'.
3. Fill out the row by adding the coset leader to the codeword at the top of each column.
The sum of the i-th coset leader and the j-th codeword becomes the entry in row i,
column j.
4. Repeat steps 2 and 3 until all rows/cosets are listed and each vector appears exactly
once.

Hamming matrices

Hamming codes can be computed in linear algebra terms through matrices because Hamming
codes are linear codes. For the purposes of Hamming codes, two Hamming matrices can be
defined: the code generator matrix and the parity-check matrix
:
and

Bit position of the data and parity bits

As mentioned above, rows 1, 2, & 4 of should look familiar as they map the data bits
to their parity bits:

• p1 covers d1, d2, d4


• p2 covers d1, d3, d4
• p3 covers d2, d3, d4

The remaining rows (3, 5, 6, 7) map the data to their position in encoded form and there is
only 1 in that row so it is an identical copy. In fact, these four rows are linearly independent
and form the identity matrix (by design, not coincidence).

Also as mentioned above, the three rows of should be familiar. These rows are used to
compute the syndrome vector at the receiving end and if the s yndrome vector is the null
vector (all zeros) then the received word is error-free; if non-zero then the value indicates
which bit has been flipped.

The 4 data bits — assembled as a vector — is pre-multiplied by (i.e., ) and taken modulo 2 to
yield the encoded value that is transmitted. The original 4 data bits are converted to 7 bits
(hence the name "Hamming(7,4)") with 3 parity bits added to ensure even parity using the
above data bit coverages. The first table above shows the mapping between each data and
parity bit into its final bit position (1 through 7) but this can also be presented in a Venn
diagram. The first diagram in this article shows three circles (one for each parity bit) and
encloses data bits that each parity bit covers. The second diagram (shown to the right) is
identical but, instead, the bit positions are marked.

For the remainder of this section, the following 4 bits (shown as a column vector) will be
used as a running example:

Rings and Modular Arithmetic

Ring theory

In mathematics, ring theory is the study of rings— algebraic s tructures in which addition
and multiplication are defined and have similar properties to those familiar from the integers.
Ring theory studies the structure of rings, their representations, or, in different language,
modules, special classes of rings (group rings, division rings, universal enveloping algebras),
as well as an array of properties that proved to be of interest both within the theory itself and
for its applications, such as homological properties and pol ynomial identities.

Commutative rings are much better understood than noncommutative ones. Due to its
intimate connections with algebraic geometry and algebraic number theory, which provide
many natural examples of co mmutative rings, their theory, which is considered to
be part of commutative algebra and field theory rather than of general ring theory, is quite
different in flavour from the theory of their nonco mmutative counterparts. A fairly recent
trend, started in the 1980s with the development of noncommutative geometry and with the
discovery of quantum groups, attempts to turn the situation around and build the theory of
certain classes of noncom mutative rings in a geometric fashion as if they were rings of
functions on (non-existent) 'noncommutative spaces'.

Elementary introduction
Definition

Formally, a ring is an Abelian group (R, +), together with a second binary operation * such
that for all a, b and c in R,

a * (b * c) = (a * b) * c

a * (b + c) = (a * b) + (a * c)

(a + b) * c = (a * c) + (b * c)
also, if there exists a mult iplicative identity in the ring, that is, an element e such that for all
a in R,

a*e=e*a=a

then it is said to be a ring with unity. The number 1 is a common example of a unity.

The ring in which e is equal to the additive identity must have only one element. This ring is
called the trivial ring.

Rings that sit inside other rings are called subrings. Maps between rings which respect the ring
operations are called ring homomorphisms. Rings, together with ring homomorphisms, form a
category (the category of rings). Closely related is the notion of ideals, certain subsets of rings
which arCSE as kernels of homomorphisms and can serve to define factor rings. Basic facts
about ideals, homomorphisms and factor rings are recorded in the i somorphism theorems and
in the Chinese remainder theorem.

A ring is called commutative if its multiplication is commutative. Commutative rings


resemble familiar number systems, and various definitions for commutative rings are
designed to recover properties known from the integers. Commutative rings are also
important in algebraic geometry. In co mmutative ring theory, numbers are often replaced by
ideals, and the definition of prime ideal tries to capture the essence of prime numbers.
Integral domains, non-trivial commutative rings where no two non-zero elements multiply to
give zero, generalize another property of the integers and serve as the proper realm to study
divisibility. Principal ideal domains are integral domains in which every ideal can be
generated by a single element, another property shared by the integers. E uclidean domains
are integral domains in which the E uclidean algorithm can be carried out. Important ex
amples of co mmutative rings can be constructed as rings of pol ynomials and their factor
rings. Summary: Euclidean domain => p rincipal ideal domain => unique factorization
domain => integral domain => Com mutative ring.

Non-commutative rings resemble rings of matrices in many respects. Following the model of
algebraic geometry, attempts have been made recently at defining non-commutative
geometry based on non-commutative rings. Non-commutative rings and associative algebras
(rings that are also vector spaces) are often studied via their categories of modules. A module
over a ring is an Abelian group that the ring acts on as a ring of endomorphisms, very much
akin to the way fields (integral domains in which every non-zero element is invertible) act on
vector spaces. Examples of non- commutative
rings are given by rings of square matrices or more generally by rings of endomorphisms of
Abelian groups or modules, and by monoid rings.

The congruence relation

Modular ar ithmetic can be handled mathematically by introducing a con gruence relation on


the integers that is compatible with the operations of the ring of integers: addition, s
ubtraction, and mult iplication. For a positive integer n, two integers a and b are said to be
congruent modulo n, written:

if their dif ference a - b is an integer multiple of n. The number n is called the modulus of the
co ngruence. An equivalent definition is that both numbers have the same remainder when
divided by n.
For example,

because 38 - 14 = 24, which is a multiple of 12. For positive n and non-negative a and b,
congruence of a and b can also be thought of as asserting that these two numbers have the
same remainder after dividing by the modulus n. So,

because both numbers, when divided by 12, have the same remainder (2). E quivalently, the
fractional parts of doing a full division of each of the numbers by 12 are the same: 0.1666...
(38/12 = 3.1666..., 2/12 = 0.1666...). From the prior definition we also see that their
difference, a - b = 36, is a whole number (integer) multiple of 12 (n = 12, 36/12 = 3).

The same rule holds for negative values of a:

A remark on the notation: Because it is common to consider several congruence relations for
different moduli at the same time, the modulus is incorporated in the notation. In spite
of the ternary notation, the congruence relation for a given modulus is binary. This would
have been clearer if the notation a ≡n b had been used, instead of the common traditional
notation.

The properties that make this relation a congruence relation (respecting addition, s
ubtraction, and mult iplication) are the following.

If
and

then:




Multiplicative group of integers modulo n

In modular arithmetic the set of congruence classes relatively prime to the modulus n form a
group under multiplication called the multiplicative group of integers modulo n. It is also
called the group of primitive residue classes modulo n. In the theory of rings, a branch of
abstract algebra, it is described as the group of units of the ring of integers modulo n. (Units
refers to elements with a multiplicative inverse.)

This group is fundamental in number theory. It has found applications in cryptography,


integer factorization, and primality testing. For example, by finding the order (ie. the size) of
the group, one can determine if n is prime: n is prime if and only if the order is n - 1.

Group axioms

It is a straightforward exercCSE to show that under multiplication the congruence classes (mod
n) which are relatively prime to n satisfy the axioms for an abelian group.
Because a ≡ b (mod n) implies that gcd(a, n) = gcd(b, n), the notion of congruence classes
(mod n) which are relatively prime to n is well- defined.

Since gcd(a, n) = 1 and gcd(b, n) = 1 implies gcd(ab, n) = 1 the set of classes relatively
prime to n is closed under multiplication.

The natural mapping from the integers to the congruence classes (mod n) that takes an
integer to its congruence class (mod n) is a ring homomorphism. This implies that the class
containing 1 is the unique multiplicative identity, and also the associative and commutative
laws.

Given a, gcd(a, n) = 1, finding x satisfying ax ≡ 1 (mod n) is the same as solving ax + ny = 1,


which can be done by Bézout's lemma.

Notation

The ring of integers (mod n) is denoted or (i.e., the ring of integers modulo the ideal
nZ = (n) consisting of the multiples of n) or by . Depending on the
author its group of units may be written (for
German Einheit = unit) or similar notations. This article uses

111
Structure
Powers of 2
Modulo 2 there is only one relatively prime congruence class, 1, so is
trivial.

Modulo 4 there are two relatively prime congruence classes, 1 and 3, so


the cyclic group with two elements.

Modulo 8 there are four relatively prime classes, 1, 3, 5 and 7. The square of each of
these is 1, so the Klein four-group.

Modulo 16 there are eight relatively prime classes 1, 3, 5, 7, 9, 11, 13 and 15.
is the 2-torsion subgroup (ie. the square of each element is 1),
so is not cyclic. The powers of 3, {1,3,9,11} are a subgroup of order 4, as are
the powers of 5, {1,5,9,13}. Thus

The pattern shown by 8 and 16 holds[1] for higher powers 2k, k > 2:
is the 2-torsion subgroup (so is not cyclic)

and the powers of 3 are a subgroup of order 2k - 2, so

Powers of odd primes

For powers of odd primes pk the group is cyclic:[2]

General composite numbers

The Chinese remainder theorem[3] says that if then the ring


is the direct product of the rings cor responding to each of its prime power factors:

112
Similarly, the group of units is the direct p roduct of the groups corresponding
to each of the prime power factors:

Order

The order of the group is given by Euler's totient function: This


is the product of the orders of the cyclic groups in the direct product.

Exponent

The exponent is given by the Carmichael function λ(n), the least common multiple of the
orders of the cyclic groups. This means that if a and n are relatively prime,

Generators

is cyclic if and only if This is the case precCSEly when n is 2, 4, a power of an


odd prime, or twice a power of an odd prime. In this case a generator is called a primitive
root modulo n.

Since all the n = 1, 2, ..., 7 are cyclic, another way to state this is: If n < 8
then has a primitive root. If n ≥ 8 has a primitive root unless n is
divisible by 4 or by two distinct odd primes.

In the general case there is one generator for each cyclic direct factor.

Table
This table shows the structure and generators of for small values of n. The
generators are not unique (mod n); e.g. (mod 16) both {-1, 3} and {-1, 5} will work. The
generators are listed in the same order as the direct factors.

For example take n = 20. means that the order of is 8 (i.e. there are 8 numbers less than 20
and coprime to it); λ(20) = 4 that the fourth power of any number relatively prime to 20 is ≡ 1
(mod 20); and as for the generators, 19 has order 2, 3
has order 4, and every member of is of the form 19a × 3b, where a is 0 or 1
and b is 0, 1, 2, or 3.

The powers of 19 are {±1} and the powers of 3 are {3, 9, 7, 1}. The latter and their negatives
(mod 20), {17, 11, 13, 19} are all the numbers less than 20 and prime to it. The fact that the
order of 19 is 2 and the order of 3 is 4 implies that the fourth power of every
member of is ≡ 1 (mod 20).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy