Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Set Theory and Relations - Material

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

Set theory:

A collection of well defined objects is called as a set. The objects which


make up a set are called elements or members. We use capital letters to
represent sets such as A,B,C… and small letters to represent elements such as
a,b,c….

The following are the examples of sets.

1. The months in year

2. The vowels of alphabets

If a is an element of set A, we write it as a belongs to A i.e a ∈ A

If x is not an element of set A, we write it as a belongs to A i.e x A

If E denotes the set of all even integers, then 2 ∈ E and 3 E

A set is said to be well defined if it is possible to determine by means of certain


rules, whether any given object is a member of the element.

Representation of Sets:
Sets can be represented in two ways

1. Tabulation Method: All elements are listed, separated by commas and are
enclosed by braces

Example:

A={ 1,2,3,4,5,6} , B={ a,b,c,d,e},

The repeated elements in sets are ignored.

2. Rule Method: it is defined by specifying a property that elements of the set


have in common.

This can be represented as S: { x|P(x)}


Example:

If S is the set of all odd positive integers, then

S={1,3,5,7,…} can be represented as S:{x|x is a positive odd integer}

Types of Sets:
Finite set: If a set contains finite number of elements is called as Finite set and it
can be represented as A: { 1,2,3 }

Infinite set: If a set contains infinite number of elements is called as infinite set
and it can be represented as A: { 1,2,3 , …. }

Null Set: If a set contains no elements is called as Null set and it can be
represented as Ø or null set i.e; { }.

Singleton set: if a set contains single element is called singleton set.

Example:

If P = { x | x is a prime number 10 and 12 } then P = {11}


there is only one element in set P.
Example:

If A = { x| x ∉ 3 < x < 5 } then


A = { x| x ∉ 3 < x < 5 }
A = { 4}
set A contains only one element so set A is a singleton set.

Equal set:

Two sets A & B are called as Equality sets if and only if all the elements of A are in
Set B and vice versa and can be represented as A=B.

Example: A = {1,2,3,4} and B = {x|x is a positive integer with x2<20} then A=B

Sub set: A set contain within a set is called Sub set. The contained set is called
subset and containing is a set. It can be represented as
A  B, If x ∈ A and X ∈ B

If A is not a subset of B i.e if at least one element of A does not belongs to B then
it can be written as A ⊄ B. i.e if a set contains n elements and the total number of
subsets are 2n .

Example:

A = { 2,4,6} and B = { x | x is even natural number }


therefore B= { 2,4,6,8,10,…}
As every element of set A are in set B So, A ⊆ B But B is not a sub-set of A.

Some consequences:

 Every set is a sub-set of itself. A ⊆ A


 Φ is a sub-set of every set. Φ ⊆ A
 Two sets A and B are equal, if and only if A ⊆ B and B ⊆ A
 For any sets A,B and c, if A ⊆ B and B ⊆ C, then A ⊆ C
 For any sets A,B,C, if A =B and B=C, then A=C
Proper subset:

Any subset A is said to be proper subset of another set B is a subset of B, but


there is at least one element of B which does not belongs to A i.e if A ⊆ B but A B .
It can be represented as A ⊂ B.

Example: A ={1,2,3} B ={1,2,3,4,5} set A is a proper subset of a set B

Some consequences:

 A is not a proper sub-set of itself.


 Φ is not a proper sub-set of itself.
Super set:

If a set A is a subset of B then it can be written as B is a super set of A and it can


be represented as B ⊃ A

Example: A = { 1, 2} , B = { 1, 2, 3 } then A ⊆ B or B ⊃ A [ B contains A ]


So, B is called the superset of A.
Power set:

The set of all subsets of a set A is the power set of the set A. It is denoted by P(A).
As it is set of all subsets so it is given by the formula 2 n .
Examples:

If A = { 1, 2} then the power set of A is


Number of elements in A = 2
So, number of power sets will be 2 2 = 4.
A = P (A) = { {1}, {2}, {1,2}, { } }
Universal set:

Suppose, in a discussion, all sets that we consider are subsets of a certain set U or
E. This set U is called the universal set. The universal set varies from one
discussion to the other, and the context indicates the choice of the universal set.
The universal set is not unique.

Example:

Let A = { 1,2,3} and B = { 2,3,4}, then the universal set U= { 1,2,3,4,5}

or {x | x ∈ N } or { x| x ∈ W } or {x | x ∈ N, x ≤ 5 }

where N=set of natural numbers

W =set of whole numbers


Operations on sets:
Union of two sets:
The union of two sets A and B is the set whose elements are all of the
elements in A or in B or in both. The union of sets A and B denoted by A  B is
read as “A union B”.

Example: If A = { 1, 2, 3, 4} and B = { 2, 3, 5, 6 } then A ∪ B = { 1, 2, 3, 4, 5, 6 }


A union B is obtained by combining the two sets but if there is any element which
is common in both taken only once.

Intersection of two sets:


The intersection of two sets A and B is the set whose elements are all of the
elements common to both A and B. The intersection of the sets of A and B‖is
denoted by A  B and is read as “A intersection B”.

Example: if A = { 1, 2, 3, 4 } and B = { 2, 4, 6, 8, … } then A ∩ B = { 2, 4}


The common elements between set A and B are 2 and 4.‖

Difference of sets:
If A and B are subsets of the universal set U, then the relative complement
of B in A is the set of all elements in A which are not in B. It is denoted by A – B
thus: A – B = {x | x ∈ A and xB}

Example: if A = { 1, 2, 3 } and B = { 3,4,5 } then A – B = { 1,2}

Complement of a set:
If U is a universal set containing the set A, then U – A is called the
complement of A. It is denoted by A1. Thus A1 = {x: xA}

Example: If A = { 1, 2, 3, 4} and Universal set =U = { 1, 2, 3, 4, 5, 6, 7, 8}


Then A complement = A’ = { 5, 6, 7, 8}. Complement of set A contains
the elements present in universal set but not in set A.

