SlideShare a Scribd company logo
1 of 17
Download to read offline
Functions and Sequences - 02                                              CSC1001 Discrete Mathematics              1

 CHAPTER
                                                   ฟังก์ชนและลําดับ
                                                          ั
       2                                       (Functions and Sequences)

  1       Functions
1. Introduction to Functions
     In many instances we assign to each element of a set a particular element of a second set (which may be
the same as the first). For example, suppose that each student in a discrete mathematics class is assigned a
letter grade from the set {A, B, C, D, F}. And suppose that the grades are A for Adams, C for Chou, B for
Goodfriend, A for Rodriguez, and F for Stevens. This assignment of grades is illustrated in figure below.




                        Figure: Assignment of Grades in a Discrete Mathematics Class

     This assignment is an example of a function. The concept of a function is extremely important in
mathematics and computer science. For example, in discrete mathematics functions are used in the
definition of such discrete structures as sequences and strings. Functions are also used to represent how long
it takes a computer to solve problems of a given size. Many computer programs and subroutines are designed
to calculate values of functions. Functions are sometimes also called mappings or transformations.
  Definition 1
 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.

  Definition 2
 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, or image, 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.

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
2            CSC1001 Discrete Mathematics                                                  02 - Functions and Sequences


Example 1 (6 points) Function or not?
    1.                                      2.                                        3.
         1                    1                  1                      1                  1                      1
         2                    2                  2                      2                  2                      2
         3                    3                  3                      3                  3                      3
         4                    5                  4                      5                  4                      5
                              4                                         4                                         4

    4.                                      5.                                        6.
         1                    1                  1                      1                  1                      1
         2                    2                  2                      2                  2                      2
         3                    3                  3                      3                  3                      3
         4                    5                  4                      5                  4                      5
                              4                                         4                                         4

Example 2 (3 points) What are the domain, codomain, and range of the in the figure?

                                                 Solution: Let G be the function that assigns a grade to a student in our
                                                 discrete mathematics class. Note that G(Adams) = A, for instance. The
                                                 domain of G is the set {Adams, Chou, Goodfriend, Rodriguez, Stevens},
                                                 and the codomain is the set {A,B,C,D,F}. The range of G is the set
                                                 {A,B,C,F}, because each grade except D is assigned to some student.

Example 3 (3 points) What are the domain, codomain, and range of the function in the figure?
1                   1
2                   2
3                   3
4                   5
                    4
Example 4 (3 points) What are the domain, codomain, and range of the function in the figure?
1                   1
2                   2
3                   3
4                   5
                    4
Example 5 (3 points) What are the domain, codomain, and range of the function in the figure?
A                   1
B                   2
C                   3
D                   4
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                        เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                               CSC1001 Discrete Mathematics            3
Example 6 (3 points) Let f be the function that assigns the last two bits of a bit string of length 2 or greater to
that string. For example, f(11010) = 10. What are the domain, codomain, and range of this function?




Example 7 (3 points) Let f : Z → Z assign the square of an integer to this integer. Then, f(x) = x2, What are
the domain, codomain, and range of this function?




Example 8 (3 points) Let f : Z+   →   Z+ assign to f(x) = 2x + 1, What are the domain, codomain, and range of
this function?




Example 9 (3 points) Let f : N → R assign to f(x) =      x,   What are the domain, codomain, and range of this
function?




Example 10 (3 points) What are the domain, codomain, and range of functions are specified in Java pro-
gramming (represented using method).
public static int floor(double real) {
  //statements
}




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
4         CSC1001 Discrete Mathematics                                                 02 - Functions and Sequences


2. Addition and Multiplication of Functions
    Definition 3
    Let f1 and 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)               for all x ∈ A
        (f1f2)(x) = f1(x)f2(x)                     for all x ∈ A

Example 11 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x - x2. What are
the functions f1 + f2 and f1f2?




Example 12 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = x2 + 2x + 3 and f2(x) = x - 4.
What are the functions f1 + f2 and f1f2?




Example 13 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = 9x - 5 and f2(x) = x + 2. What are
the functions f1 + f2 and f1f2?




Example 14 (5 points) Let f1 and f2 be functions from R to R such that f1(x) =           x   - 4 and f2(x) = x3 + 2x2.
What are the functions f1 + f2 and f1f2?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                                 CSC1001 Discrete Mathematics               5
3. One-to-One Functions
   Some functions never assign the same value to two different domain elements. These functions are said to
be one-to-one function.
  Definition 4
 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: An One-to-One Function
Example 15 (6 points) One-to-one function or not?
 1.                                       2.                                       3.
      1                     1                  1                     1                  1                      1
      2                     2                  2                     2                  2                      2
      3                     3                  3                     3                  3                      3
      4                     5                  4                     5                  4                      5
                            4                                        4                                         4

 4.                                       5.                                       6.
      1                     1                  1                     1                  1                      1
      2                     2                  2                     2                  2                      2
      3                     3                  3                     3                  3                      3
      4                     5                  4                     5                  4                      5
                            4                                        4                                         4

Example 16 (1 points) 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 or not?, why?



Example 17 (1 points) Determine whether the function f(x) = x2 from the set of integers to the set of integers is
one-to-one or not?, why?



มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                     เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
6            CSC1001 Discrete Mathematics                                            02 - Functions and Sequences


Example 18 (1 points) Determine whether the function f(x) = x + 1 from the set of real numbers to itself is one-
to-one or not?, why?



Example 19 (1 points) Determine whether the function f(x) = 5x - 3 from the set of real numbers to itself is
one-to-one or not?, why?




