18
CSCI2110 Tutorial 6: More Counting by Mapping, Number Sequences Chow Chi Wang (cwchow ‘at’ cse.cuhk.edu.hk)

CSCI2110 Tutorial 6: More Counting by Mapping, Number Sequences

  • Upload
    molly

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

CSCI2110 Tutorial 6: More Counting by Mapping, Number Sequences. Chow Chi Wang ( cwchow ‘at’ cse.cuhk.edu.hk). More Counting by Mapping. Division Rule. If a function f from A to B is k -to- 1 (this means for every element in B is mapped by exactly k elements in A .), then . - PowerPoint PPT Presentation

Citation preview

Page 1: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

CSCI2110 Tutorial 6:More Counting by Mapping, Number Sequences

Chow Chi Wang (cwchow ‘at’ cse.cuhk.edu.hk)

Page 2: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

More Counting by Mapping

Page 3: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Division Rule• If a function f from A to B is k-to-1 (this means for every

element in B is mapped by exactly k elements in A.), then

.

• Sometimes we can’t find a direct way to count the size of a set A.

• The idea of the division rule is to establish a k-to-1 correspondence between A and another set B, which is hopefully more easily countable.

Page 4: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Division Rule (Example)• (1) Consider the string NILLAPALOO in this question.

a) How many distinguishable ways can the letters be arranged in order?

• Let A be the set of all possible rearrangement of the string.

• Let B be the set of the strings of length 10 constructed by these symbols S = {N, I, L1, L2, L3, A1, A2, P, O1, O2}.

• Consider the function , where f replaces every symbols in S by the corresponding letter.• e.g. f(NIL1L2L3A1A2PO1O2) = NILLLAAPOO

Page 5: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Division Rule (Example)• We know that:

• Because there are 10 choices for the 1st component of the string• There are 9 choices for the 2nd component of the string• …• So in total there are 10x9x…x1 = 10! many possible strings in B.

• f is a -to-1function.• Strings of the forms and map to the same string in A by f. And there are 2!

such forms corresponds to ’s.• Similarly for the ’s and ’s, which have 3! and 2! different forms to consider

respectively.

• So by the division rule, we know that:

Page 6: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Number Sequences

Page 7: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Sum of a Sequence (Series)• (Sigma Notation) .

• Some common facts:• .• .• .

Page 8: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Telescoping Series• A telescoping series is a series whose partial sums

eventually only have a fixed number of terms after cancellation.

• e.g.

Page 9: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Telescoping Series (Puzzle)• 0 = 1?

• Consider:

!

• What is wrong?

Page 10: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Arithmetic Sequence• An arithmetic sequence is a sequence of numbers such

that the difference between the consecutive terms is constant

• e.g. 1, 3, 5, 7, 9, …

• In general, arithmetic sequence can be expressed as:• (initial value)• for ( is called the common difference)

Page 11: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Arithmetic Series• Let and is an arithmetic sequence.

• We have:

• Because is an arithmetic sequence, we have:

Page 12: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Arithmetic Series• Because there are such terms so:

Therefore:

Page 13: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Geometric Sequence• A geometric sequence is a sequence of numbers where

each term after the first is found by multiplying the previous one by a fixed non-zero number called the common ratio.

• e.g. 1, 2, 4, 8, 16, …

• In general, arithmetic sequence can be expressed as:• (initial value)• for ( is called the common ratio)

Page 14: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Geometric Series• Let and is a geometric sequence.

• We have:

• Therefore, for :

Page 15: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Harmonic Series• We define to be the n-th harmonic number.

• Harmonic series is divergent! This means

• This is because we have:

• So we have , therefore harmonic series is divergent.

Page 16: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Harmonic Series• Here is a bound for the harmonic numbers:

• We can prove this by integration.

Page 17: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Pi Notation• (Pi Notation) .

Page 18: CSCI2110  Tutorial 6: More Counting by Mapping, Number Sequences

Thank You!