1. Trang chủ
  2. » Tất cả

Chapter 4 functions

132 3 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Functions
Tác giả Huynh Tuong Nguyen, Tran Vinh Tan
Trường học University of Technology - VNUHCM
Chuyên ngành Computer Science and Engineering
Thể loại Chương
Năm xuất bản 2012
Thành phố Ho Chi Minh City
Định dạng
Số trang 132
Dung lượng 763,48 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Functions Functions Huynh Tuong Nguyen, Tran Vinh Tan Contents Functions One to one and Onto Functions Sequences and Summation Recursion 4 1 Chapter 4 Functions Discrete Structures for Computing on 13[.]

Trang 1

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.1

Chapter 4

Functions

Discrete Structures for Computing on 13 March 2012

Huynh Tuong Nguyen, Tran Vinh TanFaculty of Computer Science and Engineering

University of Technology - VNUHCM

Trang 2

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.2

Contents

1 Functions

2 One-to-one and Onto Functions

3 Sequences and Summation

4 Recursion

Trang 3

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.3

Introduction

• Each student is assigned a grade from set

{0, 0.1, 0.2, 0.3, , 9.9, 10.0} at the end of semester

• Function is extremely important in mathematics andcomputer science

• linear, polynomial, exponential, logarithmic,

• Don’t worry! For discrete mathematics, we need tounderstand functions at a basic set theoretic level

Trang 4

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.3

Introduction

• Each student is assigned a grade from set

{0, 0.1, 0.2, 0.3, , 9.9, 10.0} at the end of semester

• Function is extremely important in mathematics and

computer science

• linear, polynomial, exponential, logarithmic,

• Don’t worry! For discrete mathematics, we need tounderstand functions at a basic set theoretic level

Trang 5

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.3

Introduction

• Each student is assigned a grade from set

{0, 0.1, 0.2, 0.3, , 9.9, 10.0} at the end of semester

• Function is extremely important in mathematics and

computer science

• linear, polynomial, exponential, logarithmic,

• Don’t worry! For discrete mathematics, we need tounderstand functions at a basic set theoretic level

Trang 6

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.3

Introduction

• Each student is assigned a grade from set

{0, 0.1, 0.2, 0.3, , 9.9, 10.0} at the end of semester

• Function is extremely important in mathematics and

computer science

• linear, polynomial, exponential, logarithmic,

• Don’t worry! For discrete mathematics, we need to

understand functions at a basic set theoretic level

Trang 7

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 8

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 9

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 10

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 11

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 12

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 13

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 14

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 15

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 16

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.4

Function

Definition

Let A and B be nonempty sets A functionf from A to B is an

assignment ofexactly oneelement of B to each element of A

• f : A → B

• A:domain(miền xác định) of f

• B:codomain(miền giá trị) of f

• For each a ∈ A, if f (a) = b

Trang 17

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 18

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 19

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 20

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 21

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.6

Example

Example

What are domain, codomain, and range of the function that

assigns grades to students includes: student A: 5, B: 3.5, C: 9, D:

5.2, E: 4.9?

Example

Let f : Z → Z assign the the square of an integer to this integer

What is f (x)? Domain, codomain, range of f ?

• f (x) = x2

• Domain: set of all integers

• Codomain: Set of all integers

• Range of f : {0, 1, 4, 9, }

Trang 22

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.6

Example

Example

What are domain, codomain, and range of the function that

assigns grades to students includes: student A: 5, B: 3.5, C: 9, D:

5.2, E: 4.9?

Example

Let f : Z → Z assign the the square of an integer to this integer

What is f (x)? Domain, codomain, range of f ?

• f (x) = x2

• Domain: set of all integers

• Codomain: Set of all integers

• Range of f : {0, 1, 4, 9, }

Trang 23

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.6

Example

Example

What are domain, codomain, and range of the function that

assigns grades to students includes: student A: 5, B: 3.5, C: 9, D:

