















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















M uch of discrete mathematics is devoted to the study of discrete structures, used to represent discrete objects. Many important discrete structures are built using sets, which are collections
of objects.
Introduction: In this section, we study the fundamental discrete structure on which all other discrete structures are built, namely, the set. Sets are used to group objects together. Often, but not always, the objects in a set have similar properties. For instance, all the students who are currently enrolled at any school/college, make up a set. Likewise, all the students currently taking a discrete mathematics course make up a set. In addition, those currently enrolled students, who are taking a course in discrete mathematics form a set that can be obtained by taking the elements common to the first two collections.
Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a ∈ A to denote that a is an element of the set A. The notation a ∉ A denotes that a is not an element of the set A.
It is common for sets to be denoted using uppercase letters. Lowercase letters are usually used to denote elements of sets. There are several ways to describe a set. One way is to list all the members of a set, when this is possible. We use a notation where all members of the set are listed between braces. For example, the notation { a, b, c, d } represents the set with the four elements a, b, c , and d. This way of describing a set is known as the roster method.
EXAMPLE 1 The set V of all vowels in the English alphabet can be written as V = { a, e, i, o, u }.
EXAMPLE 2 The set O of odd positive integers less than 10 can be expressed by O = {1 , 3 , 5 , 7 , 9}.
Sometimes the roster method is used to describe a set without listing all its members. Some members of the set are listed, and then ellipses (... ) are used when the general pattern of the elements is obvious. EXAMPLE 3: The set of positive integers less than 100 can be denoted by { 1 , 2 , 3 ,... , 99 }.
Sets are used extensively in counting problems, and for such applications we need to discuss the sizes of sets.
Definition: Let S be a set. If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. The cardinality of S is denoted by | S |.
EXAMPLE 5 Let A be the set of odd positive integers less than 10. Then | A | = 5.
EXAMPLE 6 Let S be the set of letters in the English alphabet. Then | S | = 26.
EXAMPLE 7 Because the null set has no elements, it follows that |∅| = 0.
Definition: Given a set S , the power set of S is the set of all subsets of the set S. The power set of S is denoted by P(S)****.
EXAMPLE 8 What is the power set of the set {0 , 1 , 2}? Solution: The power set P( {0 , 1 , 2} ) is the set of all subsets of {0 , 1 , 2}. Hence, P( {0 , 1 , 2} ) = {∅ , {0} , {1} , {2} , {0 , 1} , {0 , 2} , {1 , 2} , {0 , 1 , 2}}.
Note: If a set has n elements, then its power set has 2 n^ elements.
Definition: Let A and B be sets. The Cartesian product of A and B , denoted by A × B , is the set of all ordered pairs (a, b) , where a ∈ A and b ∈ B. Hence, A × B = { (a, b) | a ∈ A ∧ b ∈ B }.
EXAMPLE 9 What is the Cartesian product of A = {1 , 2} and B = { a, b, c }? Solution: The Cartesian product A × B = { ( 1 , a), ( 1 , b), ( 1 , c), ( 2 , a), ( 2 , b), ( 2 , c) }.
EXAMPLE 10 What is the Cartesian product A × B × C , where A = {0 , 1}, B = {1 , 2}, and C = {0 , 1 , 2}? Solution: The Cartesian product A × B × C consists of all ordered triples ( a, b, c ), where a ∈ A , b ∈ B , and c ∈ C. Hence, A × B × C = { ( 0 , 1 , 0 ), ( 0 , 1 , 1 ), ( 0 , 1 , 2 ), ( 0 , 2 , 0 ), ( 0 , 2 , 1 ), ( 0 , 2 , 2 ), ( 1 , 1 , 0 ), ( 1 , 1 , 1 ), ( 1 , 1 , 2 ), ( 1 , 2 , 0 ), ( 1 , 2 , 1 ), ( 1 , 2 , 2 ) }.
Note : When A , B , and C are sets, (A × B) × C is not the same as A × B × C We use the notation A^2 to denote A × A , the Cartesian product of the set A with itself. Similarly, A^3 = A × A × A , A^4 = A × A × A × A , and so on. More generally, A n^ = { (a 1 , a 2 ,... , an) | ai ∈ A for i = 1 , 2 ,... , n }.
EXAMPLE 11 Suppose that A = {1 , 2}. It follows that A^2 = { ( 1 , 1 ), ( 1 , 2 ), ( 2 , 1 ), ( 2 , 2 ) } and A^3 = { ( 1 , 1 , 1 ), ( 1 , 1 , 2 ), ( 1 , 2 , 1 ), ( 1 , 2 , 2 ), ( 2 , 1 , 1 ), ( 2 , 1 , 2 ), ( 2 , 2 , 1 ), ( 2 , 2 , 2 ) }.
5. What is the cardinality of each of these sets?
a) { a }
b) {{ a }}
c) { a, { a }}
d) { a, { a } , { a, { a }}}
6. Find the power set of each of these sets, where a and b are distinct elements.
a) { a }
b) { a, b }
c) {∅ , {∅}}
7. Let A = { a, b, c, d } and B = { y, z }. Find
a) A × B.
b) B × A.
8. Let A = { a, b, c }, B = { x, y }, and C = {0 , 1}. Find
a) A × B × C.
b) C × B × A.
c) C × A × B.
d) B × B × B.
9. Find A^2 if
a) A = {0 , 1 , 3}.
b) A = {1 , 2 , a, b }.
10. Find A^3 if
a) A = { a }.
b) A = {0 , a }.
Definition: Let U be the universal set. The complement of the set A, denoted by 𝐴̅ , is the complement of A with respect to U. Therefore, the complement of the set A is U − A****.
An element belongs to A if and only if x / ∈ A. This tells us that A = { x ∈ U | x / ∈ A }.
EXAMPLE 15 Let A = { a, e, i, o, u } (where the universal set is the set of letters of the English alphabet). Then A = { b, c, d, f, g, h, j, k, l,m, n, p, q, r, s, t, v,w, x, y, z }.
1. Let A = {1 , 2 , 3 , 4 , 5} and B = {0 , 3 , 6}. Find a) A ∪ B.
b) A ∩ B.
c) A − B.
d) B − A.
2. Let A = { a, b, c, d, e } and B = { a, b, c, d, e, f, g, h }. Find
a) A ∪ B.
b) A − B.
c) B − A.
d) A ∩ B.
3. Let A = {0 , 2 , 4 , 6 , 8 , 10}, B = {0 , 1 , 2 , 3 , 4 , 5 , 6}, and C = {4 , 5 , 6 , 7 , 8 , 9 , 10}. Find
a) A ∩ B ∩ C.
b) A ∪ B ∪ C.
c) (A ∪ B) ∩ C.
d) (A ∩ B) ∪ C.
4. What can you say about the sets A and B if we know that
a) A ∪ B = A?
b) A ∩ B = A?
c) A − B = A?
d) A ∩ B = B ∩ A?
Definition: Let f be a function from A to B and let S be a subset of A. The image of S under the function f is the subset of B that consists of the images of the elements of S. We denote the image of S by f (S) , so f (S) = { t | ∃ s ∈ S (t = f (s)) }. We also use the shorthand { f (s) | s ∈ S } to denote this set.
EXAMPLE 17 : Let A = { a, b, c, d, e } and B = {1 , 2 , 3 , 4} with f (a) = 2, f (b) = 1, f (c) = 4, f (d) = 1, and f (e) = 1. The image of the subset S = { b, c, d } is the set f (S) = {1 , 4}.
Some functions never assign the same value to two different domain elements. These functions are said to be one-to-one.
Definition: A function f is said to be one-to-one , or an injunction , if and only if f (a) = f (b) implies that a = b for all a and b in the domain of f. A function is said to be injective if it is one- to-one.
FIGURE 2: A One-to-One Function.
EXAMPLE 18 : Determine whether the function f from { a, b, c, d } to {1 , 2 , 3 , 4 , 5} with f (a) = 4, f (b) = 5, f (c) = 1, and f (d) = 3 is one-to-one.
Solution: The function f is one-to-one because f takes on different values at the four elements of its domain.
Definition: A function f from A to B is called onto , or a surjection , if and only if for every element b ∈ B there is an element a ∈ A with f (a) = b. A function f is called surjective if it is onto.
FIGURE 3: An Onto Function.
EXAMPLE 19 : Let f be the function from { a, b, c, d } to {1 , 2 , 3} defined by f (a) = 3, f (b) = 2, f (c) = 1, and f (d) = 3. Is f an onto function?
Solution: Because all three elements of the codomain are images of elements in the domain, we see that f is onto. Note that if the codomain were {1 , 2 , 3 , 4}, then f would not be onto.
FIGURE 4: Examples of Different Types of Correspondences.
Definition: 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.
EXAMPLE 20: Let f be the function from { a, b, c, d } to {1 , 2 , 3 , 4} with f (a) = 4, f (b) = 2, f (c) = 1, and f (d) = 3. Is f a bijection?
Solution: The function f is one-to-one and onto. It is one-to-one because no two values in the domain are assigned the same function value. It is onto because all four elements of the codomain are images of elements in the domain. Hence, f is a bijection.
i) f (a) = b , f (b) = a , f (c) = c , f (d) = d
ii) f (a) = b , f (b) = b , f (c) = d , f (d) = c
iii) f (a) = d , f (b) = b , f (c) = c , f (d) = d
a) f (n) = n − 1
b) f (n) = n^2 + 1
c) f (n) = n^3
2.4 Sequences and Summations
Introduction: Sequences are ordered lists of elements, used in discrete mathematics in many ways. They are also an important data structure in computer science. We will often need to work with sums of terms of sequences in our study of Discrete Mathematics.
The terms of a sequence can be specified by providing a formula for each term of the Sequence. Identifying a sequence when the first few terms are provided is a useful skill when solving problems in discrete mathematics.
Definition: 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 a (^) n a term of the sequence
EXAMPLE 23: Consider the sequence { an }, where an = 1 𝑛
The list of the terms of this sequence, beginning with a 1 , namely,
a 1 , a 2 , a 3 , a 4 ,... , starts with 1 1 ,^
1 2 ,^
1 3 ,^
1 4 , ……… etc
Definition: An arithmetic progression is a sequence of the form a, a + d, a + 2 d,... , a + nd,... where the initial term a and the common difference d are real numbers.
Definition: A geometric progression is a sequence of the form a, ar, ar^2 ,... , arn,... where the initial term a and the common ratio r are real numbers.
EXAMPLE 24 Let { an } be a sequence that satisfies the recurrence relation an = an − 1 + 3 for n = 1 , 2 , 3 ,... , and suppose that a 0 = 2. What are a 1 , a 2 , and a 3?
Solution: We see from the recurrence relation that a 1 = a 0 + 3 = 2 + 3 = 5. It then follows that a 2 = 5 + 3 = 8 and a 3 = 8 + 3 = 11_._
EXAMPLE 25 Let { an } be a sequence that satisfies the recurrence relation an = an − 1 − an − 2 for n = 2 , 3 , 4 ,... , and suppose that a 0 = 3 and a 1 = 5. What are a 2 and a 3?
Solution: We see from the recurrence relation that a 2 = a 1 − a 0 = 5 − 3 = 2 and a 3 = a 2 − a 1 = 2 − 5 = −3.We can find a 4 , a 5 , and each successive term in a similar way.
Next, we consider the addition of the terms of a sequence. For this we introduce summation notation. We begin by describing the notation used to express the sum of the terms am , am +1 ,... , an from the sequence { an }.We use the notation
𝑛
𝑗=𝑚
(read as the sum from j = m to j = n of aj ) to represent am + am +1 +・ ・ ・+ an.
Here, the variable j is called the index of summation , and the choice of the letter j as the variable is arbitrary; that is, we could have used any other letter, such as i or k.
EXAMPLE 26 Use summation notation to express the sum of the first 100 terms of the
sequence { aj }, where aj = 1 𝑗 for j= 1 ,^^2 ,^^3 ,.... Solution: The lower limit for the index of summation is 1, and the upper limit is 100.We write this sum as
100
𝑗=
EXAMPLE 27: What is the value of ∑^5 𝑗=1𝑗 2 Solution: We have ∑ (^5) 𝑗=1 𝑗 2 = 1 2 + 2 2 + 3 2 + 4 2 + 5 2
= 1 + 4 + 9 + 16 + 25 = 55_._