Laws of set theory:


For each Law of Logic, there is a corresponding Law of Set Theory.

• Commutative:

1) A ∪ B = B ∪ A 2) A ∩ B = B ∩ A.
• Associative:

3) A ∪ (B ∪ C) = (A ∪ B) ∪ C 4) A ∩ (B ∩ C) = (A ∩ B) ∩ C
• Distributive:

5) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) 6) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

7) (B ∩ C) ∪ A = (B ∪ A) ∩ (C ∪ A) 8) (B ∪ C) ∩ A = (B ∩ A) ∪ (C ∩ A)

• Double Complement:

9)(A’ ) ‘ = A

• DeMorgan’s Laws:

10) (A ∪ B) ‘ = A’ ∩ B’ 11) (A ∩ B)‘ = A’ ∪ B’

• Identity:

12) ∅ ∪ A = A 13) U ∩ A = A

• Idempotent:

14) A ∪ A = A 15) A ∩ A = A

• Dominance:

16) A ∪ U = U 17) A ∩ ∅ = ∅

• Inverse:
18) A ∪ A’ = U 19) A ∩ A’ = ∅

• Absorption:

20) A ∪ (A ∩ B) = A 21) A ∩ (A ∪ B) = A

Example:

Determine the sets A and B, given that A-B = {1, 2, 4}, B-A = {7, 8} and

AUB = {1, 2, 4, 5, 7, 8, 9}

Solution: A = (AUB) - (B-A) = {1, 2, 4, 5, 9}

B = (AUB) - (A-B) = {5, 7, 8, 9}

Example:

Determine the sets A and B, given that A-B = {1, 3, 7, 11}, B-A = {2, 6, 8} and

A∩ B = {4, 9}

Solution: A = (A∩B) U (A-B) = {1, 3, 4, 7, 9, 11}

B = (A∩B) U (B-A) = {2, 4, 6, 8, 9} ∉

Example: For any two sets A and B, prove the Demorgan’s laws:

i) (AUB)’ = A’∩B’ ii) (A∩B)’ = A’ U B’

solution: i) we have A’∩B’ = {x/x∈A’ and x∈B’}

= {x/x∉A and x∉B}

= {x/x∉(AUB)} = (AUB)’

ii) we have A’UB’ = {x/x∈A’ or x∈B’}

= {x/x∉A or x∉B}

= {x/x∉(A∩B)}

= (A∩B)’
Principle of Inclusion and Exclusion:
The inclusion–exclusion principle is a counting technique which generalizes
the familiar method of obtaining the number of elements in the union of two
finite sets; symbolically expressed as |A ∪ B| = |A| + |B| − |A ∩ B|.

where A and B are two finite sets and |S| indicates the cardinality of a set S
(which may be considered as the number of elements of the set, if the set is
finite). The formula expresses the fact that the sum of the sizes of the two sets
may be too large since some elements may be counted twice. The double-
counted elements are those in the intersection of the two sets and the count is
corrected by subtracting the size of the intersection. The principle is more clearly
seen in the case of three sets, which for the sets A, B and C is given by

|A ∪ B∪ BC| = |A| + |B|+ |C| − |A ∩ B|− |C ∩ B| − |A ∩ C|+|A ∩B∩C|.

This formula can be verified by counting how many times each region in the Venn
diagram figure is included in the right-hand side of the formula. In this case, when
removing the contributions of over-counted elements, the number of elements in
the mutual intersection of the three sets has been subtracted too often, so must
be added back in to get the correct total.

In general, Let A1, · · · , Ap be finite subsets of a set U. Then,

¿ A 1 A 2 … .. AP∨¿ ∑ |Ai|− ∑ | Ai 1 Ai 2|+ ¿ ¿


1 ≤i ≤ p 1≤ i 1<i 2 ≤ p

∑ | Ai 1 Ai 2 Ai 3|−… ..+ (−1 ) P−1∨A 1 A 2 ….. Ap∨¿ ¿


1 ≤i 1<i 2<i 3 ≤ p

Example:

A large software development company employs 100 computer programmers. Of


them, 45 are proficient in Java, 30 in C#, 20 in Python, six in C# and Java, one in
Java and Python, five in C# and Python, and just one programmer  is proficient in
all three languages above. Determine the number of computer programmers that
are not proficient in any of these three languages.

Solution: Let U denote the set of all employed computer programmers and let J, C
and P denote the set of programmers proficient in Java, C# and Python,
respectively. Thus:

|U| = 100

|J| = 45

|C| = 30

|P| = 20

|J ∩ C| = 6
|J ∩ P| = 1

|C ∩ P| = 5

|J ∩ C ∩ P| = 1

In other words, we need to determine the cardinality of the complement of the


set J ∪ C ∪ P. (This is denoted as |(J ∪ C ∪ P)’|). Calculate |J ∪ C ∪ P| first before
determining the complement value:

|J ∪ C ∪ P| = 39 + 5 +20 +4 +15 + 1 = 84

Now calculate the complement:

|(J ∪ C ∪ P)’ | = |U| – |J ∪ C ∪ P| = 100 – 84 = 16           

16 programmers are not proficient in any of the three languages.

Example:

How many integers between 1 and 10000 are divisible by none of 2, 3, 5, 7?

solution: For i ∈ {2, 3, 5, 7},

let Ai = {n ∈ N | n ≤ 10000, i|n}.

Therefore,

the required answer is 10000 − |A2 ∪ A3 ∪ A5 ∪ A7| = 2285.

Example:

How many natural numbers n ≤ 1000 are not divisible by any of 2, 3?


solution: Let A2 = {n ∈ N | n ≤ 1000, 2|n} and

A3 = {n ∈ N | n ≤ 1000, 3|n}.

Then, |A2 ∪ A3| = |A2| + |A3| − |A2 ∩ A3|

= 500 + 333 − 166

= 667.