5.2, E: 4.9?

Example

Let f : Z → Z assign the the square of an integer to this integer

What is f (x)? Domain, codomain, range of f ?

• f (x) = x2

• Domain: set of all integers

• Codomain: Set of all integers

• Range of f : {0, 1, 4, 9, }

Trang 24

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.7

Add and multiply real-valued functions

Definition

Let f1and f2 be functions from A to R Then f1+ f2 and f1f2

are also functions from A to R defined by

(f1+ f2)(x) = f1(x) + f2(x)(f1f2)(x) = f1(x)f2(x)

Example

Let f1(x) = x2 and f2(x) = x − x2 What are the functions

f1+ f2 and f1f2?

(f1+ f2)(x) = f1(x) + f2(x) = x2+ x − x2= x(f1f2)(x) = f1(x)f2(x) = x2(x − x2) = x3− x4

Trang 25

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.7

Add and multiply real-valued functions

Definition

Let f1and f2 be functions from A to R Then f1+ f2 and f1f2

are also functions from A to R defined by

(f1+ f2)(x) = f1(x) + f2(x)(f1f2)(x) = f1(x)f2(x)

Trang 26

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 27

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 28

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 29

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

• Is f : Z → Z, f(x) = x2

one-to-one?

Trang 30

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

• Is f : Z → Z, f(x) = x2

one-to-one?

Trang 31

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

• Is f : Z → Z, f(x) = x2

onto?

Trang 32

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.11

One-to-one and onto (bijection)

Definition

f : A → B isbijective (one-to-one correspondence)(song ánh) if

and only if f isinjectiveandsurjective

• Let f be the function from{a, bc, d} to {1, 2, 3, 4} with

f (a) = 4, f (b) = 2,

f (c) = 1, f (d) = 3 Is f abijection?

Trang 33

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.12

Example

Trang 34

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.12

Example

Trang 35

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.12

Example

Trang 36

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.12

Example

Trang 37

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.12

Example

Trang 38

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

A one-to-one correspondence is callinvertible(khả nghịch)

because we can define the inverse of this function

Trang 39

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 40

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 41

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 42

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 43

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 44

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.16

Function Composition

Definition

Given a pair of functions g : A → B and f : B → C Then the

composition(hợp thành) of f and g, denotedf ◦ g is defined by

f ◦ g : A → C

f ◦ g(a) = f (g(a))

Trang 45

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.17

Example

Trang 46

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.17

Example

Trang 47

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.17

Example

Trang 48

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

4.17

Example

Trang 49

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(0, 0)(1, 1)(2, 4)(3, 9)

DefinitionLet f be a function from the set A to the set B Thegraphof thefunction f is the set of ordered pairs {(a, b) | a ∈ A and f (a) = b}

Trang 50

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(0, 0)(1, 1)(2, 4)(3, 9)

DefinitionLet f be a function from the set A to the set B Thegraphof thefunction f is the set of ordered pairs {(a, b) | a ∈ A and f (a) = b}

Trang 51

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(0, 0)(1, 1)(2, 4)(3, 9)

Definition

Let f be a function from the set A to the set B Thegraphof the

function f is the set of ordered pairs {(a, b) | a ∈ A and f (a) = b}

Trang 52

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(3b) d−xe = −bxc(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 53

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(3b) d−xe = −bxc(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 54

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(2) x − 1 < bxc ≤ dxe < x + 1(3a) b−xc = −dxe

(3b) d−xe = −bxc(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 55

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(3a) b−xc = −dxe(3b) d−xe = −bxc(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 56

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(3b) d−xe = −bxc

(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 57

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

(3b) d−xe = −bxc(4a) bx + nc = bxc + n(4b) dx + ne = dxe + n

Trang 58

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 59

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 60

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 61

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 62

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 63

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Trang 64

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Functions One-to-one and Onto Functions Sequences and Summation Recursion

Ngày đăng: 02/04/2023, 06:12