Discrete Chapter 2 Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Talha Shahab BCSE-17206

Discrete Mathematics
Chapter No. 2: Basic Structures: Sets, Functions, Sequences, Sums, and Matrices

 Set
A well-defined collection of distinct objects is called a set.
 The objects are called the elements or members of the set.
 Sets are denoted by capital letters A, B, C …, X, Y, Z.
 The elements of a set are represented by lower case letters a, b, c, … , x, y, z.
 If an object x is a member of a set A, we write x ∈ A , which reads “x belongs to A” or “x is
in A” or “x is an element of A”, otherwise we write x ∉ A , which reads “x does not belong
to A” or“x is not in A” or “x is not an element of A”.

 Sets of numbers
1. Set of Natural Numbers N = {1, 2, 3, … }
2. Set of Whole Numbers W = {0, 1, 2, 3, … }
3. Set of Integers Z = {…, -3, -2, -1, 0, +1, +2, +3, …} = {0, ±1, ±2, ±3, …}
{“Z” stands for the first letter of the German word for integer: Zahlen.}
4. Set of Even Integers E = {0, ± 2, ± 4, ± 6, …}
5. Set of Odd Integers O = {± 1, ± 3, ± 5, …}
6. Set of Prime Numbers P = {2, 3, 5, 7, 11, 13, 17, 19, …}
7. Set of Rational Numbers (or Quotient of Integers)

8. Set of Irrational Numbers

9. Set of Real Numbers

10. Set of Complex Numbers

 Subset
If A & B are two sets, then A is called a subset of B. It is written as A ⊆ B. The set A is subset of B if and
only if any element of A is also an element of B. Symbolically:

 Proper Set
Let A and B be sets. A is a proper subset of B, if and only if, every element of A is in B but there is at least
one element of B that is not in A, and is denoted as

 Equal Set
Two sets A and B are equal if and only if every element of A is in B and every element of B is in A and is
denoted A = B.

 Null Set
A set which contains no element is called a null set, or an empty set or a void set. It is denoted by the Greek
letter ∅ (phi) or { }.

1|Page
 Universal Set
The set of all elements under consideration is called the Universal Set. The Universal Set is usually denoted
by U.

 Venn Diagram
A Venn diagram is a graphical representation of sets by regions in the plane. The Universal Set is represented
by the interior of a rectangle, and the other sets are represented by disks lying within the rectangle.

 Union
Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements in U that
belong to A or to B or to both, and is denoted A ∪ B.

 Intersection
Let A and B subsets of a universal set U. The intersection of sets A and B is the set of all elements in U that
belong to both A and B and is denoted A ∩ B.

2|Page
 Difference
Let A and B be subsets of a universal set U. The difference of “A and B” (or relative complement of B in A) is
the set of all elements in U that belong to A but not to B, and is denoted A – B or A \ B.

 Complement
Let A be a subset of universal set U. The complement of A is the set of all element in U that do not belong to
A, and is denoted AΝ, A or Ac

 Cartesian Product of Two Sets


Let A and B be sets. The Cartesian product of A and B, denoted by A × B (read as “A cross B”) is the set of
all ordered pairs (a, b), where a is in A and b is in B.
Example
Let A = {1, 2}, B = {a, b, c} then
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
B × A = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}
A × A = {(1, 1), (1,2), (2, 1), (2, 2)}
B × B = {(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), (c, a), (c, b),(c, c)}

 Domain of a Relation
The domain of a relation R from A to B is the set of all first elements of the ordered pairs which belong to R
denoted by Dom(R). Symbolically,
Dom (R) = {a ∈ A | (a, b) ∈ R}
 Range of a Relation
The range of a relation R from A to B is the set of all second elements of the ordered pairs which belong to R
denoted Ran(R). Symbolically,
Ran(R) = {b ∈ B | (a, b) ∈ R}

3|Page
 Table of Set Identities

Example 1 Use a membership table to show that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Example 2 The Union and Intersection of A, B, and C

4|Page
 Union of Multiple Sets
The union of a collection of sets is the set that contains those elements that are members of at least one set
in the collection. We use the notation

to denote the union of the sets A1, A2, . . . , An.

 Intersection of Multiple Sets


The intersection of a collection of sets is the set that contains those elements that are members of all the sets in
the collection. We use the notation

to denote the intersection of the sets A1, A2, . . . , An.

 Functions
A function F from a set X to a set Y is a relation from X to Y that satisfies the following two properties
1. For every element x in X, there is an element y in Y such that (x,y) ∈F. In other words every element of
X is the first element of some ordered pair of F.
2. For all elements x in X and y and z in Y, if (x,y) ∈ F and (x,z) ∈ F, then y = z In other words no two
distinct ordered pairs in F have the same first element.

