Today - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Today

Description:

Today Sequences Sums (series) Products Applications to Computer Science Conversion to radix B Mathematical induction Original author of the s: Vadim Bulitko ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 14
Provided by: TAndre2
Category:

less

Transcript and Presenter's Notes

Title: Today


1
Today
  • Sequences
  • Sums (series)
  • Products
  • Applications to Computer Science
  • Conversion to radix B
  • Mathematical induction

2
  • Original author of the slides
  • Vadim Bulitko
  • University of Alberta
  • http//www.cs.ualberta.ca/bulitko/W04
  • Modified by T. Andrew Yang (yang_at_uhcl.edu)

3
Sequences
  • Set of elements
  • Order is important
  • Repetitions are allowed
  • Possibly infinite
  • Each one is called a term
  • Index by an integer -- hence countable
  • The first one (if exists) is called the initial
    term
  • The last one (if exists) is called the final term
  • Explicit/general formula specifies the elements

4
Examples
  • akk/(k1), kgt0
  • bi(i-1)/i, igt1
  • The same sequence -- different formulae
  • Any sequence has an infinite number of
    explicit/general formulae
  • How about this sequence
  • -1, 1, -1, 1,

5
Series
  • A series is a sum of a sequence
  • Capital Greek letter ? (sigma) is used
  • U? ai aL aUiL
  • L is the lower limit
  • U is the upper limit
  • Either one can be infinite

6
Examples
  • Sum (-1)k
  • 8? (-1)k i0
  • 1 (-1) 1 (-1)

7
Products
  • Use capital Greek letter ? (Pi) to denote a
    product U ? ai aL aU iL
  • L is the lower limit
  • U is the upper limit
  • Either one can be infinite

8
Examples
  • Factorial
  • definition
  • number of permutations of n elements
  • Sample applications
  • binomial coefficients (n choose m)
  • http//mathworld.wolfram.com/BinomialCoefficient.h
    tml

9
Properties
  • Distributive law
  • Sums
  • Products
  • Multiplication by a constant

10
Applications to CS
  • Iterative constructs (loops)
  • Example
  • for (int IL IltU I)
  • Cout ltlt I
  • Arrays
  • aIaI-1d

11
Conversion to radix B
  • Input N
  • Output N in B-radix
  • Algorithm
  • K0
  • Until N?0 do
  • DigitKN mod B
  • KK1
  • NN div B
  • End do

12
Mathematical Induction
  • First a puzzle with 2 solutions
  • What monetary amounts can one not represent with
    2 and 5 cent coins?
  • See the textbook for discussion
  • Exercise What monetary amounts can one not
    represent with 2 and 5 cent coins?
  • Answer 1 and 3 only
  • Proofs
  • Using remainder properties
  • Using mathematical induction

13
Questions?
Write a Comment
User Comments (0)
About PowerShow.com