You are on page 1of 38

What are the elements of a set or members of a set?

The objects used to form a set are called its element or its members. Generally, the
elements of a set are written inside a pair of curly (idle) braces and are represented by
commas. The name of the set is always written in capital letter.

Exercise 1/ Activity 1

Solve Examples to find the elements or members of a set:

1. A = {v, w, x, y, z}

Here ‘A’ is the name of the set whose elements (members) are v, w, x, y, z.

2. If a set A = {3, 6, 9, 10, 13, 18}. State whether the following statements are ‘true’ or
‘false’:

(i) 7 ∈ A

(ii) 12 ∉ A

(iii) 13 ∈ A

(iv) 9, 12 ∈ A

(v) 12, 14, 15 ∈ A

Solution:

(i) False, since the element 7 does not belongs to the given set A.

(ii) False, since the element 10 belongs to the given set A.

(iii) True, since the element 13 belongs to the given set A.

(iv) True, since the elements 9 and 12 both belong to the given set A.

(v) False, since the element 14 does not belongs to the given set A.

What are the two basic properties of sets?

1. The change in order of writing the elements does not make any changes in the
set.
In other words the order in which the elements of a set are written is not
important. Thus, the set {a, b, c} can also be written as {a, c, b} or {b, c, a} or {b, a,
c} or {c, a, b} or {c, b, a}.

2. If one or many elements of a set are repeated, the set remains the same.

In other words the elements of a set should be distinct. So, if any element of a set
is repeated number of times in the set, we consider it as a single element. Thus,
{1, 1, 2, 2, 3, 3, 4, 4, 4} = {1, 2, 3, 4} The set of letters in the word ‘GOOGLE’ = {G,
O, L, E}

Exercise 2/ Activity 2

Solved examples using the properties of sets:

1. Write the set of vowels used in the word ‘UNIVERSITY’.

Solution:

Set V = {U, I, E}

4.2 Basic Operations on Sets

When two or more sets combine together to form one set under the given conditions,
then operations on sets are carried out.

Union of Sets: Union of two given sets is the smallest set which contains all the
elements of both the sets. To find the union of two given sets A and B is a set which
consists of all the elements of A and all the elements of B such that no element is
repeated. The symbol for denoting union of sets is ‘∪’.

Exercise 3/ Activity 3

Solved examples to find union of two given sets:

1. If A = {1, 3, 7, 5} and B = {3, 7, 8, 9}. Find union of two set A and B.

Solution:

A ∪ B = {1, 3, 5, 7, 8, 9}
No element is repeated in the union of two sets. The common elements 3, 7 are
taken only once.

2. Let X = {a, e, i, o, u} and Y = {ф}. Find union of two given sets X and Y.

Solution: X ∪ Y = {a, e, i, o, u}

Therefore, union of any set with an empty set is the set itself.

Notes: A and B are the subsets of A ∪ B the union of sets is commutative, i.e., A ∪ B =
B ∪ A. The operations are performed when the sets are expressed in roster form.

Intersection of Sets: Intersection of two given sets is the largest set which contains all
the elements that are common to both the sets. To find the intersection of two given
sets A and B is a set which consists of all the elements which are common to both A
and B. The symbol for denoting intersection of sets is ‘∩’

Exercise 4/ Activity 4

Solved examples to find intersection of two given sets:

1. If A = {2, 4, 6, 8, 10} and B = {1, 3, 8, 4, 6}. Find intersection of two set A and B.

Solution: A ∩ B = {4, 6, 8}

Therefore, 4, 6 and 8 are the common elements in both the sets.

2. If X = {a, b, c} and Y = {ф}. Find intersection of two given sets X and Y.

Solution: X ∩ Y = { }

Notes: A ∩ B is a subset of A and B. Intersection of a set is commutative, i.e., A ∩ B =


B ∩ A. Operations are performed when the set is expressed in the roster form.

Complement of the Set: In complement of a set if ξ be the universal set and A a


subset of ξ, then the complement of A is the set of all elements of ξ which are not the
elements of A. Symbolically, we denote the complement of A with respect to ξ as A’

Exercise 5/ Activity 5

Solved examples to find Complement of a given sets:

A. If ξ = {1, 2, 3, 4, 5, 6, 7}

A = {1, 3, 7} find A'.


Solution: We observe that 2, 4, 5, 6 are the only elements of ξ which do not belong to
A. Therefore, A' = {2, 4, 5, 6}

Note: The complement of a universal set is an empty set.

The complement of an empty set is a universal set.

The set and its complement are disjoint sets.

B.1. Let the set of natural numbers be the universal set and A is a set of even natural
numbers, Then A' {x: x is a set of odd natural numbers}

B.2. Let ξ = the set of letters in the English alphabet. A = the set of consonants in the
English alphabet. Then A' = the set of vowels in the English alphabet.