So, the required answer is 1000 − 667 = 333.


Relations:
Any set of ordered pairs defines a binary relation. We shall call a binary
relation simply a relation. Binary relations represent relationships between
elements of two sets. If R is a relation, a particular ordered pair, say (x,y) ∈ R can
be written as xRy and can be read as ―x is in relation R to y‖.

Example: Give an example of a relation.

Solution: The relation greater than‖ for real numbers is denoted by ′>′. If x and y
are any two real numbers such that x > y, then we say that (x, y) ∈>. Thus the
relation > is { } >= (x, y) : x and y are real numbers and x > y

Example: Define a relation between two sets A = {5, 6, 7} and B = {x, y}.

Solution: If A = {5, 6, 7} and B = {x, y}, then

the subset R = {(5, x), (5, y), (6, x), (6, y)} is a relation from A to B.

Definition: Let S be any relation. The domain of the relation S is defined as the set
of all first elements of the ordered pairs that belong to S and is denoted by D(S).

D(S) = { x : (x, y) ∈ S, for some y }

The range of the relation S is defined as the set of all second elements of the
ordered pairs that belong to S and is denoted by R(S).

R(S) = { y : (x, y) ∈ S, for some x}

Example: A = {2, 3, 4} and B = {3, 4, 5, 6, 7}.


Define a relation from A to B by (a, b) ∈ R if a divides b.

Solution: We obtain R = {(2, 4), (2, 6), (3, 3), (3, 6), (4, 4)}.

Domain of R = {2, 3, 4} and range of R = {3, 4, 6}.

Properties of Binary Relations:

A relation R on a set X is said to be

 Reflexive relation if xRx or (x, x) ∈ R, ∀x ∈ X

 Symmetric relation if xRy then yRx, ∀x, y ∈ X

 Transitive relation if xRy and yRz then xRz, ∀x, y, z ∈ X

 Irreflexive relation if x ̸Rx or (x, x)  R, ∀x ∈ X

 Antisymmetric relation if for every x and y in X, whenever xRy and yRx, then
x = y.

Examples:

i) If R1 = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 3)} be a relation on A = {1, 2, 3}, then R1 is a
reflexive relation, since for every x ∈ A, (x, x) ∈ R1.

ii) If R2 = {(1, 1), (1, 2), (2, 3), (3, 3)} be a relation on A = {1, 2, 3}, then R2 is not a
reflexive relation, since for every 2 ∈ A, (2, 2)  R2.
iii) If R3 = {(1, 1), (1, 2), (1, 3), (2, 2), (2, 1), (3, 1)} be a relation on A = {1, 2, 3},
then R3 is a symmetric relation.

iV) If R4 = {(1, 2), (2, 2), (2, 3)} on A = {1, 2, 3} is an anti symmetric.

Example:

Given S = {1, 2, ..., 10} and a relation R on S, where R = {(x, y)| x + y = 10}. What
are the properties of the relation R?

Solution: Given that

S = {1, 2, ..., 10}

= {(x, y)| x + y = 10}

= {(1, 9), (9, 1), (2, 8), (8, 2), (3, 7), (7, 3), (4, 6), (6, 4), (5, 5)}.

For any x ∈ S and (x, x) R. Here, 1 ∈ S but (1, 1)R.

⇒ the relation R is not reflexive. It is also not irreflexive, since (5, 5) ∈ R.

(1, 9) ∈ R ⇒ (9, 1) ∈ R

(2, 8) ∈ R ⇒ (8, 2) ∈ R…..

⇒ the relation is symmetric, but it is not anti symmetric.

(1, 9) ∈ R and (9, 1) ∈ R

⇒ (1, 1) R

⇒ The relation R is not transitive. Hence, R is symmetric.


Relation Matrix:
A relation R from a finite set X to a finite set Y can be represented by a
matrix is called the relation matrix of R. Let X = {x1, x2, ..., xm} and Y = {y1, y2, ...,
yn} be finite sets containing m and n elements, respectively, and R be the relation
from A to B. Then R can be represented by an m × n matrix MR = [rij ], which is
defined as follows:

Example.

Let A = {1, 2, 3, 4} and B = {b1, b2, b3}. Consider the relation R = {(1, b2), (1, b3),
(3,b2), (4, b1), (4, b3)}. Determine the matrix of the relation.

Solution: A = {1, 2, 3, 4}, B = {b1, b2, b3}.

Relation R = {(1, b2), (1, b3), (3, b2), (4, b1), (4, b3)}.

Matrix of the relation R is written as

Example: Let A = {1, 2, 3, 4}. Find the relation R on A determined by the matrix

Solution: The relation R = {(1, 1), (1, 3), (2, 3), (3, 1), (4, 1), (4, 2), (4, 4)}.
Properties of a relation in a set:
(i). If a relation is reflexive, then all the diagonal entries must be 1.

(ii). If a relation is symmetric, then the relation matrix is symmetric, i.e., rij = rji
for every i and j.

(iii). If a relation is anti symmetric, then its matrix is such that if rij = 1 then rji = 0
for i ≠ j.

Graph of a Relation:
A relation can also be represented pictorially by drawing its graph. Let R be
a relation in a set X = {x1, x2, ..., xm}. The elements of X are represented by points
or circles called nodes. These nodes are called vertices. If (xi, xj ) ∈ R, then we
connect the nodes xi and xj by means of an arc and put an arrow on the arc in the
direction from xi to xj . This is called an edge. If all the nodes corresponding to the
ordered pairs in R are connected by arcs with proper arrows, then we get a graph
of the relation R.

Note: (i). If xiRxj and xj Rxi, then we draw two arcs between xi and xj with arrows
pointing in both directions.

(ii). If xiRxi, then we get an arc which starts from node xi and returns to node xi.
This arc is called a loop.

Properties of relations:

(i). If a relation is reflexive, then there must be a loop at each node. On the other
hand, if the relation is irreflexive, then there is no loop at any node.

