Discrete Mathematics Sec 2.1-2 -...

11
Islamic University of Gaza 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

Transcript of Discrete Mathematics Sec 2.1-2 -...

Page 1: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

Islamic University of Gaza

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

Page 2: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

Chapter 2:

Basic Structures: Sets, Functions, Sequences, and Sums

2.1: Sets

A set is an unordered collection of objects.

The objects in a set are called the elements, or members, of the set. A set is said to

contain its elements.

Two sets are equal if and only if they have the same elements. That is, if A and B are

sets, then A and B are equal if and only if ∀x(x ϵ A ↔ x ϵ B).We write A = B if A and

B are equal sets.

The set A is said to be a subset of B if and only if every element of A is also an element

of B. We use the notation (A ⊆ B) to indicate that A is a subset of the set B.

Let S be a set. If there are exactly 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 I S I.

A set is said to be infinite if it is not finite.

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).

Let A and B be sets. The Cartesian product of A and B, denoted by A x B, is the set of all

ordered pairs (a, b), where a ϵ A and b ϵ B. Hence,

Page 3: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

Exercises:

1) 2.1.5 For each of the following sets, determine whether 2 is an element of that set.

a) {x ϵ R| x is an integer greater than 1}

b) {x ϵ R| x is the square of an integer}

c) {2,{2}}

d) {{2},{{2}}}

e) {{2},{2,{2}}}

f) {{{2}}}

a Yes

b No

c Yes

d No

e No

f No

2) 2.1.7 Determine whether each of these statements is true or false.

a False

b false

E False

d true

e false

f False

g True

∅ is a set not element.

3) 2.1.16 Find two sets A and B such that A ϵ B and A ⊆ B.

Solution:

Let a = ∅ b= {∅}

Now ∅ ϵ {∅} and ∅ ⊆ {∅}

So, A ϵ B and A ⊆ B.

Page 4: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

4) 2.1.22 Determine whether each of these sets is the power set of a set, where a and b are

distinct elements.

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)}

Page 5: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

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.

Page 6: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

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) A U B

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.

2) Let A = {I, 2, 3, 4, 5} and B = {0, 3, 6}. Find

a) A ∩ B

b) A U B

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}

3) 2.2.6 Prove the identity laws in Table 1 by showing that

a) AU∅ = {x| x ϵ A V x ϵ ∅} = {x| x ϵ A V F} = {x| x ϵ A} = A

b) A∩ U = {x| x ϵ A ᴧ x ϵ U} = {x| x ϵ A ᴧ T} = {x| x ϵ A} = A

Page 7: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

2.3: Function:

Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one

element of B to each element of A. We write f (a) = b if b is the unique element of B

assigned by the function f to the element a of A. If f is a function from A to B, we write f: A

→ B.

If f is a function from A to B, we say that A is the domain of f and B is the codomain of f If f

(a) = b, we say that b is the image of a and a is a preimage of b. The range of f is the set of

all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B.

Let 11 and h be functions from A to R. Then f1 + f2 and f1f2 are also functions from A to R

defined by

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

Page 8: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

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.

2. 2.3.8 Find the value:

A 1

B 2

C -1

D 0

E 3

F -2

G 1

H 2

3. 2.3.10/2.3.11 Determine whether each of these functions from {a, b, c, d} to itself is

one-to-one and onto.

one-to-one (q 10) Onto (q11)

A yes Yes

B no no

c no no

Page 9: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

4. 2.3.20 Let I: R → R and let f(x) > 0 for all x ϵ R. Show that f(x) is strictly increasing if

and only if the function g(x) = 1/ f(x) is strictly decreasing.

Solution:

Let x1 > x2 then f(x1) > f(x2)

So 1/ (fx1) < 1/f(x2)

So g(x1) < g(x2)

So, g(x) is strictly decreasing

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:

Since eX is positive for all x.

Then inverse of f f-1(x) is not exist for x <0.

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.

Page 10: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

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

An arithmetic progression is a sequence of the form

Page 11: Discrete Mathematics Sec 2.1-2 - site.iugaza.edu.pssite.iugaza.edu.ps/amarasa/files/Chapter-2.pdf · Exercises: 1) 2.1.5 For each of the following sets, determine whether 2 is an

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.

2. 2.4.13 what are the values of these sums?

3. 2.4.19 show that , where a0, a1. . . an is a sequence of real

numbers. This type of sum is called telescoping.

4. 2.4.23

5. 2.4.28