B.3. Show that;

(a) The complement of a universal set is an empty set.

Let ξ denote the universal set, then

ξ' = The set of those elements which are not in

ξ.= empty set = ϕ

Therefore, ξ = ϕ so the complement of a universal set is an empty set.

(b) A set and its complement are disjoint sets.

Let A be any set then A' = set of those elements of ξ which are not in A'.

Let x ∉ A, then x is an element of ξ not contained in A' So x ∉ A'

Therefore, A and A' are disjoint sets.

Therefore, Set and its complement are disjoint sets, similarly, in a complement of set
when U be the universal set and A is a subset of U. Then the complement of A is the set
all elements of U which are not the elements of A.

Symbolically, we write A' to denote the complement of A with respect to U. Thus, A' =
{x : x ∈ U and x ∉ A} Obviously A' = {U - A}

C. Let U = {2, 4, 6, 8, 10, 12, 14, 16}


A = {6, 10, 4, 16}

A' = {2, 8, 12, 14}

We observe that 2, 8, 12, 14 are the only elements of U which do not belong to A.

Cartesian product of sets: If A and B are two non-empty sets, then their Cartesian
product A × B is the set of all ordered pair of elements from A and B. A × B = {(x, y) : x ∈
A, y ∈ B} Suppose, if A and B are two non-empty sets, then the Cartesian product of two
sets, A and set B is the set of all ordered pairs (a, b) such that a ∈A and b∈B which is
denoted as A × B.

Exercise 6/ Activity 6

Solved examples to find the Cartesian product of a given sets:

1. If A = {7, 8} and B = {2, 4, 6}, find A × B.

Solution: A × B = {(7, 2); (7, 4); (7, 6); (8, 2); (8, 4); (8, 6)}

The 6 ordered pairs thus formed can represent the position of points in a plane, if
a and B are subsets of a set of real numbers.

2. If A × B = {(p, x); (p, y); (q, x); (q, y)}, find A and B.

Solution: A is a set of all first entries in ordered pairs in A × B.

B is a set of all second entries in ordered pairs in A × B.

Thus A = {p, q} and B = {x, y}

3. If A and B are two sets, and A × B consists of 6 elements: If three elements of A


× B are (2, 5) (3, 7) (4, 7) find A × B.

Solution: Since, (2, 5) (3, 7) and (4, 7) are elements of A × B.

So, we can say that 2, 3, 4 are the elements of A and 5, 7 are the elements of B.

So, A = {2, 3, 4} and B = {5, 7}

Now, A × B = {(2, 5); (2, 7); (3, 5); (3, 7); (4, 5); (4, 7)}

Thus, A × B contain six ordered pairs.

Note: If either A or B are null sets, then A ×B will also be an empty set, i.e., if A = ∅
or B = ∅, then A × B = ∅
4.3 Venn Diagram What are Venn Diagrams?

Pictorial representations of sets represented by closed figures are called set diagrams
or Venn diagrams. Venn diagrams are used to illustrate various operations like union,
intersection and difference. We can express the relationship among sets through this in
a more significant way.

In this, A rectangle is used to represent a universal set and Circles or ovals are used to
represent other subsets of the universal set.

Exercise 7/ Activity 7

A survey of 64 informed voters revealed the following information:

45 believe that Elvis is still alive


49 believe that they have been abducted by space aliens

42 believe both of these things

1. How many believe neither of these things?

2. How many believe Elvis is still alive but don't believe that they have been abducted
by space aliens?

Solution: When we first read the data in this example, it may seem as if the numbers
contradict one Discrete Mathematics Set Theory Page 6 of 6 another. For instance, we
were told that 64 people were surveyed, yet there are 45 who believe that Elvis is alive
and 49 who believe that they've been kidnapped by space aliens. Obviously, 45 + 49 is
much greater than 64, so it appears that the number of people who responded to the
survey is greater than the number of people who were surveyed. This apparent
contradiction is resolved, however, when we take into account the fact that there are
some people who fall into both categories ("42 believe both of those things").
Now that we have organized the given information so that there is one number in each
of the four regions of the Venn diagram, we can use the diagram to answer the
questions.

1. How many believe neither of these things? If a person believes neither of these
things, then the person isn't in set E and isn't in set A. The diagram shows us that 12
people satisfy this description.

2. How many believe Elvis is still alive but don't believe that they have been abducted
by space aliens? A person who fits this description is simultaneously inside of circle E
yet outside of circle A. The diagram shows us that there are 3 of these people.

4.1. Relations on Set

What is Relation on Set?


Let X be a set. A (binary) Relation on X is a subset R⊆X×X where X×X is defined
to be the The Cartesian Product of Set X with itself. If (x,y)∈R we write xRy which
means "x relates y" and if (x,y)∉R we write xR y which means "x does not relate y".