(ii). If a relation is symmetric and if one node is connected to another, then there
must be a return arc from the second node to the first.
(iii). For anti symmetric relations, no such direct return path should exist.

(iv). If a relation is transitive, the situation is not so simple.

Example:

Let X = {1, 2, 3, 4} and R={(x, y)| x > y}. Draw the graph of R and also give its
matrix.

Solution: R = {(4, 1), (4, 3), (4, 2), (3, 1), (3, 2), (2, 1)}.

The graph of R and the matrix of R are

Partition and Covering of a Set


Let S be a given set and A = {A1, A2, · · · , Am} where each Ai, i = 1, 2, · · · , m is a
subset of S and

Then the set A is called a covering of S, and the sets A1, A2, · · · , Am are said to
cover S. If, in addition, the elements of A, which are subsets of S, are mutually
disjoint, then A is called a partition of S, and the sets A1, A2, · · · , Am are called
the blocks of the partition.
Example:

Let S = {a, b, c} and consider the following collections of subsets of S. A = {{a, b},
{b,c}}, B = {{a}, {a, c}}, C = {{a}, {b, c}}, D = {{a, b, c}}, E = {{a}, {b}, {c}}, and F =
{{a}, {a, b}, {a,c}}. Which of the above sets are covering?

Solution:

The sets A, C, D, E, F are covering of S. But, the set B is not covering of S, since
their union is not S.

Example:

Let S = {a, b, c} and consider the following collections of subsets of S. A = {{a, b},
{b, c}}, B = {{a}, {b, c}}, C = {{a, b, c}}, D = {{a}, {b}, {c}}, and E= {{a}, {a, c}}.

Which of the above sets are covering?

Solution:

The sets B, C and D are partitions of S and also they are covering. Hence, every
partition is a covering.

The set A is a covering, but it is not a partition of a set, since the sets {a, b} and {b,
c} are not disjoint. Hence, every covering need not be a partition.

The set E is not partition, since the union of the subsets is not S. The partition C
has one block and the partition D has three blocks.

Example:

List of all ordered partitions S = {a, b, c, d} of type (1, 2, 2).

Solution:
({a}, {b}, {c, d}), ({b}, {a}, {c, d})

({a}, {c}, {b, d}), ({c}, {a}, {b, d})

({a}, {d}, {b, c}), ({d}, {a}, {b, c})

({b}, {c}, {a, d}), ({c}, {b}, {a, d})

({b}, {d}, {a, c}), ({d}, {b}, {a, c})

({c}, {d}, {a, b}), ({d}, {c}, {a, b}).


Transitive Closure:

Let X be any finite set and R be a relation in X. The relation R+= R∪R2∪R3∪· ··∪Rn
in X is called the transitive closure of R in X.

Example:

Let the relation R = {(1, 2), (2, 3), (3, 3)} on the set {1, 2, 3}. What is the transitive
closure of R?

Solution: Given that R = {(1, 2), (2, 3), (3, 3)}.

The transitive closure of R is R+= R ∪ R2∪ R3∪ · · · = R= {(1, 2), (2, 3), (3, 3)}

R2= R ◦ R = {(1, 2), (2, 3), (3, 3)} ◦ {(1, 2), (2, 3), (3, 3)}

= {(1, 3), (2, 3), (3, 3)}

R3 = R2◦ R = {(1, 3), (2, 3), (3, 3)}

R4 = R3◦ R = {(1, 3), (2, 3), (3, 3)}

R+ = R ∪ R2∪ R3∪ R4 ∪...

= {(1, 2), (2, 3), (3, 3)} ∪ {(1, 3), (2, 3), (3, 3)} ∪ {(1, 3), (2, 3), (3, 3)} ∪ ...

={(1, 2), (1, 3), (2, 3), (3, 3)}.

Therefore R+ = {(1, 2), (1, 3), (2, 3), (3, 3)}.

Example:

Let X = {1, 2, 3, 4} and R = {(1, 2), (2, 3), (3, 4)} be a relation on X. Find R+.

Solution: Given R = {(1, 2), (2, 3), (3, 4)}


R2= {(1, 3), (2, 4)}

R3= {(1, 4)}

R4= {(1, 4)}

R+= {(1, 2), (2, 3), (3, 4), (1, 3), (2, 4), (1, 4)}.

Equivalence Relations:

A relation R in a set X is called an equivalence relation if it is reflexive, symmetric


and transitive.

The following are some examples of equivalence relations:

1. Equality of numbers on a set of real numbers.

2. Equality of subsets of a universal set.

Example:

Let X = {1, 2, 3, 4} and R == {(1, 1), (1, 4), (4, 1), (4, 4), (2, 2), (2, 3), (3, 2), (3, 3)}.

Prove that R is an equivalence relation.


The corresponding graph of R is shown in figure:

Clearly, the relation R is reflexive, symmetric and transitive. Hence, R is an


equivalence relation.

Example:

Let X = {1, 2, 3, ..., 7} and R =(x, y)| x − y is divisible by 3. Show that R is an

equivalence relation.

Solution:

i. For any x ∈ X, x − x = 0 is divisible by 3.

∴ xRx

⇒ R is reflexive.

ii). For any x, y ∈ X, if xRy, then x − y is divisible by 3.

⇒ −(x − y) is divisible by 3.

⇒ y − x is divisible by 3.

⇒ yRx

Thus, the relation R is symmetric.

iii). For any x, y, z ∈ X, let xRy and yRz.

⇒ (x − y) + (y − z) is divisible by 3

⇒ x − z is divisible by 3
⇒ xRz

Hence, the relation R is transitive.

Thus, the relation R is an equivalence relation.

Congruence Relation:

Let I denote the set of all positive integers, and let m be a positive integer.
For x ∈ I and y ∈ I, define R as R = {(x, y)| x − y is divisible by m } The statement ‖x
− y is divisible by m‖ is equivalent to the statement that both x and y have the
same remainder when each is divided by m.