4. Onto Functions
   For some functions the range and the codomain are equal. That is, every member of the codomain is the
image of some element of the domain. Functions with this property are called onto functions.
    Definition 5
    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: An Onto Function
Example 20 (6 points) Onto function or not?
    1.                                      2.                                  3.
         1                    1                   1                   1              1                      1
         2                    2                   2                   2              2                      2
         3                    3                   3                   3              3                      3
         4                    5                   4                                  4                      4
                              4

    4.                                      5.                                  6.
         1                                        1                                  1                      1
         2                    1                   2                   2              2                      2
         3                    2                   3                   3              3                      3
         4                                        4                   4              4                      5
                                                                      5                                     4


มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                                  CSC1001 Discrete Mathematics           7
Example 21 (1 points) 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 or not?, why?



Example 22 (1 points) Let f be the function from {a, b, c, d} to {1, 2, 3, 4} defined by f(a) = 2, f(b) = 1, f(c) = 1,
and f(d) = 4. Is f an onto function or not?, why?



Example 23 (1 points) Is the function f(x) = x2 from the set of integers to the set of integers onto or not?, why?



Example 24 (1 points) Is the function f(x) = x + 1 from Z → Z onto or not?, why?



     Definition 6
     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 25 (5 points) One-to-one function or not? / Onto function or not?
1.                        2.                     3.                      4.                      5.




Example 26 (1 points) 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?



Example 27 (1 points) Let f be the function from {a, b, c, d} to {1, 2, 3} with f(a) = 1, f(b) = 2, f(c) = 1, and f(d)
= 3. Is f a bijection?



มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
8         CSC1001 Discrete Mathematics                                                  02 - Functions and Sequences


5. Inverse Functions
    Definition 7
    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.




                                Figure: The Function f-1 Is the Inverse of Function f

Example 28 (2 points) Let f be the function from {a, b, c} to {1, 2, 3} such that f(a) = 2, f(b) = 3, and f(c) = 1.
What is its inverse?



Example 29 (5 points) Let f : Z → Z be such that f(x) = x + 1. What is its inverse?




Example 30 (5 points) Let f : Z → Z be such that f(x) = 4x - 17. What is its inverse?




Example 31 (5 points) Let f : R → R be such that f(x) = x2 + 5. What is its inverse?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                     เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                                 CSC1001 Discrete Mathematics             9
6. Composite Functions
  Definition 8
 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 for all a A by f o g, is defined by (f o g)(a) = f(g(a))




                                 Figure: The Composition of the Functions f and g

Example 32 (4 points) Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c, and g(c)
= a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f(a) = 3, f(b) = 2, and f(c) = 1. What
is the composition of f and g, and what is the composition of g and f ?




Example 33 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by
f(x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the composition of g and f ?




Example 34 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by
f(x) = x2 + 1 and g(x) = x - 3. What is the composition of f and g? What is the composition of g and f ?

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                     เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
10       CSC1001 Discrete Mathematics                                               02 - Functions and Sequences




Example 35 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by
f(x) = 3x2 – 4x + 2 and g(x) = x + 2. What is the composition of f and g? What is the composition of g and f ?




7. Floor and Ceiling Functions
 Definition 9
 The floor function assigns to the real number x the largest integer that is less than or equal to x. The value
 of the floor function at x is denoted by ⎣x ⎦ . The ceiling function assigns to the real number x the smallest
 integer that is greater than or equal to x. The value of the ceiling function at x is denoted by ⎡x ⎤ .

Example 36 (10 points) Find some values of the floor and ceiling functions
⎢1⎥                                                    ⎡1⎤
⎢2⎥   = ……………………………………………..                            ⎢2⎥   = ……………………………………………..
⎣ ⎦                                                    ⎢ ⎥
⎢ 1⎥                                                   ⎡ 1⎤
⎢− 2 ⎥   = ……………………………………………..                         ⎢− 2 ⎥   = ……………………………………………..
⎣ ⎦                                                    ⎢ ⎥

⎣3.1⎦ = ……………………………………………..                            ⎡3.1⎤ = ……………………………………………..

⎣7⎦ =     ……………………………………………..                          ⎡7⎤ = ……………………………………………..

⎣4.9⎦ = ……………………………………………..                            ⎡4.9⎤ = ……………………………………………..

⎣9.5⎦ = ……………………………………………..                            ⎡9.5⎤ = ……………………………………………..

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                 เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                                CSC1001 Discrete Mathematics          11
Example 37 (5 points) Data stored on a computer disk or transmitted over a data network are usually repre-
sented as a string of bytes. Each byte is made up of 8 bits. How many bytes are required to encode 100 bits
of data?




Example 38 (5 points) In asynchronous transfer mode (ATM) (a communications protocol used on backbone
networks) data are organized into cells of 53 bytes. How many ATM cells can be transmitted in 1 minute over
a connection that transmits data at the rate of 500 kilobits per second?




     2      Sequences
1. Introduction to Sequences
    A sequence is a discrete structure used to represent an ordered list of elements. For example, 1, 2, 3, 5,
8 is a sequence with five terms and 1, 3, 9, 27, 81 , . . . , 3n, . . . is an infinite sequence. They can be also
used to represent solutions to certain counting problems and 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.
  Definition 1
 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. We use the notation {an} to describe the sequence.

Example 1 (4 points) Can you show the list of terms of the sequence below, beginning with a1 to a5
            1
1)   an =
            n