In general if X and Y are sets then a binary relation between X and Y is a subset
R⊆X×Y. We will mostly be looking deeply into relations where X=Y, i.e., relations on
various sets to themselves. Consider the set A of positive integers from 1 to 10
inclusive: Example 1:

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

The strict inequality < is a relation R on X×X where the pairs (x,y)∈R⊆X×X are such that
the numerical value of x is strictly less than the numerical value of y, that is x

Consider a set X of all subsets of E={x,y,z}. Then the containment ⊆ is a relation R on


X×X where the pairs (A,B)∈R⊆X×X are such that A is a subset of B, that is A⊂B.

If X={1,2,3,4} and Y={6,8,10} then define the relation R from X to Y such that elements
X when squared are less than elements in Y. We thus have that:

Example 2:

R={(1,6),(1,8),(1,10),(2,6),(2,8),(2,10),(3,10)}

For a final example, if X={1,3,4,6,7} and Y={1,2,3,5} then define the relation R from X to
Y such that the sum of an element in X plus an element in Y is odd. This relation can
also be described such that xRy if x is even and y is odd or x is odd and y is even. So:
Example 3:

R={(1,2),(3,2),(4,1),(4,3),(4,5),(6,1),(6,3),(6,5),(7,1),(7,3),(7,5)}

4.2 Categories of Relations on Sets

Reflexive relation on set is a binary element in which every element is related to itself.

Let A be a set and R be the relation defined in it.

R is set to be reflexive, if (a, a) ∈ R for all a ∈ A that is, every element of A is R-related
to itself, in other words aRa for every a ∈ A.

A relation R in a set A is not reflexive if there be at least one element a ∈ A such that (a,
a) ∉ R.

Consider, for example, a set A = {p, q, r, s}.

The relation R11 = {(p, p), (p, r), (q, q), (r, r), (r, s), (s, s)} in A is reflexive, since every
element in A is R1- related to itself.

But the relation R2 = {(p, p), (p, r), (q, r), (q, s), (r, s)} is not reflexive in A since q, r, s ∈
A but (q, q) ∉ R2, (r, r) ∉ R2 and (s, s) ∉ R2

Solved example of reflexive relation on set:

1. A relation R is defined on the set Z (set of all integers) by “aRb if and only if 2a + 3b is
divisible by 5”, for all a, b ∈ Z. Examine if R is a reflexive relation on Z.
Solution: Let a ∈ Z. Now 2a + 3a = 5a, which is divisible by 5. Therefore aRa holds for
all a in Z i.e. R is reflexive.

2. A relation R is defined on the set Z by “aRb if a – b is divisible by 5” for a, b ∈ Z.


Examine if R is a reflexive relation on Z.

Solution: Let a ∈ Z. Then a – a is divisible by 5. Therefore aRa holds for all a in Z i.e. R
is reflexive.

3. Consider the set Z in which a relation R is defined by „aRb if and only if a + 3b is


divisible by 4, for a, b ∈ Z. Show that R is a reflexive relation on on setZ.

Solution: Let a ∈ Z. Now a + 3a = 4a, which is divisible by

4. Therefore aRa holds for all a in Z i.e. R is reflexive. 4. A relation ρ is defined on the
set of all real numbers R by „xρy‟ if and only if |x – y| ≤ y, for x, y ∈ R. Show that the ρ is
not reflexive relation. Solution: The relation ρ is not reflexive as x = -2 ∈ R but |x – x| = 0
which is not less than -2(= x).

Symmetric relation on set

Let A be a set in which the relation R defined. Then R is said to be a symmetric relation,
if (a, b) ∈ R ⇒ (b, a) ∈ R, that is, aRb ⇒ bRa for all (a, b) ∈ R.

Consider, for example, the set A of natural numbers. If a relation A be defined by “x + y


= 5”, then this relation is symmetric in A, for a + b = 5 ⇒ b + a = 5

But in the set A of natural numbers if the relation R be defined as „x is a divisor of y‟,
then the relation R is not symmetric as 3R9 does not imply 9R3; for, 3 divides 9 but 9
does not divide 3.

For a symmetric relation R, R−1−1 = R.

Solved example on symmetric relation on set:

1. A relation R is defined on the set Z by “a R b if a – b is divisible by 5” for a, b ∈ Z.


Examine if R is a symmetric relation on Z.

Solution: Let a, b ∈ Z and aRb hold. Then a – b is divisible by 5 and therefore b – a is


divisible by 5. Thus, aRb ⇒ bRa and therefore R is symmetric.

2. A relation R is defined on the set Z (set of all integers) by “aRb if and only if 2a + 3b is
divisible by 5”, for all a, b ∈ Z. Examine if R is a symmetric relation on Z.
Solution: Let a, b ∈ Z and aRb holds i.e., 2a + 3a = 5a, which is divisible by 5. Now, 2a
+ 3a = 5a – 2a + 5b – 3b = 5(a + b) – (2a + 3b) is also divisible by 5.

Therefore aRa holds for all a in Z i.e. R is reflexive

3. Let R be a relation on Q, defined by R = {(a, b) : a, b ∈ Q and a – b ∈ Z}. Show that R


is Symmetric relation.

Solution: Given R = {(a, b) : a, b ∈ Q, and a – b ∈ Z}.

Let ab ∈ R ⇒ (a – b) ∈ Z, i.e. (a – b) is an integer.

⇒ -(a – b) is an integer

⇒ (b – a) is an integer

⇒ (b, a) ∈ R

Thus, (a, b) ∈ R ⇒ (b, a) ∈ R

Therefore, R is symmetric.

4. Let m be given fixed positive integer.

Let R = {(a, a) : a, b ∈ Z and (a – b) is divisible by m}.

Show that R is symmetric relation.

Solution: Given R = {(a, b) : a, b ∈ Z, and (a – b) is divisible by m}.

Let ab ∈ R . Then,

ab ∈ R ⇒ (a – b) is divisible by m

⇒ -(a – b) is divisible by m

⇒ (b – a) is divisible by m

⇒ (b, a) ∈ R

Thus, (a, b) ∈ R ⇒ (b, a) ∈ R

Therefore, R is symmetric relation on set Z.


Anti-symmetric relation on set

Let A be a set in which the relation R defined.

