0% found this document useful (0 votes)
28 views

Chapter2.pptxChapter2

Chapter 2 covers basic structures in mathematics, focusing on sets, functions, sequences, and sums. It discusses set theory, including definitions, operations, and identities, as well as the types and operations of functions. Additionally, it introduces sequences, summation formulae, and concepts of set cardinality.

Uploaded by

2178722559
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Chapter2.pptxChapter2

Chapter 2 covers basic structures in mathematics, focusing on sets, functions, sequences, and sums. It discusses set theory, including definitions, operations, and identities, as well as the types and operations of functions. Additionally, it introduces sequences, summation formulae, and concepts of set cardinality.

Uploaded by

2178722559
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 99

Basic Structures: Sets,

Functions, Sequences, Sums


Chapter 2

1
Chapter Outline

• Sets
• The Language of Sets
• Set Operations
• Set Identities
• Functions
• Types of Functions
• Operations on Functions
• Computability
• Sequences and Summations
• Types of Sequences
• Summation Formulae
• Set Cardinality
• Countable Sets
2
Sets
Section 2.1

3
集合论

• 集合是最基本的离散结构,所有其他离散结构都建立在集合之上。
• 集合论是一个数学分支,其基本概念已渗透到数学的几乎所有领域,常被视为数学基础之一,特别是 ZFC
集合论。

• 集合论奠基人:康托尔( Cantor , 1845 - 1918 ),出生于俄国的德国数学家。

• 集合论的两种体系
• 朴素集合论
• 公理集合论
• 朴素集合论中,集合的直觉定义的使用导致了悖论,在公理集合论中不存在。

4
Sets 集合

• A set is an unordered collection of objects 对象的无序聚集 .


• the students in this class
• the chairs in this room
• The objects in a set are called the elements 元素 , or
members 成员 of the set. A set is said to contain its

• The notation a ∈ A denotes that a is an element of the set


elements.

A.
• If a is not a member of A, write a ∉ A

5
Describing a Set: Roster Method 花名册方法

• S = {a,b,c,d}

S = {a,b,c,d} = {b,c,a,d}
• Order not important

• Each distinct object is either a member or not; listing more than once does

S = {a,b,c,d} = {a,b,c,b,c,d}
not change the set.

• Elipses (…) may be used to describe a set without listing all of the members
when the pattern is clear.
S = {a,b,c,d, ……,z }

• Multisets 多重集 are unordered collections of elements where an element can


occur as a member more than once.
• The notation } denotes the multiset with element occurring times, element
occurring times, and so on.
6
Roster Method

V = {a,e,i,o,u}
• Set of all vowels in the English alphabet:

• Set of all odd positive integers less than 10:


O = {1,3,5,7,9}
• Set of all positive integers less than 100:
S = {1,2,3,……..,99}
• Set of all integers less than 0:
S = {…., -3,-2,-1}

{{1,2,3},a, {b,c}}
• Sets can be elements of sets.

{N,Z,Q,R}
7
Some Important Sets

N = natural numbers = {0,1,2,3….}


Z = integers = {…,-3,-2,-1,0,1,2,3,…}
Z⁺ = positive integers = {1,2,3,…..}
R = set of real numbers
R+ = set of positive real numbers
C = set of complex numbers.
Q = set of rational numbers

8
Set-Builder Notation 集合构造器符号

S = {x | x is a positive integer less than 100}


• 描述作为集合的元素必须满足的属性 :

O = {x | x is an odd positive integer less than 10}


O = {x ∈ Z⁺ | x is odd and x < 10}

S = {x | P(x)}
• A predicate may be used:

• Example: S = {x | Prime(x)}

Q+ = {x ∈ R | x = p/q, for some positive integers p,q}


• Positive rational numbers:

9
Interval Notation 区间符号

[a,b] = {x | a ≤ x ≤ b}
[a,b) = {x | a ≤ x < b}
(a,b] = {x | a < x ≤ b}
(a,b) = {x | a < x < b}

closed interval [a,b]


open interval (a,b)