In this case, denote R by ≡ and to write xRy as x ≡ y (mod m), which is read as ‖x
equals to y modulo m‖. The relation ≡ is called a congruence relation.

Example:

83 ≡ 13(mod 5),

since 83-13=70 is divisible by 5.

Example:

Prove that the relation congruence modulo m‖ over the set of positive integers is
an equivalence relation.

Solution: Let N be the set of all positive integers and m be a positive integer. We
define the relation ‖congruence modulo m‖ on N as follows:

Let x, y ∈ N. x ≡ y (mod m) if and only if x − y is divisible by m.

Let x, y, z ∈ N. Then
i). x − x = 0.m

⇒ x ≡ x (mod m) for all x ∈ N

ii). Let x ≡ y (mod m).

Then, x − y is divisible by m.

⇒ −(x − y) = y − x is divisible by m.

i.e., y ≡ x (mod m)

∴ The relation ≡ is symmetric.

⇒ x − y and y − z are divisible by m. Now (x − y) + (y − z) is divisible by m.

i.e., x − z is divisible by m.

⇒ x ≡ z (mod m)

∴ The relation ≡ is transitive.

Since the relation ≡ is reflexive, symmetric and transitive, the relation


congruence modulo m is an equivalence relation.

Example:

Let R denote a relation on the set of ordered pairs of positive integers such that
(x,y)R(u,v) iff xv = yu. Show that R is an equivalence relation.

Solution: Let R denote a relation on the set of ordered pairs of positive integers.

Let x, y, u and v be positive integers. Given (x, y)R(u, v) if and only if xv = yu.

i). Since xy = yx is true for all positive integers


⇒ (x, y)R(x, y), for all ordered pairs (x, y) of positive integers.

∴ The relation R is reflexive.

(ii). Let (x, y)R(u, v)

⇒ xv = yu ⇒ yu= xv ⇒ uy = vx

⇒ (u, v)R(x, y)

∴ The relation R is symmetric.

iii). Let x, y, u, v, m and n be positive integers

Let (x, y)R(u, v) and (u, v)R(m, n)

⇒ xv = yu and un = vm

⇒ xvun = yuvm

⇒ xn = ym, by canceling uv

⇒ (x, y)R(m, n)

∴ The relation R is transitive.

Since R is reflexive, symmetric and transitive, hence the relation R is an

equivalence relation.
Compatibility Relations:

Definition: A relation R in X is said to be a compatibility relation if it is reflexive


and symmetric. Clearly, all equivalence relations are compatibility relations. A
compatibility relation is sometimes denoted by ≈.

Example:

Let X = {ball, bed, dog, let, egg}, and let the relation R be given by

R = {(x, y)| x, y ∈ X ∧ xRy if x and y contain some common letter}.

Then R is a compatibility relation, and x, y are called compatible if xRy.

Note: ball≈ bed, bed≈ egg. But ball /≈ egg. Thus ≈ is not transitive.

Denoting ‖ball‖ by x1, ‖bed‖ by x2, ‖dog‖ by x3, ‖let‖ by x4, and ‖egg‖ by x5, the
graph of ≈ is given as follows:

Maximal Compatibility Block:

Let X be a set and ≈ a compatibility relation on X. A subset A ⊆ X is called a


maximal compatibility block if any element of A is compatible to every other
element of A and no element of X − A is compatible to all the elements of A.
Example: The subsets {x1, x2, x4}, {x2, x3, x5}, {x2, x4, x5}, {x1, x4, x5} are maximal
compatibility blocks.

Example: The subsets {x1, x2, x4}, {x2, x3, x5}, {x2, x4, x5}, {x1, x4, x5} are maximal
compatibility blocks.
Example: Let the compatibility relation on a set {x1, x2, ..., x6} be given by the
matrix:
x2 1
x3 1 1
x4 0 0 1
x5 0 0 1 1
x6 1 0 1 0 1
x1 x2 x3 x4 x5
Draw the graph and find the maximal compatibility blocks of the relation.
Solution:
The maximal compatibility blocks are {x1, x2, x3},{x1, x3, x6},{x3, x5, x6},{x3, x4,
x5}.
Composition of Binary Relations:
Let R be a relation from X to Y and S be a relation from Y to Z. Then a
relation written as R ◦ S is called a composite relation of R and S where R◦S = {(x,
z)| x ∈ X, z ∈ Z, and there exists y ∈ Y with (x, y) ∈ R and (y, z) ∈ S }.
Theorem: If R is relation from A to B, S is a relation from B to C and T is a relation
from C to D then T◦ (S ◦ R) = (T ◦ S) ◦ R
Example:
Let R = {(1, 2), (3, 4), (2, 2)} and S = {(4, 2), (2, 5), (3, 1), (1, 3)}.
Find R ◦ S, S ◦ R, R ◦ (S ◦ R), (R ◦ S) ◦ R, R ◦ R, S ◦ S, and (R ◦ R) ◦ R.
Solution: Given R = {(1, 2), (3, 4), (2, 2)} and S = {(4, 2), (2, 5), (3, 1), (1, 3)}.
R ◦ S = {(1, 5), (3, 2), (2, 5)}
S ◦ R = {(4, 2), (3, 2), (1, 4)} ≠ R ◦ S
(R ◦ S) ◦ R = {(3, 2)}
R ◦ (S ◦ R) = {(3, 2)} = (R ◦ S) ◦ R
R ◦ R = {(1, 2), (2, 2)}
R ◦ R ◦ S = {(4, 5), (3, 3), (1, 1)}
Example:
Let A = {a, b, c}, and R and S be relations on A whose matrices are as given below:

Find the composite relations R ◦ S, S ◦ R, R ◦ R, S ◦ S and their matrices.


Solution:

R = {(a, a), (a, c), (b, a), (b, b), (b, c), (c, b)}

S= {(a, a), (b, b), (b, c), (c, a), (c, c)}. From these, we find that