R is said to be anti-symmetric, if there exist elements, if aRb and bRa ⇒ a = b that is, (a,
b) ∈ R and ((b, a) ∈ R ⇒ a = b.

A relation R in A is not anti-symmetric, if there exist elements a, b ∈ A, a ≠ b such that


aRb and bRa.

For example, the relation defined by „x is less than or equal to‟ in the set of real
numbers is be antisymmetric, as a ≤ b and b ≤ a imply a = b, where a, b are elements of
the set.

Transitive relation on set

Let A be a set in which the relation R defined.

R is said to be transitive, if (a, b) ∈ R and (b, a) ∈ R ⇒ (a, c) ∈ R,

That is aRb and bRc ⇒ aRc where a, b, c ∈ A.

The relation is said to be non-transitive, if (a, b) ∈ R and (b, c) ∈ R do not imply (a, c ) ∈
R.

For example, in the set A of natural numbers if the relation R be defined by „x less than
y‟ then a < b and b < c imply a < c, that is, aRb and bRc ⇒ aRc.

Hence this relation is transitive.

Solved example of transitive relation on set:

1. Let k be given fixed positive integer.

Let R = {(a, a) : a, b ∈ Z and (a – b) is divisible by k}.

Show that R is transitive relation.

Solution: Given R = {(a, b) : a, b ∈ Z, and (a – b) is divisible by k}.

Let (a, b) ∈ R and (b, c) ∈ R. Then

(a, b) ∈ R and (b, c) ∈ R

⇒ (a – b) is divisible by k and (b – c) is divisible by k.


⇒ {(a – b) + (b – c)} is divisible by k.

⇒ (a – c) is divisible by k.

⇒ (a, c) ∈ R.

Therefore, (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R. So, R is transitive relation.

2. A relation ρ on the set N is given by “ρ = {(a, b) ∈ N × N : a is divisor of b}”. Examine


whether ρ is transitive or not transitive relation on set N.

Solution: Given ρ = {(a, b) ∈ N × N : a is divisor of b}.

Let m, n, p ∈ N and (m, n) ∈ ρ and (n, p ) ∈ ρ. Then

(m, n) ∈ ρ and (n, p ) ∈ ρ

⇒ m is divisor of n and n is divisor of p

⇒ m is divisor of p

⇒ (m, p) ∈ ρ

Therefore, (m, n) ∈ ρ and (n, p) ∈ ρ ⇒ (m, p) ∈ ρ. So, R is transitive relation.

Equivalence relation on set is a relation which is reflexive, symmetric and transitive. A


relation R, defined in a set A, is said to be an equivalence relation if and only if

(i) R is reflexive, that is, aRa for all a ∈ A.

(ii) R is symmetric, that is, aRb ⇒ bRa for all a, b ∈ A.

(iii) R is transitive, that is aRb and bRc ⇒ aRc for all a, b, c ∈ A.

The relation defined by “x is equal to y” in the set A of real numbers is an equivalence


relation.

Let A be a set of triangles in a plane. The relation R is defined as “x is similar to y, x, y ∈


A”. We see that R is;

(i) Reflexive, for, every triangle is similar to itself.

(ii) Symmetric, for, if x be similar to y, then y is also similar to x.


(iii) Transitive, for, if x be similar to y and y be similar to z, then x is also similar to z.

Hence R is an equivalence relation.

A relation R in a set S is called a partial order relation if it satisfies the following


conditions:

(i) aRa for all a∈ A, [Reflexivity]

(ii) aRb and bRa ⇒ a = b, [Anti-symmetry]

(iii) aRb and bRc ⇒ aRc, [Transitivity]

In the set of natural numbers, the relation R defined by “aRb if a divides b” is a partial
order relation, since here R is reflexive, anti-symmetric and transitive. A set, in which a
partial order relation is defined, is called a partially ordered set or a poset.

Solved example on equivalence relation on set:

1. A relation R is defined on the set Z by “a R b if a – b is divisible by 5” for a, b ∈ Z.


Examine if R is an equivalence relation on Z.

Solution:

(i) Let a ∈ Z. Then a – a is divisible by 5. Therefore aRa holds for all a in Z and R is
reflexive.

(ii) Let a, b ∈ Z and aRb hold. Then a – b is divisible by 5 and therefore b – a is divisible
by 5. Thus, aRb ⇒ bRa and therefore R is symmetric.

(iii) Let a, b, c ∈ Z and aRb, bRc both hold. Then a – b and b – c are both divisible by 5.

Therefore a – c = (a – b) + (b – c) is divisible by 5.

Thus, aRb and bRc ⇒ aRc and therefore R is transitive.

Since R is reflexive, symmetric and transitive so, R is an equivalence relation on Z.

2. Let m e a positive integer. A relation R is defined on the set Z by “aRb if and only if a
– b is divisible by m” for a, b ∈ Z. Show that R is an equivalence relation on set Z.
Solution:

(i) Let a ∈ Z. Then a – a = 0, which is divisible by m


Therefore, aRa holds for all a ∈ Z.

Hence, R is reflexive.

(ii) Let a, b ∈ Z and aRb holds. Then a – b is divisible by m and therefore, b – a is also
divisible by m. Thus, aRb ⇒ bRa.

Hence, R is symmetric.

(iii) Let a, b, c ∈ Z and aRb, bRc both hold. Then a – b is divisible by m and b – c is also
divisible by m.

Therefore, a – c = (a – b) + (b – c) is divisible by m.

Thus, aRb and bRc ⇒ aRc

Therefore, R is transitive.

Since, R is reflexive, symmetric and transitive so, R is an equivalence relation on set Z

3. Let S be the set of all lines in 3 dimensional space. A relation ρ is defined on S by


“lρm if and only if l lies on the plane of m” for l, m ∈ S.

Examine if ρ is (i) reflexive, (ii) symmetric, (iii) transitive

Solution:

(i) Reflexive: Let l ∈ S. Then l is coplanar with itself.

Therefore, lρl holds for all l in S. Hence, ρ is reflexive

(ii) Symmetric: Let l, m ∈ S and lρm holds. Then l lies on the plane of m. Therefore, m
lies on the plane of l. Thus, lρm ⇒ mρl and therefore ρ is symmetric.

(iii) Transitive: Let l, m, p ∈ S and lρm, mρp both hold. Then l lies on the plane of m and
m lies on the plane of p. This does not always implies that l lies on the plane of p.

That is, lρm and mρp do not necessarily imply lρp.

Therefore, ρ is not transitive.

Since, R is reflexive and symmetric but not transitive so, R is not an equivalence
relation on set Z
4.1. What is a Function?

A function relates an input to an output.

It is like a machine that has an input and an output. And the output is related

somehow to the input.

We say "f of x equals x squared" what goes into the function is put inside parentheses ()
after the name of the function:

So f(x) shows us the function is called "f", and "x" goes in and we usually see what a
function does with the input: f(x) = x2 shows us that function "f" takes "x" and squares
it.

Example: with f(x) = x2 : 

An input of 4 becomes an output of 16. 


In fact we can write f(4) = 16.

The "x" is Just a Place-Holder!

Don't get too concerned about "x", it is just there to show us where the input goes and
what happens to it.

It could be anything!

So this function: f(x) = 1 - x + x2

Is the same function as: 

 f(q) = 1 - q + q2 
 h(A) = 1 - A + A2 
 w(θ) = 1 - θ + θ2
The Two Important Things!

1. "...each element..." means that every element in X is related to some element in Y.

We say that the function covers X (relates every element of it).

(But some elements of Y might not be related to at all, which is fine.)


Domain, Codomain and Range
In our examples above 

 the set "X" is called the Domain, 


 the set "Y" is called the Codomain, and 
 the set of elements that get pointed to in Y (the actual values produced by the
function) is called the Range.

Functions have been used in mathematics for a very long time, and lots of different
names and ways of writing functions have come about.

Here are some common terms you should get familiar with:

Example: z = 2u3 : 

 "u" could be called the "independent variable"


 "z" could be called the "dependent variable" (it depends on the value of u)

Example: f(4) = 16: 

 "4" could be called the "argument" 


 "16" could be called the "value of the function"

Example: h(year) = 20 × year: 


 h() is the function 
 "year" could be called the "argument", or the "variable" 
 a fixed value like "20" can be called a parameter

We often call a function "f(x)" when in fact the function is really "f"

Ordered Pairs

And here is another way to think about functions:

Write the input and output of a function as an "ordered pair", such as (4,16). They are
called ordered pairs because the input always comes first, and the output second:

(input, output)
Let's look at that more closely:

A General Function points from each member of "A" to a member of "B". It never has
one "A" pointing to more than one "B", so one-to-many is not OK in a function (so
something like "f(x) = 7 or 9" is not allowed) But more than one "A" can point to the
same "B" (many-to-one is OK)

Injective means we won't have two or more "A"s pointing to the same "B". So many-to-
one is NOT OK (which is OK for a general function). As it is also a function one-to-
many is not OK But we can have a "B" without a matching "A" Injective is also
called "One-to-One"

Surjective means that every "B" has at least one matching "A" (maybe more than
one). There won't be a "B" left out.

Bijective means both Injective and Surjective together.Think of it as a "perfect pairing"


between the sets: everyone has a partner and no one is left out. So there is a
perfect "one-to-one correspondence" between the members of the sets. (But don't
get that confused with the term "One-to-One" used to mean injective).

Bijective functions have an inverse!

If every "A" goes to a unique "B", and every "B" has a matching "A" then we can go
back and forwards without being led astray.
4.1. Cardinality: Cardinal Number of a set

The number of distinct elements or members in a finite set is known as the cardinal
number of a set. Basically, through cardinality, we define the size of a set. The cardinal
number of a set A is denoted as n(A), where A is any set and n(A) is the number of
members in set A.

Consider a set A consisting of the prime numbers less than 10.

Set A ={2, 3, 5, 7}.

As the set A consists of 4 elements, therefore, the cardinal number of set A is given as
n(A) = 4.

Properties related to difference, union and intersection and the cardinal number of set

i) Union of Disjoint Sets:

If A and B are two finite sets and if A ∩ B = ∅, then

n(A ∪ B) = n(A) + n(B)


In simple words if A and B are finite sets and these sets are disjoint then the cardinal
number of Union of sets A and B is equal to the sum of the cardinal number of set A and
set B.

Figure 1- Disjoint sets

The union of the disjoint sets A and B represented by the Venn diagram is given by A ∪
B and it can be seen that A ∩ B = ∅ because no element is common to both the sets.

ii) Union of two sets:

