CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth...

25
CS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS [email protected] [email protected]

Transcript of CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth...

Page 1: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

CS275 Discrete Mathematics

Gongbo “Tony” LiangFourth year PhD student in [email protected]@cs.uky.edu

Page 2: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Section 2.4Sequences and Summations

Page 3: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Sequence

A sequence is a discrete structure used to represent an ordered list.- E.g. ,

- {an} with an=3n

- n=0, an=1

- n=1, an=3

- n=2, an=9

- n=3, an=27

Page 4: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Find these terms of the sequence {an}, where an = 2•(-3)n+5n

- a0- a1- a4- a5

3

-1

787

2639

Page 5: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

List the first 10 terms of :

- The sequence that begins with 2 and in which

each successive term is 3 more than the preceding term

- {an} with an = 2+3n

- 2,5,8,11,14,17,20,23,26,29

Page 6: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

List the first 4 terms of:

- The sequence whose nth term is n!-2n

(start with n=1)

- {an} with an = n!-2n

- -1, -2, -2, 8

Page 7: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Find the simple formula or rule that generates the terms of an integer sequence that begins with the given list

- 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, …

- One 1 and one 0, followed by two 1s and 2 0s,

followed by three 1s and three 0s, …

Page 8: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Find the simple formula or rule that generates the terms of an integer sequence that begins with the given list

- 1,2,2,3,4,4,5,6,6,7,8,8,…

- The positive integers are listed in increasing order

with each even positive integer listed twice

Page 9: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

What is the value of each of these sums of terms of a geometric progression

- ∑#$%& 3 • 2#

Page 10: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

What is the value of each of these sums of terms of a geometric progression

- ∑#$%& 3 • 2#- j = 0, 3 • 2#=3•20 = 3•1 = 3

- j = 1, 3 • 2#=3•21 = 3•2 = 6

- j = 2, 3 • 2#=3•22 = 3•4 = 12

- j = 3, 3 • 2#=3•23 = 3•8 = 24

- j = 4, 3 • 2#=3•24 = 3•16 = 48

- ∑#$%& 3 • 2# = 3+6+12+24+48+96+192+384+768 = 1355

- j = 5 3 • 2#=3•25 = 3•32 = 96

- j = 6, 3 • 2#=3•26 = 3•64 = 192

- j = 7, 3 • 2#=3•27 = 3•128 = 384

- j = 8, 3 • 2#=3•28 = 3•256 = 768

Page 11: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

What is the value of each of these sums of terms of a geometric progression

- ∑#$%& 2 • (−3)#

- 9842

Page 12: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Section 2.5Cardinality of Sets

Page 13: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Cardinality of sets

- Cardinality of finite sets:

- The number of elements in the set

- Countable sets:

- A set that either finite or has the same cardinality as the set of positive integers

- If S is a infinite set and S is countable

- |S|=א 0 (aleph null)

Page 14: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Is “the odd negative integers” countable?If so, exhibit a one-to-one correspondence between the set of positive integers and that this set.

- Yes, it is countable.

- 1<-> -1- 2 <-> -3

- 3 <-> -5- …

Page 15: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Is “integers not divisible by 3” countable?If so, exhibit a one-to-one correspondence between the set of positive integers and that this set.

- Yes, it is countable.

- 1<-> 1- 2 <-> -1

- 3 <-> 2- 4 <-> -2 ...

Page 16: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Show that a finite group of guests arriving at

Hilbert’s fully occupied Grand Hotel can be given

rooms without evicting any current guest.

- Hilbert’s Grand Hotel has countable infinite number of

rooms

- Suppose m new guests arrive at the fully occupied hotel. We can move the guest in Room n to Room m+nfor n=1,2,3…; then the new guests can occupy rooms 1 to m.

Page 17: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Given an example of two uncountable sets A and B such that A∩B is:a) finite, b) countable infinite, c) uncountable

- a) A = [1,2], B = [3,4]

- b) A = [1,2]∪Z+, B = [3,4]∪Z+

- c) A = [1,3], B = [2,4]

Page 18: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Section 5.1Mathematical Induction

Page 19: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Mathematical induction can be used to prove statements such as “P (n) is true for all positive integers n”

- General Steps:

- Basis step: We verify P(1) is true

- Inductive step: For all positive integers k, we assume P(k)

is true and show P(k + 1) is true

Page 20: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Let P(n) be the statement that 12+22+…+n2 = n(n+1)(2n+1)/6 for the positive integer n.

- A) what is the statement P(1)?- B) Show that P(1) is true

- C) What is the inductive hypothesis?- D) Complete the inductive step

Page 21: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Let P(n) be the statement that 12+22+…+n2 = n(n+1)(2n+1)/6 for the positive integer n.

- A) what is the statement P(1)?- P(1) = 1

- B) Show that P(1) is true- Left side: P(1) = 12=1

- Right side: P(1) = 1(1+1)(2+1)/6=1- Left side = Right side- P(1) is true

Page 22: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Let P(n) be the statement that 12+22+…+n2 = n(n+1)(2n+1)/6 for the positive integer n.

- C) What is the inductive hypothesis?- 12+22+…+k2 = k(k+1)(2k+1)/6

Page 23: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Let P(n) be the statement that 12+22+…+n2 = n(n+1)(2n+1)/6 for the positive integer n.

- D) Complete the inductive step

Page 24: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Prove that if A1, A2, …, An and B are sets, than ("# ∪ "% ∪…∪ "&) ∩ )

= ("# ∩ )) ∪ ("% ∩ )) …∪ ("& ∩ ))- Let P(n) be “ "# ∪ "% ∪ … ∪ "& ∩ )= ("# ∩ )) ∪ ("% ∩ ))…

∪ ("& ∩ )) ”

- Basic step: * # = "# ∩ ) = "& ∩ )- Inductive step:

- …

Page 25: CS275 Discrete Mathematics - GB. Tony LiangCS275 Discrete Mathematics Gongbo “Tony” Liang Fourth year PhD student in CS gb.liang@uky.edu liang@cs.uky.edu Section 2.4 Sequences

Prove that if A1, A2, …, An and B are sets, than ("# ∪ "% ∪…∪ "&) ∩ )

= ("# ∩ )) ∪ ("% ∩ )) …∪ ("& ∩ ))- Inductive step: