Thông tin tài liệu
Functions Huynh Tuong Nguyen, Tran Huong Lan Chapter Functions Discrete Structures for Computing on 13 March 2012 Contents One-to-one and Onto Functions Sequences and Summation Recursion Huynh Tuong Nguyen, Tran Huong Lan Faculty of Computer Science and Engineering University of Technology - VNUHCM 4.1 Contents Functions Huynh Tuong Nguyen, Tran Huong Lan One-to-one and Onto Functions Contents One-to-one and Onto Functions Sequences and Summation Sequences and Summation Recursion Recursion 4.2 Introduction Functions Huynh Tuong Nguyen, Tran Huong Lan • Each student is assigned a grade from set {0, 0.1, 0.2, 0.3, , 9.9, 10.0} at the end of semester Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.3 Introduction Functions Huynh Tuong Nguyen, Tran Huong Lan • 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 Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.3 Introduction Functions Huynh Tuong Nguyen, Tran Huong Lan • 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, Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.3 Introduction Functions Huynh Tuong Nguyen, Tran Huong Lan • 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, Contents One-to-one and Onto Functions Sequences and Summation Recursion • Don’t worry! For discrete mathematics, we need to understand functions at a basic set theoretic level 4.3 Function Definition Functions Huynh Tuong Nguyen, Tran Huong Lan 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 Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.4 Function Definition Functions Huynh Tuong Nguyen, Tran Huong Lan 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 • f :A→B Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.4 Function Definition Functions Huynh Tuong Nguyen, Tran Huong Lan 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 • f :A→B • A: domain (miền xác định) of f Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.4 Function Definition Functions Huynh Tuong Nguyen, Tran Huong Lan 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 • f :A→B • A: domain (miền xác định) of f • B: codomain (miền giá trị) of f Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.4 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.50 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.51 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.52 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.53 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.54 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.55 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.56 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.57 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.58 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.59 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.60 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.61 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan Contents One-to-one and Onto Functions Sequences and Summation Recursion Moved disc from peg to peg 4.62 Functions Tower of Hanoi – Discs Huynh Tuong Nguyen, Tran Huong Lan OK Contents One-to-one and Onto Functions Sequences and Summation Recursion 4.63 Functions Tower of Hanoi Huynh Tuong Nguyen, Tran Huong Lan Algorithm procedure hanoi(n, A, B, C) if n = then move the disk from A to C else call hanoi(n − 1, A, C, B) move disk n from A to C call hanoi(n − 1, B, A, C) Contents One-to-one and Onto Functions Sequences and Summation Recurrence Relation H(n) = Recursion 2H(n − 1) + if n = if n > Recurrence Solving H(n) = 2n − If one move takes second, for n = 64 264 − ≈ × 1019 sec ≈ 500 billion years! 4.64
Ngày đăng: 09/12/2016, 07:31
Xem thêm: Giao trinh bai tap ds9connectivity , Giao trinh bai tap ds9connectivity