Download presentation
Presentation is loading. Please wait.
Published byRandell Dorsey Modified over 9 years ago
2
Discrete math
3
Bijections 2 A function f is a one-to-one correspondence, or a bijection or reversible, or invertible, iff it is both one-to-one and onto.
4
Inverse of a Function 3 For bijections f:A B, there exists an inverse of f, written f 1 :B A, which is the unique function such that:
5
The Identity Function 4 For any domain A, the identity function I:A A (variously written, I A, 1, 1 A ) is the unique function such that a A: I(a)=a. Note that the identity function is both one-to-one and onto (bijective).
6
Identity Function Illustrations 5 The identity function: Domain and range x y
8
Inverse of a function
9
Example
10
9 Sequences
11
10 Sequences A sequence represents an ordered list of elements.A sequence represents an ordered list of elements. e.g., {a n } = 1, 1/2, 1/3, 1/4, … e.g., {a n } = 1, 1/2, 1/3, 1/4, … Formally: A sequence or series {a n } is identified with a generating function f:S A for some subset S N and for some set A.Formally: A sequence or series {a n } is identified with a generating function f:S A for some subset S N and for some set A. e.g., a n = f(n) = 1/n. e.g., a n = f(n) = 1/n. The symbol a n denotes f(n), also called term n of the sequence.The symbol a n denotes f(n), also called term n of the sequence.
12
11 Example with Repetitions Consider the sequence b n = ( 1) n.Consider the sequence b n = ( 1) n. {b n } = 1, 1, 1, 1, …{b n } = 1, 1, 1, 1, … {b n } denotes an infinite sequence of 1’s and 1’s, not the 2-element set {1, 1}.{b n } denotes an infinite sequence of 1’s and 1’s, not the 2-element set {1, 1}.
13
12 Recognizing Sequences Sometimes, you’re given the first few terms of a sequence, and you are asked to find the sequence’s generating function, or a procedure to enumerate the sequence.Sometimes, you’re given the first few terms of a sequence, and you are asked to find the sequence’s generating function, or a procedure to enumerate the sequence.
14
13 Recognizing Sequences Examples: What’s the next number?Examples: What’s the next number? –1,2,3,4,… –1,3,5,7,9,… –2,3,5,7,11,... –5,11,17,23,… –1,7,25,79,… 5 11 13 (the 6th smallest prime number) 29 241 (3 - 2) n
15
14 The Trouble with Recognition The problem of finding “the” generating function given just an initial subsequence is not well defined.The problem of finding “the” generating function given just an initial subsequence is not well defined. This is because there are infinitely many computable functions that will generate any given initial subsequence.This is because there are infinitely many computable functions that will generate any given initial subsequence.
16
15 Summations
17
16 Summation Notation Given a series {a n }, the summation of {a n } from j to k is written and defined as follows:Given a series {a n }, the summation of {a n } from j to k is written and defined as follows: Here, i is called the index of summation.Here, i is called the index of summation.
18
17 Generalized Summations For an infinite series, we may write:For an infinite series, we may write: To sum a function over all members of a set X={x 1, x 2, …}:To sum a function over all members of a set X={x 1, x 2, …}:
19
Example 18
20
19 Simple Summation Example
21
20
22
21 More Summation Examples An infinite series with a finite sum:An infinite series with a finite sum: Using a predicate to define a set of elements to sum over:Using a predicate to define a set of elements to sum over:
23
22 Summation Manipulations Some handy identities for summations:Some handy identities for summations: (Index shifting.)
24
Index Shifting Example 23
25
24 More Summation Manipulations (Grouping.) (Order reversal.) (Series splitting.)
26
25 Example: Impress Your Friends Boast, “I’m so smart; give me any digit n, and I’ll add all the numbers from 1 to n in my head in just a few seconds.”Boast, “I’m so smart; give me any digit n, and I’ll add all the numbers from 1 to n in my head in just a few seconds.” I.e., Evaluate the summation:I.e., Evaluate the summation: There is a simple closed-form formula for the result, discovered by Euler at age 12!There is a simple closed-form formula for the result, discovered by Euler at age 12! Leonhard Euler (1707-1783)
27
26 Euler’s Trick, Illustrated Consider the sum: 1+2+…+(n/2)+((n/2)+1)+…+(n-1)+nConsider the sum: 1+2+…+(n/2)+((n/2)+1)+…+(n-1)+n n/2 pairs of elements, each pair summing to n+1, for a total of (n/2) (n+1).n/2 pairs of elements, each pair summing to n+1, for a total of (n/2) (n+1). … n+1
28
27 Symbolic Derivation of Trick (k=n/2) order reversal index shifting Suppose n is even, that is, n=2k
29
28 Concluding Euler’s Derivation Also works for odd n (prove this at home).Also works for odd n (prove this at home).
30
29 Geometric Series A geometric series is a series of the formA geometric series is a series of the form a, ar, ar 2, ar 3, …, ar k, where a,r R. a, ar, ar 2, ar 3, …, ar k, where a,r R. The sum of such a series is given by:The sum of such a series is given by:
31
30 Here we go...Here we go... Geometric Sum Derivation
32
31 Derivation example cont...
33
32 Concluding long derivation...
34
33 More Series Infinite Geometric
35
34 More Series Geometric series Arithmetic Series (Euler’s trick) Quadratic series Cubic series
36
35 Example EvaluateEvaluate
37
36 Nested Summations EvaluateEvaluate
38
Recursively defined Function Factorial FunctionFactorial Function –The product of the positive integers from 1 to n, inclusive, is called “n factorial” and is usually denoted by n!. That is n!=n(n-1)(n-2)……… 37
39
Factorial Example Calculate 4! Using the recursive definitionCalculate 4! Using the recursive definition 38
40
Fibonacci Sequence Calculate F when n=10.Calculate F when n=10. 39 n
41
Ackerman Function 40
42
Ackerman Function Example 41
43
THANK YOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.