R ◦ S = {(a, a), (a, c), b, a), (b, b), (b, c), (c, b), (c, c)}

S ◦ R = {(a, a), (a, c), (b, b), (b, a), (b, c), (c, a), (c, b), (c, c)}

R ◦ R = R2 = {(a, a), (a, c), (a, b), (b, a), (b, c), (b, b), (c, a), (c, b), (c, c)} S ◦ S = S2

= {(a, a), (b, b), (b, c), (b, a), (c, a), (c, c)}.

The matrices of the above composite relations are as given below:

Partial Ordering:

A binary relation R in a set P is called a partial order relation or a partial ordering


in P iff R is reflexive, antisymmetric, and transitive. i.e.,

 aRa for all a ∈ P


 aRb and bRa ⇒ a = b
 aRb and bRc ⇒ aRc

A set P together with a partial ordering R is called a partial ordered set or poset.
The relation R is often denoted by the symbol ≤ which is different from the usual
less than equal to symbol. Thus, if ≤ is a partial order in P , then the ordered pair
(P, ≤) is called a poset.

Example: Show that the relation ‖greater than or equal to‖ is a partial ordering on
the set of integers.

Solution: Let Z be the set of all integers and the relation R =’≥ ’

(i). Since a ≥ a for every integer a, the relation ’≥ ’ is reflexive.

(ii). Let a and b be any two integers.

Let aRb and bRa ⇒ a ≥ b and b ≥ a

⇒a=b

∴ The relation ‘≥ ’ is anti symmetric.

(iii). Let a, b and c be any three integers.

Let aRb and bRc ⇒ a ≥ b and b ≥ c

⇒a≥c

∴ The relation ‘≥ ’ is transitive. Since the relation’≥ ’ is


reflexive, anti symmetric and transitive, ’≥ ’ is partial ordering on the set of

integers. Therefore, (Z, ≥) is a poset.

Example:

Show that the inclusion ⊆ is a partial ordering on the set power set of a set S.

Solution: Since (i). A ⊆ A for all A ⊆ S, ⊆ is reflexive.


(ii). A ⊆ B and B ⊆ A ⇒ A = B, ⊆ is anti symmetric.

(iii). A ⊆ B and B ⊆ C ⇒ A ⊆ C, ⊆ is transitive.

Thus, the relation ⊆ is a partial ordering on the power set of S.

Example: Show that the divisibility relation’/ ’

is a partial ordering on the set of positive integers.

Solution: Let Z+ be the set of positive integers. Since

(i). a/a for all a ∈ Z+, / is reflexive.

(ii). a/b and b/a ⇒ a = b, / is anti symmetric.

(iii). a/b and b/c ⇒ a/c, / is transitive.

It follows that / is a partial ordering on Z+ and (Z+, /) is a poset.

Note: On the set of all integers, the above relation is not a partial order as a and
−a both divide each other, but a = −a. i.e., the relation is not anti symmetric.
Definition: Let (P, ≤) be a partially ordered set. If for every x, y ∈ P we have either
x ≤ y ∨ y ≤ x, then ≤ is called a simple ordering or linear ordering on P , and (P, ≤)
is called a totally ordered or simply ordered set or a chain. Note: It is not
necessary to have x ≤ y or y ≤ x for every x and y in a poset P . In fact, x may not be
related to y, in which case we say that x and y are incomparable.

Examples:

(i). The poset (Z, ≤) is a totally ordered.

Since a ≤ b or b ≤ a whenever a and b are integers.


(ii). The divisibility relation / is a partial ordering on the set of positive integers.

Therefore (Z+, /) is a poset and it is not a totally ordered, since it contain elements
that are incomparable, such as 5 and 7, 3 and 5.

Definition: In a poset (P, ≤), an element y ∈ P is said to cover an element x ∈ P if


x < y and if there does not exist any element z ∈ P such that x ≤ z and z ≤ y; that
is, y covers x ⇔ (x < y ∧ (x ≤ z ≤ y ⇒ x = z ∨ z = y)).
Hasse Diagrams:

A partial order ≤ on a set P can be represented by means of a diagram known as


Hasse diagram of (P, ≤). In such a diagram,

(i). Each element is represented by a small circle or dot.

(ii). The circle for x ∈ P is drawn below the circle for y ∈ P if x < y, and a line is
drawn between x and y if y covers x.

(iii). If x < y but y does not cover x, then x and y are not connected directly by a
single line.

Note: For totally ordered set (P, ≤), the Hasse diagram consists of circles one
below the other. The poset is called a chain.

Example: Let P = {1, 2, 3, 4, 5} and ≤ be the relation ‖less than or equal to‖ then
the Hasse diagram is:

It is a totally ordered set.

Example: Let X = {2, 3, 6, 12, 24, 36}, and the relation ≤ be such that x ≤ y if x
divides y. Draw the Hasse diagram of (X, ≤). Solution: The Hasse diagram is is
shown below:
It is not a total order set.

Example: Draw the Hasse diagram for the relation R on A = {1, 2, 3, 4, 5} whose
relation matrix given below:

Solution: R= {(1, 1), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 4), (3,
5), (4, 4), (5.5)}. Hasse diagram for MR is

Example: A partial order R on the set A = {1, 2, 3, 4} is represented by the


following digraph. Draw the Hasse diagram for R.
Solution: By examining the given digraph , we find that