10
Universal Set and Empty Set 全集 与 空集

• The universal set U is the set containing everything


currently under consideration.
• Sometimes implicit
• Sometimes explicitly stated.

• The empty set is the set with no elements. Symbolized ∅,


• Contents depend on the context.

but {} also used.


• 注意 ∅ ≠ { ∅ }

11
Set Equality 集合的相等

Definition: Two sets are equal if and only if they have the
same elements.
• Therefore if A and B are sets, then A and B are equal if and
only if

{1,3,5} = {3, 5, 1}
• We write A = B if A and B are equal sets.

{1,5,5,5,3,3,1} = {1,3,5}

12
Subsets 子集合

Definition: The set A is a subset of B, if and only if every

• The notation A ⊆ B is used to indicate that A is a subset of the


element of A is also an element of B.

set B.
• A ⊆ B holds if and only if
1. Because a ∈ ∅ is always false, ∅ ⊆ S ,for every set S.
is true.

2. Because a ∈ S → a ∈ S, S ⊆ S, for every set S.

• 证明 A ⊆ B : To show that A ⊆ B, show that if x belongs to A,


then x also belongs to B.
• 证明 A ⊈ B : To show that A is not a subset of B, A ⊈ B, find
an element x ∈ A with x ∉ B.

13
Another look at Equality of Sets

• Recall that two sets A and B are equal, denoted by A = B,


iff

• Using logical equivalences we have that A = B iff

• 证明两个集合 A 和 B 相等,可以通过证明 A ⊆ B 且 B ⊆ A 。

14
Proper Subsets 真子集

Definition: If A ⊆ B, but A ≠B, then we say A is a proper


subset of B, denoted by A ⊂ B. If A ⊂ B, then

is true.

文氏图
Venn Diagram
B
U
A

15
Set Cardinality 集合的基数

Definition[ 有限集合,无限集合 ]: If there are exactly n distinct


elements in S where n is a nonnegative integer, we say
that S is finite. Otherwise it is infinite.
Definition: The cardinality 基数 of a finite set A, denoted
by |A|, is the number of (distinct) elements of A.

1. |ø| = 0
Examples:

2. Let S be the letters of the English alphabet. Then |S| = 26


3. |{1,2,3}| = 3
4. |{ø}| = 1
5. The set of integers is infinite.
16
Power Sets 幂集

Definition: The set of all subsets of a set A, denoted P(A),


is called the power set of A.
Example:
• If A = {a,b} then P(A) = {ø, {a},{b},{a,b}}
• P(∅) = {∅}.
• P({∅}) = {∅, {∅}}.

set is 2ⁿ.
• If a set has n elements, then the cardinality of the power

17
Tuples 元组

• The ordered n-tuple (a1,a2,…..,an) is the ordered


collection that has a1 as its first element and a2 as its
second element and so on until an as its last element.
• Two n-tuples are equal if and only if their corresponding

• 2-tuples are called ordered pairs.


elements are equal.

• The ordered pairs (a,b) and (c,d) are equal if and only if a
= c and b = d.

18
Cartesian Product 笛卡尔积

Definition: The Cartesian Product of two sets A and B, denoted by A ×


B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B .

Example:
A = {a,b} B = {1,2,3}
A × B = {(a,1),(a,2),(a,3), (b,1),(b,2),(b,3)}

Definition: A subset R of the Cartesian product A × B is called a relation 关系