2)   an = 2 n − 1




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
12          CSC1001 Discrete Mathematics                                        02 - Functions and Sequences


2. Geometric Progression and Arithmetic Progression
 Definition 2
 A geometric progression is a sequence of the form
        a, ar, ar2, . . . , arn, . . .
 where the initial term a and the common ratio r are real numbers.

Example 2 (8 points) Can you show the list of terms of the sequence below, beginning with a1 to a5
1) a n = (−1) n


2)   an = 2 ⋅ 3n


                     n
              ⎛1⎞
3)   an = 5 ⋅ ⎜ ⎟
              ⎝2⎠


              (−1) n
4)   an = −
                2



 Definition 3
 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.

Example 3 (8 points) Can you show the list of terms of the sequence below, beginning with a1 to a5
1) a n = −1 + 4n


2)   a n = 7 − 3n



                1
3)   an = 5 +     n
                2


            1
4)   an =     − 2n
            4



มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                             เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                                  CSC1001 Discrete Mathematics             13
3. Recurrence Relations
  Definition 4
 A recurrence relation for the sequence {an} is an equation that expresses an in terms of one or more of the
 previous terms of the sequence, namely, a0, a1, . . . , an-1, for all integers n with n ≥ n0, where n0 is a
 nonnegative integer. A sequence is called a solution of a recurrence relation if its terms satisfy the
 recurrence relation. (A recurrence relation is said to recursively define a sequence.

Example 4 (2 points) Let {an} be a sequence that satisfies the recurrence relation an = an-1 + 3 for n = 1, 2, 3,
4, . . . , and suppose that a0 = 2. What are a1, a2, a3, a4, and a5?



Example 5 (2 points) Let {an} be a sequence that satisfies the recurrence relation an = an-1 + an-2 for n = 2, 3,
4, . . . , and suppose that a0 = 3 and a1 = 5. What are a1, a2, and a3?



  Definition 5
 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, . . . .

Example 6 (2 points) Find the Fibonacci numbers f2, f3, f4, f5, and f6

 f2 =
 f3 =
 f4 =
 f5 =
 f6 =

Example 7 (2 points) Suppose that {an} is the sequence of integers defined by an = n!, the value of the
factorial function at the integer n, where n = 1, 2, 3, . . .. Because n! = n(n - 1)(n - 2) . . .2・1 = n(n - 1)! = nan-1,
find the sequence of factorials a2 to a5 with the initial condition a1 = 1.




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                      เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
14      CSC1001 Discrete Mathematics                                                02 - Functions and Sequences


Example 8 (2 points) Find formulae for the sequences with the following first five terms 1, 1/2, 1/4, 1/8, 1/16




Example 9 (2 points) Find formulae for the sequences with the following first five terms 1, 3, 5, 7, 9




Example 10 (2 points) Find formulae for the sequences with the following first five terms 1, -1, 1, -1, 1.




Example 11 (2 points) Find formulae for the sequences with the following first five terms 1, 4, 9, 16, 25.




Example 12 (2 points) Find formulae for the sequences with the following first five terms 1, 7, 25, 79, 241.




Example 13 (2 points) Find formulae for the sequences with the following first five terms 5, 11, 17, 23, 29.




Example 14 (2 points) Find terms number 18 of a sequence if the first 10 terms are 1, 2, 2, 3, 3, 3, 4, 4, 4, 4?




Example 15 (2 points) Find terms number 15 of a sequence if the first 8 terms are 1, 3, 4, 7, 11, 18, 29, 47?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                 เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                                          CSC1001 Discrete Mathematics         15
4. Summations
  Definition 6
 The addition of the terms of a sequence is summation. 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
           n

          ∑a
          i =m
                 i       or   ∑   m ≤i ≤ n
                                             ai

 (read as the sum from i = m to i = n of ai )

Example 16 (2 points) Use summation notation to express the sum of the first 100 terms of the sequence {ai},
where ai = 1/i for i = 1, 2, 3, . . . .




Example 17 (2 points) Use summation notation to express the sum of the first 500 terms of the sequence {ai},
where ai = 2i3 + 4i - 5 for i = 1, 2, 3, . . . .




                                                             5
Example 18 (2 points) What is the value of ∑ i 2 .
                                                         i =1




                                                             8
Example 19 (2 points) What is the value of ∑ (3k − 4) .
                                                         k =4




  Definition 7
 If a and r are real numbers and r ≠ 0, then
                        ⎧(n + 1)a                 if r = 1
                     n
                        ⎪
          sn =   ∑ ar = ⎨ ar n+1 − a
                         i

                                                  if r ≠ 1
                 i =0   ⎪
                        ⎩ r −1
 Sums of terms of geometric progressions called geometric series

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                             เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
16              CSC1001 Discrete Mathematics                                                02 - Functions and Sequences


Example 20 (2 points) Given         an = 2 ⋅ 3n    find s10




Example 21 (2 points) Given         a n = −(1n )   find s10




 Definition 8
 Double summations arise in many contexts (as in the analysis of nested loops in computer programs). An
 example of a double summation is
                  m    n

                 ∑∑ ij
                 i =1 j =1



                                                               4    3
Example 22 (4 points) Find the double summation of ∑∑ ij
                                                              i =1 j =1




                                                               4    3
Example 23 (4 points) Find the double summation of ∑∑ (i +                   j)
                                                              i =1 j =1




5. Summation Formulae
                             Summations                                                 Closed Form
                                                                   ar n +1 − a
  n

 ∑ ar
 k =0
            k
                (r ≠ 0)
                                                                     r −1
                                                                               ,r ≠ 1
  n
                                                                   n(n + 1)
 ∑k
 k =1                                                                  2
  n
                                                                   n(n + 1)(2n + 1)
 ∑k
 k =1
        2

                                                                            6
                                                                   n 2 (n + 1) 2
  n

 ∑k
 k =1
        3

                                                                         4

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                         เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Functions and Sequences - 02                           CSC1001 Discrete Mathematics        17
                               100
Example 24 (4 points) Find ∑ k 2
                             k =50




                                20
Example 25 (4 points) Find ∑ k 3
                             k =10




                               15
Example 26 (4 points) Find ∑ k
                               k =8




                               10      25
Example 27 (8 points) Find ∑ k 2 + ∑ k 2
                               k =5   k =15




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)             เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี

More Related Content

What's hot

Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 02 official
Introductory maths analysis   chapter 02 officialIntroductory maths analysis   chapter 02 official
Introductory maths analysis chapter 02 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 17 official
Introductory maths analysis   chapter 17 officialIntroductory maths analysis   chapter 17 official
Introductory maths analysis chapter 17 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 04 official
Introductory maths analysis   chapter 04 officialIntroductory maths analysis   chapter 04 official
Introductory maths analysis chapter 04 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 03 official
Introductory maths analysis   chapter 03 officialIntroductory maths analysis   chapter 03 official
Introductory maths analysis chapter 03 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 officialEvert Sandye Taasiringan
 
Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii Mohammad Imran
 
Introductory maths analysis chapter 10 official
Introductory maths analysis   chapter 10 officialIntroductory maths analysis   chapter 10 official
Introductory maths analysis chapter 10 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 14 official
Introductory maths analysis   chapter 14 officialIntroductory maths analysis   chapter 14 official
Introductory maths analysis chapter 14 officialEvert Sandye Taasiringan
 
IIT JAM MATH 2019 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2019 Question Paper | Sourav Sir's ClassesIIT JAM MATH 2019 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2019 Question Paper | Sourav Sir's ClassesSOURAV DAS
 
Day 13 graphing linear equations from tables
Day 13 graphing linear equations from tablesDay 13 graphing linear equations from tables
Day 13 graphing linear equations from tablesErik Tjersland
 
11 applications of factoring
11 applications of factoring11 applications of factoring
11 applications of factoringelem-alg-sample
 
Mc ty-explogfns-2009-1
Mc ty-explogfns-2009-1Mc ty-explogfns-2009-1
Mc ty-explogfns-2009-1supoteta
 
Algebra 1 chapter 2 notes
Algebra 1 chapter 2 notesAlgebra 1 chapter 2 notes
Algebra 1 chapter 2 noteshhennigan
 

What's hot (17)

Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 official
 
Introductory maths analysis chapter 02 official
Introductory maths analysis   chapter 02 officialIntroductory maths analysis   chapter 02 official
Introductory maths analysis chapter 02 official
 
Introductory maths analysis chapter 17 official
Introductory maths analysis   chapter 17 officialIntroductory maths analysis   chapter 17 official
Introductory maths analysis chapter 17 official
 
Introductory maths analysis chapter 04 official
Introductory maths analysis   chapter 04 officialIntroductory maths analysis   chapter 04 official
Introductory maths analysis chapter 04 official
 
Introductory maths analysis chapter 03 official
Introductory maths analysis   chapter 03 officialIntroductory maths analysis   chapter 03 official
Introductory maths analysis chapter 03 official
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 official
 
Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii
 
Introductory maths analysis chapter 10 official
Introductory maths analysis   chapter 10 officialIntroductory maths analysis   chapter 10 official
Introductory maths analysis chapter 10 official
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 official
 
International Journal of Engineering Inventions (IJEI)
International Journal of Engineering Inventions (IJEI)International Journal of Engineering Inventions (IJEI)
International Journal of Engineering Inventions (IJEI)
 
Introductory maths analysis chapter 14 official
Introductory maths analysis   chapter 14 officialIntroductory maths analysis   chapter 14 official
Introductory maths analysis chapter 14 official
 
IIT JAM MATH 2019 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2019 Question Paper | Sourav Sir's ClassesIIT JAM MATH 2019 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2019 Question Paper | Sourav Sir's Classes
 
Day 13 graphing linear equations from tables
Day 13 graphing linear equations from tablesDay 13 graphing linear equations from tables
Day 13 graphing linear equations from tables
 
Functions
FunctionsFunctions
Functions
 
11 applications of factoring
11 applications of factoring11 applications of factoring
11 applications of factoring
 
Mc ty-explogfns-2009-1
Mc ty-explogfns-2009-1Mc ty-explogfns-2009-1
Mc ty-explogfns-2009-1
 
Algebra 1 chapter 2 notes
Algebra 1 chapter 2 notesAlgebra 1 chapter 2 notes
Algebra 1 chapter 2 notes
 

Viewers also liked

Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesWongyos Keardsri
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to managementBilal Amjad
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityWongyos Keardsri
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsWongyos Keardsri
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 CountingWongyos Keardsri
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panReefear Ajang
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 
Bab 3 Tamadun Melayu Baru
Bab 3  Tamadun Melayu BaruBab 3  Tamadun Melayu Baru
Bab 3 Tamadun Melayu Baruwan arizwnb
 

Viewers also liked (20)

Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to management
 