“A function f from a set X to a set Y is a relationship between elements of X and elements of Y such that
each element of X is related to a unique element of Y, and is denoted f: X →Y. The set X is called the
domain of f and Y is called the co-domain of f.”

Example
Which of the relations define functions from X = {2,4,5} to Y={1,2,4,6}.
a. R1 = {(2,4), (4,1)}
b. R2 = {(2,4), (4,1), (4,2), (5,6)}
c. R3 = {(2,4), (4,1), (5,6)}]
Solution
a. R1 is not a function, because 5 ∈X does not appear as the first element in any ordered pair in R1.
b. R2 is not a function, because the ordered pairs (4,1) and (4,2) have the same first element but
Different second elements.
c. R3 defines a function because it satisfy both the conditions of the function that is every element of
X is the first element of some order pair and there is no pair which has the same first order
pair but different second order pair.

5|Page
Types of functions
 Injective or ONE-TO-ONE Function
Let f: X →Y be a function. f is injective or one-to-one if, and only if, ∀ x1, x2 ∈ X, if x1 ≠ x2 then f(x1) ≠
f(x2)That is, f is one-to-one if it maps distinct points of the domain into the distinct points of the co-domain.

 Surjective or ONTO Function


Let f: X→Y be a function. g is surjective or onto if, and only if, "∀ y∈ Y, ∃ x∈ X such that g(x) = y. That is,
g is onto if every element of its co-domain is the image of some element(s) of its domain i.e., co-domain of
g = range of g. Example

 Bijective Functions
The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto. We also say
that such a function is bijective.

 Difference of a Function
Let f: X →R and g:X →R be real valued functions. The difference of f and g denoted by f-g which is a
function from X to R defined by (f-g)(x) = f(x) - g(x) ∀ x∈X.

 Product of a Function
Let f: X →R and g:X →R be real valued functions. The product of f and g denoted f.g or simply fg is a
function from X to R defined by (f . g)(x) = f(x) . g(x) ∀ x∈X

 Sequence
A sequence is just a list of elements usually written in a row. A sequence is a function from a subset of the set
of integers (usually either the set {0, 1, 2 . . .} or the set {1, 2, 3 . . .}) to a set S. We use the notation an to
denote the image of the integer n. We call an a term of the sequence.
Formal Definition
A sequence is a function whose domain is the set of integers greater than or equal to a particular integer n0.
Usually this set is the set of Natural numbers {1, 2, 3, …} or the set of whole numbers {0, 1, 2, 3, …}.

6|Page
 Geometric progression
A geometric progression is a sequence of the form a , a r, a r2, . . . , arn, . . . where the initial term a and the
common ratio r are real numbers.
A sequence in which every term after the first is obtained from the preceding term by multiplying it with a
constant number is called a geometric sequence or geometric progression (G.P.)

 Arithmetic Progression
An arithmetic progression is a sequence of the form a, a + d, a + 2d, . . . , a + nd, . . . where the initial term a
and the common difference d are real numbers.
A sequence in which every term after the first is obtained from the preceding term by adding a constant
number is called an arithmetic sequence or arithmetic progression (A.P.)

 Fibonacci sequence
The Fibonacci sequence, f0, f1 , f2, . . . , is defined by the initial conditions f0 = 0, f1 = 1, and the recurrence
relation fn = fn−1 + fn−2 for n = 2, 3, 4, . . . .

 Series
The sum of the terms of a sequence forms a series. If a1, a2, a3, … represent a sequence of numbers, then the
corresponding series is a1 + a2 + a3 + …

 Summation
The capital Greek letter sigma ∑ is used to write a sum in a short hand notation. where k varies from 1 to n
represents the sum given in expanded form by = a1 + a2 + a3 + … + an
More generally if m and n are integers and m ≤ n, then the summation from k equal m to n of ak is:

 Matrix
A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m × n matrix.
The plural of matrix is matrices. A matrix with the same number of rows as columns is called square. Two
matrices are equal if they have the same number of rows and the same number of columns and the
corresponding entries in every position are equal.

 Transpose of a Matrix
The transpose of a matrix A of size m × n, is the matrix denoted by At of size n × m, obtained by writing the
rows of A, in order, as columns.(Or we can say that transpose of a matrix means “write the rows instead of
columns or write the columns instead of rows”. Thus if

 Symmetric Matrix
A square matrix A = [aij] of size n × n is called symmetric if, and only if, At= A i.e., for all i, j = 1, 2, …, n,
aij = aji

7|Page

You might also like