R= {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.

We check that R is reflexive, transitive and anti symmetric. Therefore, R is partial


order relation on A. The hasse diagram of R is shown below:

Example: Draw the Hasse diagram for the partial ordering ⊆ on the power set P
(S) where S = {a,b, c}.

Solution: S = {a, b, c}.

P (S) = {ϕ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.

Hasse diagram for the partial ordered set is shown in fig:


Minimal and Maximal elements (members):

Let (P, ≤) denote a partially or-dered set. An element y ∈ P is called a


minimal member of P relative to ≤ if for no x ∈ P , is x < y. Similarly an element y
∈ P is called a maximal member of P relative to the partial ordering ≤ if for no x ∈
P , is y < x.

Note:

(i). The minimal and maximal members of a partially ordered set need not unique.

(ii). Maximal and minimal elements are easily calculated from the Hasse diagram.
They are the 'top' and 'bottom' elements in the diagram.

Example:

In the Hasse diagram, there are two maximal elements and two minimal
elements. The elements 3, 5 are maximal and the elements 1 and 6 are minimal.

Example: Find the great lower bound and the least upper bound of {b, d, g}, if
they exist in the poset shown in fig:
Solution: The upper bounds of {b, d, g} are g and h. Since g < h, g is the least upper
bound. The lower bounds of {b, d, g} are a and b. Since a < b, b is the greatest
lower bound.

Example: Let A = {a, b, c, d, e, f, g, h} denote a partially ordered set whose Hasse


diagram is shown in Fig:

If B = {c, d, e} then f, g, h are upper bounds of B. The element f is least upper


bound.
The principle of Inclusion and Exclusion:

Let S be a set with |S| = N. Let c1, c2, . . . , ct be a collection of conditional


properties each of which may be satisfied by some of the elements of S.

Let N(ci), i = 1, . . . , t is equal to the number of elements of S that satisfy c i.

Let N(cicj), ij = 1, . . . , t is equal to the number of elements of S that satisfy c i and cj

Let N(cicjck), ijk = 1, . . . , t is equal to the number of elements of S that satisfy

ci, cj , and ck.

Let N(¯ci), i = 1, . . . , t = N − N(ci) is equal to the number of elements of S that do


not satisfy ci.

Let N(¯ci¯cj), i = 1, . . . , t = N − N(cicj) is equal to the number of elements of S that


do not satisfy ci and do not satisfy cj .

Theorem:

N = N(¯c1¯c2 . . . ¯ct) = N − (N(ci) + N(c2) + · · · + N(ct)) + (N(c1c2) + N(c1c3) + · · · +


N(ct−1ct)) −(N(c1c2c3) + N(c1c2c4) + · · · ) + · · · + (−1)tN(c1c2 · · · ct)

Let S0 = N

Let S1 = N(c1) + N(c2) + · · · + N(ct)

Let S2 = N(c1c2) + N(c1c3) + · · · + N(ct−1ct)

Let S3 = N(c1c2c3) + N(c1c2c4) + · · ·

Then,
N = S0 − S1 + S − 2 − S3 + · · · + (−1)tSt

Proof:

If x satisfies none of the conditions then x is counted once in N and once in N

and not in any other term of S. Hence, it contributes 1 to both sides.

If x satisfies exactly r of the conditions (r < t) then x does not contribute to

N, in the RHS x is counted.

1. one time in N

2. r times in PN(ci)

3. (r2) times in PN(cicj)

4. (r3) times in PN(cicjck)

...

(rr) times in PN(c1c2 . . . cr)) in the RHS we have

Example:

Determine the number of positive integers n < 100 and n is not divisible by 2, 3, or
5.

Solution:

S = {1, 2, . . . , 100}, N = 100


c1 = the property that n is divisible by 2.

c2 = the property that n is divisible by 3.

c3 = the property that n is divisible by 5.

The answer is N(¯c1¯c2¯c3)

N(c1) = [100/2] = 50, N(c2) = [100/3] = 33, N(c3) = [100/5] = 20

N(c1c2) = [100/6] = 16, N(c1c3) = [100/10] = 10, N(c2c3) = [100/15] = 6

N(c1c2c3) = [100/30] = 3

the answer is N(¯c1¯c2¯c3) = 100 − (50 + 33 + 20) + (16 + 10 + 6) − 3= 26

The numbers are:

1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83,
89, 91, 97

Euler Totient Function:


For a fixed n ∈ N, the Euler's totient function is defined as φ(n) = |{k ∈ N : k <= n;
gcd(k; n) = 1}| Thus, φ (n) is the number of natural numbers less than or equal to
n and relatively prime to n: For instance, φ (1) = 1; φ (2) = 1; φ (3) = 2; φ (4) = 3; φ
(12) = 4; etc.
Theorem: Let p1,…., pk be the distinct prime divisors of n: Then
Derangement:
A derangement of objects in a finite set S is a permutation/arrangement σ
on S such that for each x, σ (x) != x. The number of derangements of (1, 2,….., n)
is denoted by Dn with the convention that D0 = 1:
For example, 2, 1, 4, 3 is a derangement of 1, 2, 3, 4, but 2, 3, 1, 4 is not a
derangement of 1, 2, 3, 4. If a sequence (x n) converges to some limit l we say that
xn is approximately l for large values of n and write xn ≈ l
Theorem:
Example:
How many square-free integers do not exceed n for a given n ∈ N?
Solution:
Let p = {p1, .., ps} be the set of primes not exceeding √ n and for 1<=i<=s, Ai be the
set of integers between one and n that are multiples of p2i then

So, the number of square-free integers not greater than n is

For n = 100, we have P = {2, 3, 5, 7}. So, the number of square-free integers not
exceeding 100 is
Pigeonhole Principle:
The Pigeonhole Principle is an obvious but powerful tool in solving many
combinatorial problems. We will prove its mathematical form first.
Theorem:
Let A be a finite set and let f : A → {1, 2, …., n} be a function. Let p1,…..,pn ∈
N: If |A| > p1 + ….. + pn; then there exists I ∈ {1, 2, …. ,n} such that |f-1(i)| > pi
Proof:
On the contrary, suppose that for each i ∈ {1, 2, ….. n}, |f -1(i)| > pi As A is a
n
-1
disjoint union of the sets f (i) we have |A| = ∑ ¿¿ , a contradiction.
i=n

The elements of A are thought of as pigeons and the elements of B as pigeon


