Professional Documents
Culture Documents
Faculty of Engineering
Department of Computer Engineering
Fall 2011
ECOM 2311: Discrete Mathematics
Eng. Ahmed Abumarasa
Discrete Mathematics
Sec 2.1-2.4
Basic Structures: Sets, Functions, Sequences, and Sums
Chapter 2:
2.1: Sets
a Yes
b No
c Yes
d No
e No
f No
a False
b false
E False
d true
e false
f False
g True
∅ is a set not element.
a No set.
b Power set of {a}
c No set
d Power set of {a, b}
5) 2.1.28 Let A = {a, b, c}, B = {x, y}, and C = {0, 1}. Find
a) A x B x C
b) C x B x A
c) C x A x B
d) B x B x B
Solution:
a) {(a, x, 0), (a, x, 1), (a, y, 0), (a, y, 1), (b, x, 0), (b, x, 1), (b, y, 0), (b, y, 1), (c, x, 0), (c, x, 1), (c,
y, 0), (c, y, 1)}
b) {(0,x,a),(0,x,b),(0,x,c),(0,y,a),(0,y,b),(0,y,c),(1,x,a),(1x,b),(l,x,c),(1,y,a),(1,y,b),(1,y,c)}
c) {(0, a, x), (0, a, y), (0,b, x), (0, b, y), (0, c, x), (0, c, y), (1, a, x), (1, a, y), (1, b, x), (1,b, y), (1,
c, x), (1, c, y)}
d) {(x, x, x), (x, x, y), (x, y, x), (x, y, y), (y, x, x), (y, x, y), (y, y, x), (y, y, y)}
2.2 Set Operations
Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is the set
that contains those elements that are either in A or in B, or in both.
Lei A and B be sets. The intersection of the sets A and B. denoted by A ∩ B. is
the set containing those elements in both A and B.
Two sets are called disjoint if their intersection is the empty set.
Let A and B be sets. The difference of A and B, denoted by A - B. is the set
containing those elements that are in A but not in B. The difference of A and B is
also called the complement of B with respect to A.
Lei U be the universal set. The complement of the set A, denoted by A, is the
complement of A with respect to U. In other words, the complement of the set
A is U - A.
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.
The intersection of a collection of sets is the set that contains those elements
that are members of all the sets in the collection.
Exercises:
1) 2.2.1 Let A be the set of students who live within one mile of school and let B be the
set of students who walk to classes. Describe the students in each of these sets.
a) A∩B
b) AUB
c) A–B
d) B–A
a The set of students who live within one mile of school and walk to classes.
b the set of students who either live within one mile of school or walk to classes
c the set of students who live within one mile of school but do not walk to class
d The set of students who walk to classes but live more than a mile from school.
a) A∩B
b) AUB
c) A–B
d) B–A
A {3, 6}
B {0, 1, 2, 3, 4, 5, 6}
C {1, 2, 4, 5}
d {0, 6}
Let f be a function from the set A to the set 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
A function f is said to be one-to-one, or injective, 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 an injection if it is one-to-one.
A function f from A to B is called onto, or surjective, if and only if for every element b E B
there is an element a E A with f(a) = b. A function f is called a surjection if it is onto.
The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and
onto.
Let f be a one-to-one correspondence from the set A to the set B. The inverse function of f
is the function that assigns to an element b belonging to B the unique element a in A such
that f (a) = b. The inverse function of f is denoted by f-1. Hence, f-1(b) = a when f (a) = b.
Let g be a function from the set A to the set B and let f be a function from the set B to the
set C. The composition of the functions f and g, denoted by (f o g), is defined by
Exercises:
1. 2.3.2 Determine whether f is a function from Z to R if
Solution:
a Not function, every value in the domain has 2 value in codomain
b Yes, function.
c Not function, for n= 2 or n =-2 there is no value.
A 1
B 2
C -1
D 0
E 3
F -2
G 1
H 2
Solution:
5. 2.3.24 Show that the function f(x) = eX from the set of real number to the set of real
numbers is not invertible, but if the codomain is restricted to the set of positive real
numbers, the resulting function is invertible.
Solution:
6. 2.3.30 if f and f o g are one-to-one, does it follow that g is one-to-one? Justify your
answer.
7. If f and f o g are onto, does it follow that g is onto? Justify your answer.
2.4 Sequences and Summations:
A sequence is a function from a subset of the set of integers (usually either the set {0, 1, 2…} or
the set {I, 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.
A geometric progression is a sequence of the form
Exercises
1. 2.4.9 For each of these lists of integers, provide a simple formula or rule that generates
the terms of an integer sequence that begins with the given list. Assuming that your
formula or rule is correct, determine the next three terms of the sequence.
4. 2.4.23
5. 2.4.28