1 / 26

Sequences

Sequences. Rosen 6 th ed., §2.4. Sequences. A sequence represents an ordered list of elements. e.g., { a n } = 1, 1/2, 1/3, 1/4, …

byrdr
Download Presentation

Sequences

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sequences Rosen 6th ed., §2.4

  2. Sequences • A sequence represents an ordered list of elements. e.g., {an} = 1, 1/2, 1/3, 1/4, … • Formally: A sequence or series {an} is identified with a generating functionf:SA for some subset SN (often S=N or S=N{0}) and for some set A. e.g., an= f(n) = 1/n. • The symbol an denotes f(n), also called term n of the sequence.

  3. Example with Repetitions • Consider the sequence bn = (1)n. • {bn}= 1, 1, 1, 1, … • {bn} denotes an infinite sequence of 1’s and 1’s, not the 2-element set {1, 1}.

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

  5. Recognizing Sequences • Examples: What’s the next number? • 1,2,3,4,… • 1,3,5,7,9,… • 2,3,5,7,11,... 5 (the 5th smallest number >0) 11 (the 6th smallest odd number >0) 13 (the 6th smallest prime number)

  6. The Trouble with Recognition • 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.

  7. The Trouble with Recognition (cont’d) • We implicitly are supposed to find the simplest such function but, how should we define the simplicity of a function? • We might define simplicity as the reciprocal of complexity, but… • There are many plausible, competing definitions of complexity, and this is an active research area. • So, these questions really have no objective right answer!

  8. Summations Rosen 6th ed., §2.4

  9. Summation Notation • Given a series {an}, the summation of {an} from j to k is written and defined as follows: • Here, i is called the index of summation.

  10. Generalized Summations • For an infinite series, we may write: • To sum a function over all members of a set X={x1, x2, …}: • Or, if X={x|P(x)}, we may just write:

  11. Simple Summation Example

  12. More Summation Examples • An infinite series with a finite sum: • Using a predicate to define a set of elements to sum over:

  13. Summation Manipulations • Some handy identities for summations: (Index shifting.)

  14. More Summation Manipulations (Series splitting.) (Order reversal.) (Grouping.)

  15. Example: Impress Your Friends • Boast, “I’m so smart; give me any 2-digit number 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: • There is a simple closed-form formula for the result, discovered by Euler at age 12! LeonhardEuler(1707-1783)

  16. Euler’s Trick, Illustrated • Consider the sum (assume n is even):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+1 … n+1 n+1

  17. Symbolic Derivation of Trick Suppose n is even, that is, n=2k order reversal index shifting (k=n/2)

  18. Concluding Euler’s Derivation • Also works for odd n (prove this at home).

  19. Example: Geometric Series • A geometric series is a series of the form a, ar, ar2, ar3, …, ark, where a,rR. • The sum of such a series is given by: • We can reduce this to closed form via clever manipulation of summations...

  20. Geometric Sum Derivation • Herewego...

  21. Derivation example cont...

  22. Concluding long derivation...

  23. More Series Infinite Geometric

  24. More Series Geometric series Arithmetic Series (Euler’s trick) Quadratic series Cubic series

  25. Example • Evaluate . • Use series splitting. • Solve for desiredsummation. • Apply quadraticseries rule. • Evaluate.

  26. Nested Summations • These have the meaning you’d expect. • Note issues of free vs. bound variables, just like in quantified expressions, integrals, etc.

More Related