9. )
from the set A to the set B. (Relations will be covered in depth in Chapter

19
Cartesian Product

Definition: The cartesian products of the sets A1,A2,……,An,


denoted by A1 × A2 × …… × An , is the set of ordered n-tuples
(a1,a2,……,an) where ai belongs to Ai for i = 1, … n.

Example: What is A × B × C where A = {0,1}, B = {1,2}

Solution: A × B × C = {(0,1,0), (0,1,1), (0,1,2),(0,2,0),


and C = {0,1,2}

(0,2,1), (0,2,2),(1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1),


(1,2,2)}
20
Truth Sets of Quantifiers

• Given a predicate P and a domain D, we define the truth


set 真值集 of P to be the set of elements in D for which P(x)
is true. The truth set of P(x) is denoted by

integers and P(x) is “|x| = 1” is the set {-1,1}


• Example: The truth set of P(x) where the domain is the

• 这是常用的表达集合的方法。
21
Set Operations
集合运算
Section 2.2

22
Union 集合的并

A and B, denoted by A ∪ B, is the set:


• Definition: Let A and B be sets. The union 并集 of the sets

• Example: What is {1,2,3} ∪ {3, 4, 5}?

Venn Diagram for A ∪ B


Solution: {1,2,3,4,5}

当我们讨论集合运算的时候,必须有全集 U ,
U

且 U 一般是显而易见的 .
A B

23
Intersection 集合的交

by A ∩ B, is
• Definition: The intersection 交集 of sets A and B, denoted

• Note if the intersection is empty, then A and B are said to

• Example: What is? {1,2,3} ∩ {3,4,5} ?


be disjoint.

Solution: {3} Venn Diagram for A ∩B

{1,2,3} ∩ {4,5,6} ?
• Example:What is?
U
Solution: ∅ A B

24
Difference 集合的差

• Definition: Let A and B be sets. The difference 差集 of A


and B, denoted by A – B, is the set containing the elements
of A that are not in B. The difference of A and B is also

A – B = {x | x ∈ A  x ∉ B} = A ∩B
called the complement of B with respect to A.

U Venn Diagram for A − B


A
B

25
Complement 集合的补

(with respect to U), denoted by Ā is the set U - A


Definition: If A is a set, then the complement 补集 of the A

Ā = {x ∈ U | x ∉ A}
(The complement of A is sometimes denoted by Ac .)

is the complement of {x | x > 70}


Example: If U is the positive integers less than 100, what

Solution: {x | x ≤ 70} Venn Diagram for Complement


U
Ā
A

26
容斥原理初探

|A ∪ B| = |A| + | B| − |A ∩ B|
• Inclusion-Exclusion U
A B

Venn Diagram for A, B, A ∩ B, A ∪ B

27
Review Questions

Example: U = {0,1,2,3,4,5,6,7,8,9,10} A = {1,2,3,4,5},


B ={4,5,6,7,8}
1. A ∪ B

2. A ∩ B
Solution: {1,2,3,4,5,6,7,8}

Solution: {4,5}
3. Ā

4.
Solution: {0,6,7,8,9,10}

5. A – B
Solution: {0,1,2,3,9,10}

6. B – A
Solution: {1,2,3}

Solution: {6,7,8}
28
Symmetric Difference (*) 集合的对称差

Definition: The symmetric difference of A and B, denoted


by is the set

U = {0,1,2,3,4,5,6,7,8,9,10}
Example:

A = {1,2,3,4,5} B ={4,5,6,7,8}

What is : U

• Solution: {1,2,3,6,7,8}
A B

Venn Diagram
29
Set Identities 集合恒等式

• Identity laws 恒等律

• Domination laws 支配律

• Idempotent laws 幂等律

• Complementation law

Continued on next slide 


30
Set Identities

• Commutative laws 交换律

• Associative laws 结合律

• Distributive laws 分配律

Continued on next slide  31


Set Identities

• De Morgan’s laws 摩根律

• Absorption laws 吸收律

• Complement laws 互补律

32
Proving Set Identities

• Different ways to prove set identities:


1. Prove that each set (side of the identity) is a subset of the
other.
2. Use set builder notation and propositional logic.
3. Membership Tables: Verify that elements in the same

the same side of the identity. Use 1 to indicate it is in the


combination of sets always either belong or do not belong to

set and a 0 to indicate that it is not.

33
Proving Set Identities

Example:

34
Membership Table 成员表

Solution:
A B C
1 1 1 1 1 1 1 1
1 1 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 0 0 0 1 1 1 1
0 1 1 1 1 1 1 1
0 1 0 0 0 1 0 0
0 0 1 0 0 0 1 0
0 0 0 0 0 0 0 0
35
Generalized Unions and Intersections

• Let A1, A2 ,…, An be an indexed collection of sets.


We define:

These are well defined, since union and intersection are


associative.
• For i = 1,2,…, let Ai = {i, i + 1, i + 2, ….}. Then,

36
Computer Representation of Sets 集合的计算机表示

• There are various ways to represent sets using a computer.


• One method is to store the elements of the set in an
unordered fashion.
• However, the set operations would be time-consuming
• Another method is to use bit string of the universal set.

• Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},