If A and B are two finite sets, then

n(A ∪ B) = n(A) + n(B) – n(A ∩ B)

Simply, the number of elements in the union of set A and B is equal to the sum of
cardinal numbers of the sets A and B, minus that of their intersection.
Figure 2- Union of two sets

In the figure given above the differently shaded regions depict the different disjoint sets
i.e. A – B, B – A and A ∩ B are three disjoint sets as shown and the sum of these
represents A ∪ B. Hence,

n (A ∪ B) = n (A – B) + n(B – A) + n(A ∩ B)

Exercise 1/ Activity 1

Let us see an example to make our point clear.

There is a total of 200 students in class XI. 120 of them study mathematics, 50
students study commerce and 30students study both mathematics and
commerce. Find the number of students who

i) Study mathematics but not commerce

ii) Study commerce but not mathematics

iii) Study mathematics or commerce

Solution: The total number of students represents the cardinal number of the universal
set. Let A denote the set of students studying mathematics and set B represent the
students studying commerce.

Therefore,

n (U) = 200

n(A) = 120
n(B) = 50

n(A ∩ B) = 30

The Venn diagram represents the number of students studying mathematics and
commerce.

i) Here, we are required to find the difference of sets A and B.

n(A) = n(A – B) + n(A ∩ B)

n(A-B) = n(A) – n(A ∩ B)

⇒ n (A – B) = 120 – 30 = 90

The number of students who study mathematics but not commerce is 90.

ii) Similarly here, we are required to find the difference of sets B and A

n (B) = n (B – A) + n (A ∩ B)

⇒ n (B – A) = 50 – 30 = 20

The number of students who study commerce but not mathematics is 20.

iii) The number of students who study mathematics or commerce

n (A ∪ B) = n(A) + n(B) – n(A ∩ B)

⇒ n(A ∪ B) = 120 + 50 – 30 = 140

iii) Union of three sets

If A, B and C are three finite sets, then;

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) – n(A ∩ B) – n(B ∩ C) – n(A ∩ C) + n(A ∩ B ∩ C)