Discrete-Chapter 01 Sets
Discrete-Chapter 01 SetsDiscrete-Chapter 01 Sets
Discrete-Chapter 01 Sets
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 Probability
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 Counting
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and pan
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Set Operations
Set OperationsSet Operations
Set Operations
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Set Theory Presentation
Set Theory PresentationSet Theory Presentation
Set Theory Presentation
 
Bab 5
Bab 5Bab 5
Bab 5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Bab 3
Bab 3Bab 3
Bab 3
 
Bab 3 Tamadun Melayu Baru
Bab 3  Tamadun Melayu BaruBab 3  Tamadun Melayu Baru
Bab 3 Tamadun Melayu Baru
 
Bab 4
Bab 4Bab 4
Bab 4
 
Bab 2
Bab 2Bab 2
Bab 2
 

Similar to Discrete-Chapter 02 Functions and Sequences

Bab 4 dan bab 5 algebra and trigonometry
Bab 4 dan bab 5 algebra and trigonometryBab 4 dan bab 5 algebra and trigonometry
Bab 4 dan bab 5 algebra and trigonometryCiciPajarakan
 
Chapter2 functionsandgraphs-151003144959-lva1-app6891
Chapter2 functionsandgraphs-151003144959-lva1-app6891Chapter2 functionsandgraphs-151003144959-lva1-app6891
Chapter2 functionsandgraphs-151003144959-lva1-app6891Cleophas Rwemera
 
Lesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptLesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptssuser78a386
 
Intro to Domain, Range, and Functions.
Intro to Domain, Range, and Functions.Intro to Domain, Range, and Functions.
Intro to Domain, Range, and Functions.Colomduran
 
Evaluating functions
Evaluating functionsEvaluating functions
Evaluating functionsEFREN ARCHIDE
 
Determinants, Properties and IMT
Determinants, Properties and IMTDeterminants, Properties and IMT
Determinants, Properties and IMTPrasanth George
 
2. diferensial hiperbolik
2. diferensial hiperbolik2. diferensial hiperbolik
2. diferensial hiperbolikSophia Sumbung
 
Prac 2 rolle's thm
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thmHimani Asija
 
2 1 Bzca5e
2 1 Bzca5e2 1 Bzca5e
2 1 Bzca5esilvia
 
OPERATIONS ON FUNCTIONS.pptx
OPERATIONS ON FUNCTIONS.pptxOPERATIONS ON FUNCTIONS.pptx
OPERATIONS ON FUNCTIONS.pptxJohnlery Guzman
 
College algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manualCollege algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manualrochidavander
 
M141 midtermreviewch2ch3su10
M141 midtermreviewch2ch3su10M141 midtermreviewch2ch3su10
M141 midtermreviewch2ch3su10Jessica Conner
 
(7) Lesson 5.3 - Properties of Operations
(7) Lesson 5.3 - Properties of Operations(7) Lesson 5.3 - Properties of Operations
(7) Lesson 5.3 - Properties of Operationswzuri
 
Admission for b.tech
Admission for b.techAdmission for b.tech
Admission for b.techEdhole.com
 
Lesson 2 - Functions and their Graphs - NOTES.ppt
Lesson 2 - Functions and their Graphs - NOTES.pptLesson 2 - Functions and their Graphs - NOTES.ppt
Lesson 2 - Functions and their Graphs - NOTES.pptJaysonMagalong
 

Similar to Discrete-Chapter 02 Functions and Sequences (20)

Bab 4 dan bab 5 algebra and trigonometry
Bab 4 dan bab 5 algebra and trigonometryBab 4 dan bab 5 algebra and trigonometry
Bab 4 dan bab 5 algebra and trigonometry
 
1.2.4
1.2.41.2.4
1.2.4
 
Chapter2 functionsandgraphs-151003144959-lva1-app6891
Chapter2 functionsandgraphs-151003144959-lva1-app6891Chapter2 functionsandgraphs-151003144959-lva1-app6891
Chapter2 functionsandgraphs-151003144959-lva1-app6891
 
Chapter 2 - Functions and Graphs
Chapter 2 - Functions and GraphsChapter 2 - Functions and Graphs
Chapter 2 - Functions and Graphs
 
Lesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptLesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.ppt
 
Intro to Domain, Range, and Functions.
Intro to Domain, Range, and Functions.Intro to Domain, Range, and Functions.
Intro to Domain, Range, and Functions.
 
Evaluating functions
Evaluating functionsEvaluating functions
Evaluating functions
 
Determinants, Properties and IMT
Determinants, Properties and IMTDeterminants, Properties and IMT
Determinants, Properties and IMT
 
2. diferensial hiperbolik
2. diferensial hiperbolik2. diferensial hiperbolik
2. diferensial hiperbolik
 
Prac 2 rolle's thm
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thm
 
2 1 Bzca5e
2 1 Bzca5e2 1 Bzca5e
2 1 Bzca5e
 
OPERATIONS ON FUNCTIONS.pptx
OPERATIONS ON FUNCTIONS.pptxOPERATIONS ON FUNCTIONS.pptx
OPERATIONS ON FUNCTIONS.pptx
 
Week 3 - Trigonometry
Week 3 - TrigonometryWeek 3 - Trigonometry
Week 3 - Trigonometry
 
Module functions
Module   functionsModule   functions
Module functions
 
College algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manualCollege algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manual
 
M141 midtermreviewch2ch3su10
M141 midtermreviewch2ch3su10M141 midtermreviewch2ch3su10
M141 midtermreviewch2ch3su10
 
(7) Lesson 5.3 - Properties of Operations
(7) Lesson 5.3 - Properties of Operations(7) Lesson 5.3 - Properties of Operations
(7) Lesson 5.3 - Properties of Operations
 
