Chap 2
Chap 2
Sums
2.1 Sets
Sets are used to group objects together.
2-1
FIGURE 2 Venn Diagram Showing that A Is a Subset of B.
DEFINITION 7: The power set of S is the set of all subsets of the set S
(denoted P(S)). (包含 空集合 與 自己本身)
2-2
Example 16 What is the Cartesian product of A={1, 2} and B={a, b, c}
Sol: A x B ={(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
Example 20 The domain is the set of integers, and P(x) is “|x| = 1”;
Q(x) is “x2 = 2,” and R(x) is “|x| = x.”
Sol: Truth set of P = {1, -1}; Q(x) = ; R(x) = N(自然數)
2-3
2.2 Set Operations
DEFINITION 1: The union (聯集) of two sets A and B, denoted by A∪B, is
the set containing those elements either in A or B.
DEFINITION 3: Two sets are called disjoint if their intersection is the empty
set. (不相交)
集合元素個數:
2-4
DEFINITION 4: The difference (差集) of A and B, denoted by A – B, is the
set containing those elements are in A but not in B. (also
called the completement of B with respect to A)
2-5
De Morgan law: (類似 邏輯運算,AND(交集) 改為 OR(聯集),反之亦然)
2-6
n
A1 A2 ... An Ai
i 1
n
A1 A2 ... An Ai
i 1
2-7
(用 bit 0, 1 代表該位置 (集合)是否存有此 data,此結果與將 1, 0 看成真、假,
EXERCISES (p. 130 ~ 132): 1, 3, 9, 15, 25, 27, 37, 43, 45, 51, 59
2-8
2.3 Functions (也稱為 mapping or transformations)
2-9
Sol: Domain= the set of real numbers; codomain= integers
2-10
FIGURE 3 A One-to-One Function.
(一對一全對應:一對一且完整涵蓋)
2-11
報告中,參考文獻
-1
FIGURE 6 The Function f Is the Inverse of Function f.
The one-to-one correspondence is called invertible.
Example 17 Let f: Z -> Z be such that f(x) = x+1. Is f invertible, and if it is,
what is its inverse?
Sol: Let y=f(x) = x+1, then x = y-1. This means that y-1 is the unique element
of Z. Consequently, f -1(y) = x = y-1.
2-12
Composition:
Example:
2-13
FIGURE 8 The Graph of f(n) = 2n + 1 from Z to Z.
DEFINITION 12. The floor function x assigns the real number x to the
largest integer that is less than or equal to x,
2-14
the ceiling function x assigns the real number x to the smallest integer
that is greater than or equal to x.
x x
FIGURE 10 Graphs of the (a) Floor and (b) Ceiling Functions.
1 1 1 1
Example 24 2 0, 2 1, -
2 1, - 2 0, 3.1 3, 3.1 4,
7 7, 7 7
≤ +
≤ 符號訂正:
≤ : , : +
≤ +
+
+
+
EXERCISES (p. 146 ~ 149): 3, 7, 9, 15, 19, 27, 31, 39, 55, 57, 65, 73
2-15
2.4 Sequences (序列) and Summations
When the elements of an infinite set can be listed, the set is countable. So, the
set of rational number is countable, but the set of real numbers is not.
DEFINITION 1: A sequence is a function from a subset of the set of integers
to a set S. We use an to denote a term of sequence.
(Def 2: 等比 級數(幾何級數))
(Def 3: 等差 級數(數學級數))
Summations:
2-16
(see p.19 Example 18)
2-17
Pf:
Example 13
Example 15
2-18
Example 16
( |x| < 1 )
Example 17
(由上例得)
微分
Example 18. From Example 17 (differentiation (微分)):
1
(1 x) 1
(1 x)
微分 (1 - x) -1 (1)(1 x) 2 (1)
(1 - x) -2
Cardinality(元素個數)
2-19
(一個集合若為: 有限集合 或 與正整數集合有相同個數(infinite),則為
countable)
正有理數
2-20
1000 對應到何數? 解法: 1 + 2 + … + k 1000, k=44,
2-21