• The bit string that represents the set of odd integers in U,
namely, {1, 3, 5, 7, 9} is 1010101010.

37
Functions 函数
Section 2.3

38
Functions

from A to B, denoted f: A → B is an assignment of each


Definition: Let A and B be nonempty sets. A function 函数 f

element of A to exactly one element of B. We write f(a) =


b if b is the unique element of B assigned by the function f
to the element a of A.
• Functions are sometimes
Grades

called mappings 映射 or
Students
A

transformations 变换 .
Carlota Rodriguez
B
Sandeep Patel C
Jalen Williams D

F
Kathy Scott 39
Functions

• A function f: A → B can be defined as a subset of A×B (a


relation). This subset is restricted to be a relation where
no two elements of the relation have the same first
element.
• Specifically, a function f from A to B contains one, and only
one ordered pair (a, b) for every element a∈ A.

and

40
Functions

Given a function f: A → B:
• A is called the domain 定义域 of f.
• B is called the codomain 陪域 of f.

• then b is called the image 像 of a under f.


• If f(a) = b,

• a is called the preimage 原像 of b.


• The range 值域 of f is the set of all images of points in A

• 函数相等: Two functions are equal when they have the same
under f. We denote it by f(A).

domain, the same codomain and map each element of


the domain to the same element of the codomain.
41
Functions

• If and S is a subset of A, then

A B
a
f {a,b,c,} is ? {y,z} x
b
y
f {c,d} is ? {z}
c

d z
42
Representing Functions

• Functions may be specified in different ways:


• An explicit statement of the assignment.
Students and grades example.

f(x) = x + 1
• A formula.

• A computer program.
• A Java program that when given an integer n, produces the nth

• 图像
Fibonacci Number

43
Injections 单射

Definition: A function f is said to be one-to-one , or


injective, if and only if f(a) = f(b) implies that a = b for all
a and b in the domain of f.

A B
a x
v
b
y
c
z
d
w 44
Surjections 满射

Definition: A function is called onto or surjective, if and


only if for every element there is an element
with .

A B
a x

b y
c
d z

45
Bijections 双射

Definition: A function f is a one-to-one correspondence 一一


对应 , or a bijection 双射 , if it is both one-to-one and onto
(surjective and injective).

Aa Bx
b
y
c
d z

w
46
Inverse Functions 反函数

Definition: Let f be a bijection 双射 from A to B. Then the


inverse of f, denoted , is the function from B to A defined
as iff .
No inverse exists unless f is a bijection. Why?

47
Inverse Functions

f
A B A B
V a V
a

b
b W
W
c
c
d X
d X

Y
Y 48
Inverse Functions

Example 1: Let f be the function from {a,b,c} to {1,2,3} such


that f(a) = 2, f(b) = 3, and f(c) = 1. Is f invertible ( 可逆的 ) and if so
what is its inverse?
Solution: The function f is invertible because it is a one-to-one correspondence. f-1
(1) = c, f-1 (2) = a, and f-1 (3) = b.

Example 2: Let f: Z  Z be such that f(x) = x + 1. Is f invertible,

f-1 (y) = y – 1.
Solution:
and The
if so, function
what f isinverse?
is its invertible because it is a one-to-one correspondence.

Example 3: Let f: R → R be such that . Is f invertible, and if so,


what is The
Solution: its function
inverse? f is not invertible because it is not one-to-one .
49
Composition 复合函数

• Definition: Let f: B → C, g: A → B. The composition of f


with g, denoted is the function from A to C defined by

50
Composition

g f
A B C A C
a V a
h
h
b i b
W
c i
j c
d X
d j
Y

51
Composition

Example 1: If and , then

52
Graphs of Functions 函数的图

the function f is the set of ordered pairs {(a,b) | a ∈A and


• Let f be a function from the set A to the set B. The graph of

f(a) = b}.

Graph of f(n) = 2n + 1 Graph of f(x) = x2


from Z to Z from Z to Z 53
Floor and ceiling Functions 下取整和上取整函数

• The floor function is the largest integer less than or equal


to x.

• The ceiling function is the smallest integer greater than or


equal to x.

Example:

54
Floor and Ceiling Functions

55
Floor and Ceiling Functions

⌊2x⌋= ⌊x⌋ + ⌊x + 1/2⌋


Example: Prove that x is a real number, then

Solution: Let x = n + ε, where n is an integer and 0 ≤ ε< 1.


Case 1: ε < ½

• 2x = 2n + 2ε and ⌊2x⌋ = 2n, since 0 ≤ 2ε< 1.


• ⌊x + 1/2⌋ = n, since x + ½ = n + (1/2 + ε ) and 0 ≤ ½ +ε < 1.
• Hence, ⌊2x⌋ = 2n and ⌊x⌋ + ⌊x + 1/2⌋ = n + n = 2n.

Case 2: ε≥½

• 2x = 2n + 2ε = (2n + 1) +(2ε − 1) and ⌊2x⌋ =2n + 1, since 0 ≤ 2 ε - 1< 1.


• ⌊x + 1/2⌋ = ⌊ n + (1/2 + ε)⌋ = ⌊ n + 1 + (ε – 1/2)⌋ = n + 1 since 0 ≤ ε – 1/2<
1.
• Hence, ⌊2x⌋ = 2n + 1 and ⌊x⌋ + ⌊x + 1/2⌋ = n + (n + 1) = 2n + 1.
56
Factorial Function 阶乘函数

Definition: f: N → Z+ , denoted by f(n) = n! is the product


of the first n positive integers when n is a nonnegative
integer.

f(n) = 1 ∙ 2 ∙∙∙ (n – 1) ∙ n, f(0) = 0! = 1

Examples:
f(1) = 1! = 1
f(2) = 2! = 1 ∙ 2 = 2
Stirling’s Formula:

f(6) = 6! = 1 ∙ 2 ∙ 3∙ 4∙ 5 ∙ 6 = 720
f(20) = 2,432,902,008,176,640,000.
57
Partial Functions 部分函数

Definition: A partial function f from a set A to a set B is an


assignment to each element a in a subset of A, called the domain of
definition of f, of a unique element b in B.
• The sets A and B are called the domain and codomain of f, respectively.
• We day that f is undefined for elements in A that are not in the domain
of definition of f.
• When the domain of definition of f equals A, we say that f is a total

Example: f: N → R where f(n) = √n is a partial function from Z to R


function.

where the domain of definition is the set of nonnegative integers. Note


that f is undefined for negative integers.

• 往往是为了使用的方便引入部分函数。
• We may want to use such notions as the “youngest child” function,
which is undefined for a couple having no children.
58
Sequences and Summations
序列与求和
Section 2.4

59
Sequences 序列

integers (usually either the set {0, 1, 2, 3, 4, …..} or {1,


Definition: A sequence is a function from a subset of the

2, 3, 4, ….} ) to a set S.
• The notation an is used to denote the image of the
integer n. We can think of an as the equivalent of f(n)

term 项 of the sequence.


where f is a function from {0,1,2,…..} to S. We call an a

• Use notation to indicate a sequence.

60
Sequences

Example: Consider the sequence where

61
Geometric Progression 几何级数

Definition: A geometric progression is a sequence of the


form
,
where the initial term a and the common ratio r are real
numbers.

1. Let a = 1 and r = −1. Then:


Examples:

2. Let a = 2 and r = 5. Then:

3. Let a = 6 and r = 1/3. Then:


62
Arithmetic Progression 算术级数

Definition: A arithmetic progression is a sequence of the


form:

where the initial term a and the common difference d are


real numbers.

Let a = −1 and d = 4:
Examples:

Let a = 7 and d = −3:

Let a = 1 and d = 2:

63
Recurrence Relations 递推关系

Definition: A recurrence relation for the sequence {an} is


an equation that expresses an in terms of one or more of
the previous terms of the sequence, namely, a0, a1, …, an-1,
for all integers n with n ≥ n0, where n0 is a nonnegative
integer.
• 递推关系的解 A sequence is called a solution of a recurrence
relation if its terms satisfy the recurrence relation.
• The initial conditions 初始条件 for a sequence specify the
terms that precede the first term where the recurrence
relation takes effect.

64
Recurrence Relations 递推关系

Example 1: Let {an} be a sequence that satisfies the


recurrence relation an = an-1 + 3 for n = 1,2,3,4,…. and
suppose that a0 = 2. What are a1 , a2 and a3?
[Here a0 = 2 is the initial condition.]

a1 = a0 + 3 = 2 + 3 = 5
Solution: We see from the recurrence relation that

a2 = 5 + 3 = 8
a3 = 8 + 3 = 11

65
Recurrence Relations

Example 2: Let {an} be a sequence that satisfies the


recurrence relation an = an-1 – an-2 for n = 2,3,4,…. and
suppose that a0 = 3 and a1 = 5. What are a2 and a3?
[Here the initial conditions are a0 = 3 and a1 = 5. ]

Solution: We see from the recurrence relation that


a2 = a1 - a0 = 5 – 3 = 2
a3 = a2 – a1 = 2 – 5 = –3

66
Fibonacci Sequence 斐波那契数列

Definition: Define the Fibonacci sequence, f0 ,f1 ,f2,…, by:


• Initial Conditions: f0 = 0, f1 = 1
• Recurrence Relation: fn = fn-1 + fn-2

Example: Find f2 ,f3 ,f4 , f5 and f6 .

f2 = f1 + f0 = 1 + 0 = 1 ,
Answer:

f3 = f2 + f1 = 1 + 1 = 2 ,
f4 = f3 + f2 = 2 + 1 = 3 ,
f5 = f4 + f3 = 3 + 2 = 5 ,
f6 = f5 + f4 = 5 + 3 = 8 .

67
Solving Recurrence Relations 求解递推关系

• Finding a formula for the nth term of the sequence


generated by a recurrence relation is called solving the
recurrence relation.
• Such a formula is called a closed formula 闭公式 .

• Solving recurrence relations


• Iterative Solution
• Guess and prove

68
Iterative Solution 迭代法

Method 1: Working upward, forward substitution 正向替换


Let {an} be a sequence that satisfies the recurrence relation
an = an-1 + 3 for n = 2,3,4,…. and suppose that a1 = 2.
a2 = 2 + 3
a3 = (2 + 3) + 3 = 2 + 3 ∙ 2
a4 = (2 + 2 ∙ 3) + 3 = 2 + 3 ∙ 3
.
.
.
an = an-1 + 3 = (2 + 3 ∙ (n – 2)) + 3 = 2 + 3(n – 1)

69
Iterative Solution

Method 2: Working downward, backward substitution 反向替换

Let {an} be a sequence that satisfies the recurrence relation an = an-1 + 3 for n =
2,3,4,…. and suppose that a1 = 2.

an = an-1 + 3
= (an-2 + 3) + 3 = an-2 + 3 ∙ 2
= (an-3 + 3 )+ 3 ∙ 2 = an-3 + 3 ∙ 3
.
.
.

= a2 + 3(n – 2) = (a1 + 3) + 3(n – 2) = 2 + 3(n – 1)

70
Guess Sequences

• Given a few terms of a sequence, try to identify the


sequence. Conjecture a formula, recurrence relation, or
some other rule.
• Some questions to ask?
• Are there repeated terms of the same value?
• Can you obtain a term from the previous term by adding an
amount or multiplying by an amount?
• Can you obtain a term by combining the previous terms in
some way?
• Are they cycles among the terms?
• Do the terms match those of a well known sequence? Or some
combinations of them?

71
Useful Sequences

采用了奥卡姆剃刀原则:
如无必要,勿增实体。

72
Guessing Sequences

Example: Conjecture a simple formula for an if the first 10


terms of the sequence {an} are 1, 7, 25, 79, 241, 727,
2185, 6559, 19681, 59047.

approximates 3. So now compare with the sequence 3n .


Solution: Note the ratio of each term to the previous

We notice that the nth term is 2 less than the


corresponding power of 3. So a good conjecture is that an
= 3n − 2.

73
Guessing Sequences

• 1, -1, 1, -1, 1, -1,…

• 1, 0, 1, 0, 1, 0,…

• 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, ….. [exercise 28]

74
Integer Sequences

• Integer sequences appear in a wide range of mathematics.


• Integer sequences are useful in many fields such as
biology, engineering, chemistry and physics.

contains over 200,000 sequences. Began by Neil Stone in


• On-Line Encyclopedia of Integer Sequences (OESIS)

the 1960s (printed form). Now found at


http://oeis.org/Spuzzle.html

75
Summations 求和

• The notation:

represents

• The variable j is called the index ( 下标 ) of summation. It


runs through all the integers starting with its lower limit
下限 m and ending with its upper limit 上限 n.
• The usual laws for arithmetic apply to summations.

76
Summations

• More generally for a set S:

• Examples:

77
Product Notation (optional)

• The notation:

represents

78
Some Useful Summation Formulae

79
Geometric Series

80
81
Double Summations

可以变换求和顺序

82
Infinite Series 无限级数

83
Infinite Series 无限级数

• 无限级数 =?

• 无限级数的收敛与绝对收敛。

• -- 《》

84
Cardinality of Sets
集合的基数
Section 2.5

85
Cardinality

Definition: The cardinality of a set A is equal to the


cardinality of a set B, denoted
|A| = |B|,
if and only if there is a one-to-one correspondence (i.e., a
bijection) from A to B.
注意:两个集合具有相等的基数,并不能排除其中一个集合包含另一个集合的情况。
• If there is a one-to-one function (i.e., an injection) from A

|A| ≤ |B|.
to B, the cardinality of A is less than or the same as the

• When |A| ≤ |B| and A and B have different cardinality, we


cardinality of B and we write

say that the cardinality of A is less than the cardinality of B


and write |A| < |B|.
86
Cardinality

• Definition: A set that is either finite or has the same cardinality


as the set of positive integers (Z+) is called countable 可数 . A set
that is not countable is uncountable.
• [“ 和正整数集有相等的基数”,这也是“可数”一词的意思 ]

• The set of real numbers R is an uncountable set 不可数集合 .

cardinality is ℵ0 (where ℵ is aleph, the 1st letter of the Hebrew


• When an infinite set is countable (countably infinite) its

alphabet). We write |S| = ℵ0 and say that S has cardinality


“aleph null.”

• 一般地,当我们说一个集合是可数的,我们指的是可数无限的。对于有限的情况,我们一般说集合是有限的。

87
两种无限集

• 无限集分为两种,可数无限集(和自然数集合具有相同基数)和不可数集。

• An infinite set is countable if and only if it is possible to


list the elements of the set in a sequence (indexed by the
positive integers).
• 可数无限集也称为可列集。

• The reason for this is that a one-to-one correspondence f
from the set of positive integers to a set S can be
expressed in terms of a sequence a1,a2,…, an ,… where
a1 = f(1), a2 = f(2),…, an = f(n),…

88
Hilbert’s Grand Hotel
希尔伯特大饭店

某些对有限集不可能的事情对无限集变得可能。
The Grand Hotel (example due to David Hilbert) has countably
infinite number of rooms, each occupied by a guest. We can
always accommodate a new guest at this hotel. How is this
possible?

are countable, we can list them as Room 1, Room


Explanation: Because the rooms of Grand Hotel

2, Room 3, and so on.

Room 1 to Room 2, the guest in Room 2 to Room


When a new guest arrives, we move the guest in

3, and in general the guest in Room n to Room n


+ 1, for all positive integers n. This frees up
Room 1, which we assign to the new guest, and
The hotel can also accommodate a countable number
of new guests, all the guests on a countable number of
all the current guests still have rooms. buses where each bus contains a countable number of
guests (see exercises).
89
Showing that a Set is Countable

Example 1: Show that the set of positive even integers E is


countable set. 正偶数集是可数集。
Solution: Let f(x) = 2x.
1 2 3 4 5 6 …..

2 4 6 8 10 12 ……
Then f is a bijection from N to E since f is both one-to-one

f(n) = f(m). Then 2n = 2m, and so n = m. To see that it is


and onto. To show that it is one-to-one, suppose that

t = 2k for some positive integer k and f(k) = t.


onto, suppose that t is an even positive integer. Then

90
Showing that a Set is Countable

Example 2: Show that the set of integers Z is countable. 整数集是可


数集。

0, 1, − 1, 2, − 2, 3, − 3 ,………..
Solution: Can list in a sequence:

Or can define a bijection from N to Z:

f(n) = −(n−1)/2
• When n is even: f(n) = n/2
• When n is odd:

91
The Positive Rational Numbers are Countable
有理数集是可数集

Example 3: Show that the positive rational numbers are countable.

Solution:The positive rational numbers are


countable since they can be arranged in a
sequence

First list p/q with p + q = 2.


Constructing the List

Next list p/q with p + q = 3

And so on.
1, ½, 2, 3, 1/3,1/4, 2/3, ….

92
Strings 有限字母表下的字符串集是可数集

Example 4: Show that the set of strings S over a finite


alphabet A (有限字母表) is countably infinite.
Assume an alphabetical ordering of symbols in A
Solution: Show that the strings can be listed in a

1. All the strings of length 0 in alphabetical order.


sequence. First list

2. Then all the strings of length 1 in lexicographic (as in a

3. Then all the strings of length 2 in lexicographic order.


dictionary) order.

4. And so on.
This implies a bijection from N to S and hence it is a
countably infinite set.
93
The set of all Java programs is countable.

Example 5: Show that the set of all Java programs is


countable.
[Since each program can be viewed as a string.]

94
The Real Numbers are Uncountable 实数集是不可数集

Example: Show that the set of real numbers is uncountable.


Solution: The method is called the Cantor diagnalization argument 对角线论证 , and is a

1. Suppose R is countable. Then the real numbers between 0 and 1 are also countable.
proof by contradiction. 归谬法

2. The real numbers between 0 and 1 can be listed in order r1 , r2 , r3 ,… .


3. Let the decimal representation of this listing be

4. Form a new real number with the decimal expansion


where
5. r is not equal to any of the r1 , r2 , r3 ,... Because it differs from ri in its ith position
after the decimal point.

Hence, all the real numbers between 0 and 1 cannot be listed, so the set of real
numbers between 0 and 1 is uncountable. So the set of real numbers is
6.

uncountable.
95
康托尔定理( * )

• 康托尔定理:设 X 是任意一个集合,那么 X 和它的幂集有不同的基数。

• ℵ0 < 2^ ℵ0 < 2^ (2^ℵ0)<…

• 无穷集有着不同的数量级,有不同的层次,而且是无穷多个层次!
• 热闹的无限王国。

96
97
Computability 可计算性

• Definition: We say that a function is computable if there is a


computer program in some programming language that finds the
values of this function. If a function is not computable we say it is
uncomputable.
• There are uncountably many different functions from a particular
countably infinite set (i.e., the positive integers) to itself.

• We have shown that the set of programs is countable. Therefore,


there must be uncomputable functions.
98
THE CONTINUUM HYPOTHESIS 连续统假设

• The famous continuum hypothesis, asserts that there is


no cardinal number X between ℵ0 and

• 在 ZFC 公理集合论下,连续统假设不能证明也不能证伪。

99

You might also like