This is clearly visible from the Venn diagram that the union of the three sets will be the
sum of the cardinal number of set A, set B, set C and the common elements of the three
sets excluding the common elements of sets taken in pairs of two.
Exercise 1/ Activity 1
Let us see an example to make our point clear.

In a survey of 200 students of a school it was found that 120 study mathematics,
90 study physics and 70 study chemistry, 40 study mathematics and physics, 30
study physics and chemistry, 50 study chemistry and mathematics and 20 study
none of these subjects. Find the number of students who study all three
subjects.

Solution :

M = Mathematics ; P = Physics and C = Chemistry

n(M) = 120 n(P) = 90 n (C) = 70 n ( M ∩ P) = 40

n ( P ∩ C ) = 30 n ( C ∩ M ) = 50 n ( M ∪ P ∪ C )’ = 20

Now n(M ∪ P ∪ C)’ = n(U) – n(M ∪ P ∪ C)

20 = 200 – n (M ∪ P ∪ C)

Therefore, n(M ∪ P ∪ C) = 200 – 20 = 180

n(M ∪ P ∪ C)

= n(M) + n(P) + n(C) – n(M ∩ P) – n(P ∩ C) – n(C ∩ M) + n(M ∩ P ∩ C)


180 = 120 + 90 + 70 - 40 - 30 - 50 + n(M ∩ P ∩ C)

⇒ n(M ∩ P ∩ C) =180 - 120 - 90 - 70 + 40 + 30 + 50

⇒ n(M ∩ P ∩ C) = 20

4.1. Propositions

  We know what sentences are (I hope):

1. John is going to the store.


2. That guy is going to the store.
3. John, go to the store.
4. Did John go to the store? 

 Declarative sentences are propositions.


o i.e. Sentences that assert a fact that could either be true or false.
o i.e. Something you could make into a question with “对不对?”.
o Of the above, only (1) is a proposition as it is: we need all the details.
o (2) would be a proposition if we knew who “that guy” is. 
 Not all sentences are propositions
o Above, (3) is a command: it's not true or false.
o (4) is a question, so definitely not a statement. 
 Of course, this has something to do with mathematics.
o There are statements in math like “10−4=6” and “1+1=3”.
o One of those is true and one is false, but they are both propositions. (If
you don't know which is which, you're in trouble.) 
 Of course math has variables.
o In our propositions, they will be like “that guy” in the above examples.
o … if we know their value, we can decide if the proposition is true or false.
o e.g. x+7=3x+y=0
o In those examples, x and y probably stand for numbers. 
 We also need variables to represent propositions: propositional variables.
o Typically use letters p,q,r,s,… for propositional variables.
o e.g. For a proposition p, we can ask if p is true or false. 
 When writing math, we'll write T and F instead true and false. 
 What we're studying now is propositional logic: the study of these propositions
and how they can be logically combined.

4.2. Logical Operator 

 A proposition can be negated.


o That is, if p is true, its negation is false; if p is false, its negation is true.
o [That sentence sucked: let's think of a better way to say those things.] 
 Some examples with natural language statements:
o e.g. in English: the negation of “John is going to the store.” is “John is not
going to the store.”
o e.g. in Chinese: the negation of “我去商店。” is “我不去商店。”
o Some are less easy to negate: “I will not go to the store any day this
week.” is negated to “I will go to the store some day this week.”
o Problem: natural languages (like English, Chinese) are imprecise and
messy, so are hard to work with this way.
o Solution: better notation.
 We'll write “¬p” for the negation of p.
o So we could say things like: “if p is the proposition „2+2=4‟, then its
negation is ¬p, „2+2≠4‟.”
o “¬p” is itself a proposition: the “¬” takes a proposition and makes a new
one. 
 Describing “if p is true, its negation is false, …” was awkward.
o We will use a truth table to give all of the true/false values for predicates.

 Here is a truth table for negation:

 When writing a truth table, we have to list all of the possible combinations of
values for the propositions (p, q, …) in it.
o Since “¬p” contains only “p”, there are only two rows. 
 Negation is the first way we have to manipulate propositions.
o We will need others. o When propositions are manipulated to make
another proposition, we call the result a compound proposition. 
 Conjunction is a way to combine two propositions.
o The conjunction of p and q is written p∧q. o p∧q is true if both p and q are
true.
o In other words, ∧ means “and”.
o In a truth table:

 Notice that we got every possible combination of values for “p” and “q” in the
truth table. 
 Disjunction is another way to combine two propositions.
o The disjunction of p and q is written p∨q.
o p∨q is true if p is true, or q is true, or both are true.
o In other words, ∨ means “or”.
o In a truth table:

 Notice the “both are true” case.


o This might not be a direct translation of “or”.
o “I have either an apple or an orange.” If I have both, is that true?
o “我有苹果或者橘子。” and “你要苹果还是橘子?” What if you have/want
both? Also strange in Chinese?
o Even if we pronounce ∨ as “or”, remember that it's not always the same as
the word.
o Either one or both are true → the disjunction is true.
o It's an “inclusive or” if you want to say it that way.

Using Logical Operators 

 Let's define propositions and translate some sentences into the logical notation.

p The store is open today.


q Mary is going to the store today.

r John is going to the store today.

o “Either John or Mary (or both) are going to the store today.”
o “John is going to the store today, but Mary isn't.”
o “The store is open today, and either John or Mary is going.” 
 Answers: o q∨r o r∧¬q o p∧(q∨r)  Some notes about that:
o Sometimes the logic of a sentence is obvious, but sometimes it takes
some thought to unwrap it.
o That's one of the reasons to have this notation: meaning is always clearly
defined, unlike natural language sentences.
o The word “but” is logically the same as “and”. It just implies that the
following part is a little surprising.
o Whether “or” includes “or both” can be ambiguous. We'll usually assume
“or” translates to ∨, but it depends on the context.
o We can use parentheses to group parts together, just like in arithmetic. 
 Some sentences we can't (easily) translate yet:
o “If the store is open today, then John will go.”
o “Either John or Mary (but not both) are going to the store today.”
o It would be nice to have notation for that…

Exclusive Or

 The ∨ means “one or the other or both”: inclusive or.


o The “but not both” version is exclusive or.
o “Exclusive or” is written ⊕ and sometimes pronounced “xor”.
o p⊕q is true if p is true, or q is true, but not both.

Conditionals 

 The other sentence we couldn't easily translate before: “If the store is open
today, then John will go.”
o That's a conditional statement or an implication.
o i.e. it expresses “If (something is true), then (something else).”
o We will write p→q for the conditional “If p then q.”
o In this conditional, the thing before the → (p in the example) is called the
antecedent, premise, or hypothesis. The thing after the → (q in the
example) is called the conclusion or consequence. 
 Like with “or”, one of the entries there might not match your expectations from
English.
o Statements like “If the moon is larger than the earth, then all food is red.”
are perfectly true: the premise is false, so the whole statement is true.
o It's easy to have conditionals like that one that don't make sense (when
said in natural language) but are true
 There are a lot of things in English (and probably Chinese) that translate into a
conditional statement.
o Like “and” and “but”, they are logically equivalent but may have some
subtle meaning when said.
o Examples of p→q: “if p then q”; “q whenever p”; “p implies q”; “q follows
from p”; “q only if p”. 
 We could also have written p→q using only ∨, ∧, and ¬.
o Draw a truth table for ¬p∨q if you don't believe me. 
 For a conditional proposition p→q…
o q→p is its converse.
o ¬p→¬q is its inverse.
o ¬q→¬p is its contrapositive. 
 A conditional statement and its contrapositive are equivalent.
o Not obvious, but:
4.3. Translating Into Logic 

 It is often necessary to translate a natural language (English, Chinese, …)


sentence into logical notation.
o Makes it easier to do logical manipulations, makes sure you know the real
meaning without any of the missing/hidden details of natural languages.
o I will ask questions about this, but will try to not play too many word
games.  Usually “not”, “and” and “or” are fairly obvious.
o … as long as you're careful about whether the “or” is ∨ or ⊕. Usually ∨. 
 Biconditionals are rare.
o Usually just “if and only if”.
o Occasionally “is necessary and sufficient for” or some other weird
language constructs. 
 That leaves conditionals (→) as the difficult one.
o It can appear in unexpected places.
o Consider “Only ZJU students can access the campus network.”
o Use s for “is a ZJU student” and n for “can access the campus network”. o
Two possible translations: s→n and n→s.
o Which is right? 
 My usual first thought is s→n.
o That is literally “If you are a ZJU student, then you can access the
network.”
o Or maybe “All ZJU students can access the network.”
o That's not what the original statement said.
o Consider a student that has been banned from the network. 
 The correct translation is n→s.
o “If you can access the network, then you are a ZJU student.”
o In other words, if you find someone and they can access the network, you
know they are a ZJU student.
o That does match “Only ZJU students can access the campus network.” 
 But when people say “If… then…” sentences, they often really mean the
converse (or something).
o Be cafeful when translating to logic.
o In this course, I'll be careful to say what I mean. 
 More examples with d: you are in the dual degree program, f: you are in first
year, c: you are in this course.
o “If you are in the dual degree program, then you are either not in first year,
or are in this course.”
o “You are in the dual degree program and in first year.”
o “Students must be in the dual degree program to register in this course.”
o “Anyone who is in the dual degree program and in first year is in this
course.”
o “Can all first year students register in this course?”
o Translations?

You might also like