holes; so that the principle is commonly formulated in the following forms,
which come in handy in particular problems.
Principle1:
If n + 1 pigeons stay in n holes then there is a hole with at least two pigeons.
Principle1:
If kn + 1 pigeons stay in n holes then there is a hole with at least k + 1 pigeons.
Principle3:
If p1 + …..+ pn + 1 pigeons stay in n holes then there exists I, 1 ≤ i ≤ n such that
the i-th hole contains at least pi + 1 pigeons.
Example :
Consider a tournament of n > 1 players, where each pair plays exactly once and
each player wins at least once. Then, there are two players with the same
number of wins.
solution: Number of wins varies from 1 to n - 1 and there are n players.
Example: In a group of 6 people, prove that there are three mutual friends or
three mutual strangers.

43
solution: Let a be a person in the group. Let F be the set of friends of a and S
the set of strangers to a. Clearly |S| + |F| = 5. By PHP either |F| ≥3 or |S|≥3.
Case 1: |F|≥3. If any two in F are friends then those two along with a are three
mutual friends. Else F is a set of mutual strangers of size at least 3.
Case 2: |S|≥3. If any pair in S are strangers then those two along with a are
three mutual strangers. Else S becomes a set of mutual friends of size at least3.
Example:
Given any n integers, n _ 1012 integers, prove that there is a pair that either
diviser by, or sum to, a multiple of 2021. Is this true if we replace 1012 by
1011?
Solution: Consider some 1012 integers out of the given ones, say, n1, n2,…,
n1012: Write S = {n1 - nk; n1 + nk : k = 2, . . . , 1012}. Then, |S| = 2022 and hence,
at least two of them will have the same remainder when divided by 2021.
Then, consider their difference.
Example:
Each point of the plane is colored red or blue, then prove that there exist two
points of the same color which are at a distance of 1 unit.
Solution:
Take a point, say P. Draw a unit circle with P as the center. If all the points on
the circumference have the same color then we are done. Else, the
circumference contains a point which has the same color as that of P.
Example:
If 7 points are chosen inside or on the unit circle, then there is a pair of points
which are at a distance at most 1.
Solution: Divide the circle into 6 equal sectors by drawing radii so that angle
between two consecutive radius is π /3: By PHP there is a sector containing at
least two points. The distance between these two points is at most 1.

44
Theorem:
Let r1, r2, ….., rmn+1 be a sequence of mn + 1 distinct real numbers. Then, prove
that there is a subsequence of m + 1 numbers which is increasing or there is a
subsequence of n + 1 numbers which is decreasing.
Does the above statement hold for every collection of mn distinct numbers?
Proof:
Define li to be the maximum length of an increasing subsequence starting at r i.
If some li ≥ m + 1 then we have nothing to prove. So, let 1 ≤ li ≤m. Since (li) is a
sequence of mn + 1 integers, by PHP, there is one number which repeats at
least n+1 times. Let li1 = li2 = ….. = lin+1 = s, where i1 < i2 < …. < in+1. Notice that ri1 >
ri2 , because if ri1 < ri2 , then “ ri1 together with the increasing sequence of
length s starting with ri2 “ gives an increasing sequence of length s+1. Similarly,
ri2 > ri3 > ….. > rin+1 and hence the required result holds.
Alternate:
Let S = {r1, r2, ….., rmn+1} and define a map f : S → Z * Z by f(r i) = (s, t), for 1 ≤ i ≤
mn + 1, where s equals the length of the largest increasing subsequence
starting with ri and t equals the length of the largest decreasing subsequence
ending at ri. Now, if either s ≥ m + 1 or t ≥ n + 1, we are done. If not, then note
that 1 ≤ s ≤ m and 1 ≤ t ≤ n. So, the number of tuples (s, t) is at most mn. Thus,
the mn + 1 distinct numbers are being mapped to mn tuples and hence by PHP
there are two numbers ri ≠ rj such that f(ri) = f(rj). Now, proceed as in the
previous case to get the required result.
The above statement is FALSE. Consider the sequence:
n, n – 1, .. 1,2n, 2n – 1,..n + 1, 3n, 3n – 1,.,2n + 1, …., mn, mn – 1,., mn - n + 1:
Theorem:
Corresponding to each irrational number a; there exist infinitely many rational
numbers p/q such that |a – (p/q) | < 1/q2.

45
Proof.
It is enough to show that there are infinitely many (p, q) ∈ Z2 with
|qa – p| < 1/q. As a is irrational, for every m ∈ N, 0 < ia – [ia] < 1, for i = 1,…,m
+ 1. Hence, by PHP there exist I, j with i < j such that
|(j - i)a - ([ja] – [ia])| <1/m ≤1/(j - i):
Then, the pair (p1, q1) = ([ja] – [ia], j - i) satisfies the required property. To

1 p1
generate another pair, and m2 such that m2
< |a - q1
| and proceed as

1 1
before to get (p2, q2) such that |q2a - p2| < m2 ≤ q 2 .

p2 1 p1
Since |a - q 2 | < m2 < | a - q 1 |,

p1 p2
we have q 1 ≠ q 2 . Now use induction to get the required result.

Theorem:
Let ∝ be a positive irrational number. Then prove that S = {m+ n ∝ : m, n ∈ Z} is
dense in R.
Proof: Consider any open interval (a, b). By Archimedean property, there exists

1
n ∈ N such that n < b - a. Observe that 0 < rk = k∝ - [k∝] < 1, k = 1,…., n + 1. By

PHP, some two satisfy 0 < ri - rj < 1=n. Then x = ri - rj = (i - j) ∝ +([j∝] – [i∝])∈ S.
Let p be the smallest integer so that px > a. If px ≥ b, then (a, b) ⊆(p - 1)x, px)
1
and so b - a ≤x < n , which is not possible. So, px ∈ (a, b) and px ∈ S as well.

Thus, (a,b) ∩ S ≠ ∅ .

46

You might also like