Admission for b.tech
Admission for b.techAdmission for b.tech
Admission for b.tech
 
Lesson 2 - Functions and their Graphs - NOTES.ppt
Lesson 2 - Functions and their Graphs - NOTES.pptLesson 2 - Functions and their Graphs - NOTES.ppt
Lesson 2 - Functions and their Graphs - NOTES.ppt
 
Basic algebra
Basic algebraBasic algebra
Basic algebra
 

More from Wongyos Keardsri

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramWongyos Keardsri
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsWongyos Keardsri
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingWongyos Keardsri
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemWongyos Keardsri
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IWongyos Keardsri
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowWongyos Keardsri
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsWongyos Keardsri
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 RecursionsWongyos Keardsri
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysWongyos Keardsri
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsWongyos Keardsri
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysWongyos Keardsri
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File OperationsWongyos Keardsri
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String OperationsWongyos Keardsri
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsWongyos Keardsri
 

More from Wongyos Keardsri (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional Arrays
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and Applications
 
Java-Chapter 08 Methods
Java-Chapter 08 MethodsJava-Chapter 08 Methods
Java-Chapter 08 Methods
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional Arrays
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File Operations
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String Operations
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration Statements
 

Discrete-Chapter 02 Functions and Sequences

  • 1. Functions and Sequences - 02 CSC1001 Discrete Mathematics 1 CHAPTER ฟังก์ชนและลําดับ ั 2 (Functions and Sequences) 1 Functions 1. Introduction to Functions In many instances we assign to each element of a set a particular element of a second set (which may be the same as the first). For example, suppose that each student in a discrete mathematics class is assigned a letter grade from the set {A, B, C, D, F}. And suppose that the grades are A for Adams, C for Chou, B for Goodfriend, A for Rodriguez, and F for Stevens. This assignment of grades is illustrated in figure below. Figure: Assignment of Grades in a Discrete Mathematics Class This assignment is an example of a function. The concept of a function is extremely important in mathematics and computer science. For example, in discrete mathematics functions are used in the definition of such discrete structures as sequences and strings. Functions are also used to represent how long it takes a computer to solve problems of a given size. Many computer programs and subroutines are designed to calculate values of functions. Functions are sometimes also called mappings or transformations. Definition 1 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. Definition 2 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, or image, 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. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 2. 2 CSC1001 Discrete Mathematics 02 - Functions and Sequences Example 1 (6 points) Function or not? 1. 2. 3. 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 5 4 5 4 5 4 4 4 4. 5. 6. 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 5 4 5 4 5 4 4 4 Example 2 (3 points) What are the domain, codomain, and range of the in the figure? Solution: Let G be the function that assigns a grade to a student in our discrete mathematics class. Note that G(Adams) = A, for instance. The domain of G is the set {Adams, Chou, Goodfriend, Rodriguez, Stevens}, and the codomain is the set {A,B,C,D,F}. The range of G is the set {A,B,C,F}, because each grade except D is assigned to some student. Example 3 (3 points) What are the domain, codomain, and range of the function in the figure? 1 1 2 2 3 3 4 5 4 Example 4 (3 points) What are the domain, codomain, and range of the function in the figure? 1 1 2 2 3 3 4 5 4 Example 5 (3 points) What are the domain, codomain, and range of the function in the figure? A 1 B 2 C 3 D 4 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 3. Functions and Sequences - 02 CSC1001 Discrete Mathematics 3 Example 6 (3 points) Let f be the function that assigns the last two bits of a bit string of length 2 or greater to that string. For example, f(11010) = 10. What are the domain, codomain, and range of this function? Example 7 (3 points) Let f : Z → Z assign the square of an integer to this integer. Then, f(x) = x2, What are the domain, codomain, and range of this function? Example 8 (3 points) Let f : Z+ → Z+ assign to f(x) = 2x + 1, What are the domain, codomain, and range of this function? Example 9 (3 points) Let f : N → R assign to f(x) = x, What are the domain, codomain, and range of this function? Example 10 (3 points) What are the domain, codomain, and range of functions are specified in Java pro- gramming (represented using method). public static int floor(double real) { //statements } มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 4. 4 CSC1001 Discrete Mathematics 02 - Functions and Sequences 2. Addition and Multiplication of Functions Definition 3 Let f1 and 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) for all x ∈ A (f1f2)(x) = f1(x)f2(x) for all x ∈ A Example 11 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x - x2. What are the functions f1 + f2 and f1f2? Example 12 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = x2 + 2x + 3 and f2(x) = x - 4. What are the functions f1 + f2 and f1f2? Example 13 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = 9x - 5 and f2(x) = x + 2. What are the functions f1 + f2 and f1f2? Example 14 (5 points) Let f1 and f2 be functions from R to R such that f1(x) = x - 4 and f2(x) = x3 + 2x2. What are the functions f1 + f2 and f1f2? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 5. Functions and Sequences - 02 CSC1001 Discrete Mathematics 5 3. One-to-One Functions Some functions never assign the same value to two different domain elements. These functions are said to be one-to-one function. Definition 4 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: An One-to-One Function Example 15 (6 points) One-to-one function or not? 1. 2. 3. 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 5 4 5 4 5 4 4 4 4. 5. 6. 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 5 4 5 4 5 4 4 4 Example 16 (1 points) 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 or not?, why? Example 17 (1 points) Determine whether the function f(x) = x2 from the set of integers to the set of integers is one-to-one or not?, why? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 6. 6 CSC1001 Discrete Mathematics 02 - Functions and Sequences Example 18 (1 points) Determine whether the function f(x) = x + 1 from the set of real numbers to itself is one- to-one or not?, why? Example 19 (1 points) Determine whether the function f(x) = 5x - 3 from the set of real numbers to itself is one-to-one or not?, why? 4. Onto Functions For some functions the range and the codomain are equal. That is, every member of the codomain is the image of some element of the domain. Functions with this property are called onto functions. Definition 5 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: An Onto Function Example 20 (6 points) Onto function or not? 1. 2. 3. 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 5 4 4 4 4 4. 5. 6. 1 1 1 1 2 1 2 2 2 2 3 2 3 3 3 3 4 4 4 4 5 5 4 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 7. Functions and Sequences - 02 CSC1001 Discrete Mathematics 7 Example 21 (1 points) 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 or not?, why? Example 22 (1 points) Let f be the function from {a, b, c, d} to {1, 2, 3, 4} defined by f(a) = 2, f(b) = 1, f(c) = 1, and f(d) = 4. Is f an onto function or not?, why? Example 23 (1 points) Is the function f(x) = x2 from the set of integers to the set of integers onto or not?, why? Example 24 (1 points) Is the function f(x) = x + 1 from Z → Z onto or not?, why? Definition 6 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 25 (5 points) One-to-one function or not? / Onto function or not? 1. 2. 3. 4. 5. Example 26 (1 points) 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? Example 27 (1 points) Let f be the function from {a, b, c, d} to {1, 2, 3} with f(a) = 1, f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 8. 8 CSC1001 Discrete Mathematics 02 - Functions and Sequences 5. Inverse Functions Definition 7 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. Figure: The Function f-1 Is the Inverse of Function f Example 28 (2 points) Let f be the function from {a, b, c} to {1, 2, 3} such that f(a) = 2, f(b) = 3, and f(c) = 1. What is its inverse? Example 29 (5 points) Let f : Z → Z be such that f(x) = x + 1. What is its inverse? Example 30 (5 points) Let f : Z → Z be such that f(x) = 4x - 17. What is its inverse? Example 31 (5 points) Let f : R → R be such that f(x) = x2 + 5. What is its inverse? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 9. Functions and Sequences - 02 CSC1001 Discrete Mathematics 9 6. Composite Functions Definition 8 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 for all a A by f o g, is defined by (f o g)(a) = f(g(a)) Figure: The Composition of the Functions f and g Example 32 (4 points) Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c, and g(c) = a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f(a) = 3, f(b) = 2, and f(c) = 1. What is the composition of f and g, and what is the composition of g and f ? Example 33 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by f(x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the composition of g and f ? Example 34 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by f(x) = x2 + 1 and g(x) = x - 3. What is the composition of f and g? What is the composition of g and f ? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 10. 10 CSC1001 Discrete Mathematics 02 - Functions and Sequences Example 35 (10 points) Let f and g be the functions from the set of integers to the set of integers defined by f(x) = 3x2 – 4x + 2 and g(x) = x + 2. What is the composition of f and g? What is the composition of g and f ? 7. Floor and Ceiling Functions Definition 9 The floor function assigns to the real number x the largest integer that is less than or equal to x. The value of the floor function at x is denoted by ⎣x ⎦ . The ceiling function assigns to the real number x the smallest integer that is greater than or equal to x. The value of the ceiling function at x is denoted by ⎡x ⎤ . Example 36 (10 points) Find some values of the floor and ceiling functions ⎢1⎥ ⎡1⎤ ⎢2⎥ = …………………………………………….. ⎢2⎥ = …………………………………………….. ⎣ ⎦ ⎢ ⎥ ⎢ 1⎥ ⎡ 1⎤ ⎢− 2 ⎥ = …………………………………………….. ⎢− 2 ⎥ = …………………………………………….. ⎣ ⎦ ⎢ ⎥ ⎣3.1⎦ = …………………………………………….. ⎡3.1⎤ = …………………………………………….. ⎣7⎦ = …………………………………………….. ⎡7⎤ = …………………………………………….. ⎣4.9⎦ = …………………………………………….. ⎡4.9⎤ = …………………………………………….. ⎣9.5⎦ = …………………………………………….. ⎡9.5⎤ = …………………………………………….. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 11. Functions and Sequences - 02 CSC1001 Discrete Mathematics 11 Example 37 (5 points) Data stored on a computer disk or transmitted over a data network are usually repre- sented as a string of bytes. Each byte is made up of 8 bits. How many bytes are required to encode 100 bits of data? Example 38 (5 points) In asynchronous transfer mode (ATM) (a communications protocol used on backbone networks) data are organized into cells of 53 bytes. How many ATM cells can be transmitted in 1 minute over a connection that transmits data at the rate of 500 kilobits per second? 2 Sequences 1. Introduction to Sequences A sequence is a discrete structure used to represent an ordered list of elements. For example, 1, 2, 3, 5, 8 is a sequence with five terms and 1, 3, 9, 27, 81 , . . . , 3n, . . . is an infinite sequence. They can be also used to represent solutions to certain counting problems and 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. Definition 1 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. We use the notation {an} to describe the sequence. Example 1 (4 points) Can you show the list of terms of the sequence below, beginning with a1 to a5 1 1) an = n 2) an = 2 n − 1 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 12. 12 CSC1001 Discrete Mathematics 02 - Functions and Sequences 2. Geometric Progression and Arithmetic Progression Definition 2 A geometric progression is a sequence of the form a, ar, ar2, . . . , arn, . . . where the initial term a and the common ratio r are real numbers. Example 2 (8 points) Can you show the list of terms of the sequence below, beginning with a1 to a5 1) a n = (−1) n 2) an = 2 ⋅ 3n n ⎛1⎞ 3) an = 5 ⋅ ⎜ ⎟ ⎝2⎠ (−1) n 4) an = − 2 Definition 3 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. Example 3 (8 points) Can you show the list of terms of the sequence below, beginning with a1 to a5 1) a n = −1 + 4n 2) a n = 7 − 3n 1 3) an = 5 + n 2 1 4) an = − 2n 4 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 13. Functions and Sequences - 02 CSC1001 Discrete Mathematics 13 3. Recurrence Relations Definition 4 A recurrence relation for the sequence {an} is an equation that expresses an in terms of one or more of the previous terms of the sequence, namely, a0, a1, . . . , an-1, for all integers n with n ≥ n0, where n0 is a nonnegative integer. A sequence is called a solution of a recurrence relation if its terms satisfy the recurrence relation. (A recurrence relation is said to recursively define a sequence. Example 4 (2 points) Let {an} be a sequence that satisfies the recurrence relation an = an-1 + 3 for n = 1, 2, 3, 4, . . . , and suppose that a0 = 2. What are a1, a2, a3, a4, and a5? Example 5 (2 points) Let {an} be a sequence that satisfies the recurrence relation an = an-1 + an-2 for n = 2, 3, 4, . . . , and suppose that a0 = 3 and a1 = 5. What are a1, a2, and a3? Definition 5 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, . . . . Example 6 (2 points) Find the Fibonacci numbers f2, f3, f4, f5, and f6 f2 = f3 = f4 = f5 = f6 = Example 7 (2 points) Suppose that {an} is the sequence of integers defined by an = n!, the value of the factorial function at the integer n, where n = 1, 2, 3, . . .. Because n! = n(n - 1)(n - 2) . . .2・1 = n(n - 1)! = nan-1, find the sequence of factorials a2 to a5 with the initial condition a1 = 1. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 14. 14 CSC1001 Discrete Mathematics 02 - Functions and Sequences Example 8 (2 points) Find formulae for the sequences with the following first five terms 1, 1/2, 1/4, 1/8, 1/16 Example 9 (2 points) Find formulae for the sequences with the following first five terms 1, 3, 5, 7, 9 Example 10 (2 points) Find formulae for the sequences with the following first five terms 1, -1, 1, -1, 1. Example 11 (2 points) Find formulae for the sequences with the following first five terms 1, 4, 9, 16, 25. Example 12 (2 points) Find formulae for the sequences with the following first five terms 1, 7, 25, 79, 241. Example 13 (2 points) Find formulae for the sequences with the following first five terms 5, 11, 17, 23, 29. Example 14 (2 points) Find terms number 18 of a sequence if the first 10 terms are 1, 2, 2, 3, 3, 3, 4, 4, 4, 4? Example 15 (2 points) Find terms number 15 of a sequence if the first 8 terms are 1, 3, 4, 7, 11, 18, 29, 47? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 15. Functions and Sequences - 02 CSC1001 Discrete Mathematics 15 4. Summations Definition 6 The addition of the terms of a sequence is summation. 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 n ∑a i =m i or ∑ m ≤i ≤ n ai (read as the sum from i = m to i = n of ai ) Example 16 (2 points) Use summation notation to express the sum of the first 100 terms of the sequence {ai}, where ai = 1/i for i = 1, 2, 3, . . . . Example 17 (2 points) Use summation notation to express the sum of the first 500 terms of the sequence {ai}, where ai = 2i3 + 4i - 5 for i = 1, 2, 3, . . . . 5 Example 18 (2 points) What is the value of ∑ i 2 . i =1 8 Example 19 (2 points) What is the value of ∑ (3k − 4) . k =4 Definition 7 If a and r are real numbers and r ≠ 0, then ⎧(n + 1)a if r = 1 n ⎪ sn = ∑ ar = ⎨ ar n+1 − a i if r ≠ 1 i =0 ⎪ ⎩ r −1 Sums of terms of geometric progressions called geometric series มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 16. 16 CSC1001 Discrete Mathematics 02 - Functions and Sequences Example 20 (2 points) Given an = 2 ⋅ 3n find s10 Example 21 (2 points) Given a n = −(1n ) find s10 Definition 8 Double summations arise in many contexts (as in the analysis of nested loops in computer programs). An example of a double summation is m n ∑∑ ij i =1 j =1 4 3 Example 22 (4 points) Find the double summation of ∑∑ ij i =1 j =1 4 3 Example 23 (4 points) Find the double summation of ∑∑ (i + j) i =1 j =1 5. Summation Formulae Summations Closed Form ar n +1 − a n ∑ ar k =0 k (r ≠ 0) r −1 ,r ≠ 1 n n(n + 1) ∑k k =1 2 n n(n + 1)(2n + 1) ∑k k =1 2 6 n 2 (n + 1) 2 n ∑k k =1 3 4 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 17. Functions and Sequences - 02 CSC1001 Discrete Mathematics 17 100 Example 24 (4 points) Find ∑ k 2 k =50 20 Example 25 (4 points) Find ∑ k 3 k =10 15 Example 26 (4 points) Find ∑ k k =8 10 25 Example 27 (8 points) Find ∑ k 2 + ∑ k 2 k =5 k =15 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี