Discrete Mathematics Chapter 2 Basic Structures : Sets, Functions, Sequences, and Sums 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)

Slides:



Advertisements
Similar presentations
1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Advertisements

Installment 7 Tables With No Column Presented by rexmen 2001 資管所.林彥廷.
Chapter 3 Determinants and Eigenvectors 大葉大學 資訊工程系 黃鈴玲 Linear Algebra.
1 生物計算期末作業 暨南大學資訊工程系 2003/05/13. 2 compare f1 f2  只比較兩個檔案 f1 與 f2 ,比完後將結果輸出。 compare directory  以兩兩比對的方式,比對一個目錄下所有檔案的相 似程度。  將相似度很高的檔案做成報表輸出,報表中至少要.
: Arrange the Numbers ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 11481: Arrange the Numbers 解題者:李重儀 解題日期: 2008 年 9 月 13 日 題意: 將數列 {1,2,3, …,N}
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
Section 1.2 Describing Distributions with Numbers 用數字描述分配.
1 集合論 Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very.
如何將數字變成可用之資訊 現代化資料處理與應用概念. 如何將數字變成可用之資訊 人最容易接受的訊息是圖像化資訊。 在一堆數字中,要進行比較分析,一般會使用表格形 式計算與分析。 所以一般我們會將數字依關聯性, 轉換成表格計算與分析。 此表格一般稱試算表或稱表格。 再將結果轉換為圖表,進行比較與分析。
1.1 線性方程式系統簡介 1.2 高斯消去法與高斯-喬登消去法 1.3 線性方程式系統的應用(-Skip-)
STAT0_sampling Random Sampling  母體: Finite population & Infinity population  由一大小為 N 的有限母體中抽出一樣本數為 n 的樣 本,若每一樣本被抽出的機率是一樣的,這樣本稱 為隨機樣本 (random sample)
Lecture Note of 9/29 jinnjy. Outline Remark of “Central Concepts of Automata Theory” (Page 1 of handout) The properties of DFA, NFA,  -NFA.
MATLAB 程式設計 第 11 章 多維陣列 多維陣列的定義 在 MATLAB 的資料型態中,向量可視為 一維陣列,矩陣可視二維陣列,對於維 度 (Dimensions) 超過 1 的陣列則均可視 為「多維陣列」 (Multidimesional Arrays , 簡稱 N-D Arrays)
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
2009fallStat_samplec.i.1 Chap10 Sampling distribution (review) 樣本必須是隨機樣本 (random sample) ,才能代表母體 Sample mean 是一隨機變數,隨著每一次抽出來的 樣本值不同,它的值也不同,但會有規律性 為了要知道估計的精確性,必需要知道樣本平均數.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
Digital Signal Processing with Examples in M ATLAB ® Chap 1 Introduction Ming-Hong Shih, Aug 25, 2003.
3.1 矩陣的行列式 3.2 使用基本運算求行列式 3.3 行列式的性質 3.4 特徵值介紹 3.5 行列式的應用
: Problem A : MiniMice ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11411: Problem A : MiniMice 解題者:李重儀 解題日期: 2008 年 9 月 3 日 題意:簡單的說,題目中每一隻老鼠有一個編號.
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
:Nuts for nuts..Nuts for nuts.. ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 10944:Nuts for nuts.. 解題者:楊家豪 解題日期: 2006 年 2 月 題意: 給定兩個正整數 x,y.
1 Finite Continued Fractions 田錦燕 94/11/03 95/8/9( 最後更新 )
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2008.
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
: THE SAMS' CONTEST ☆☆★★★ 題組: Problem Set Archive with Online Judge 題號: 10520: THE SAMS' CONTEST 解題者:陳相廷,林祺光 解題日期: 2006 年 5 月 22 日 題意:依以下式子,給定 n.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
-Antidifferentiation- Chapter 6 朝陽科技大學 資訊管理系 李麗華 教授.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Chapter 10 m-way 搜尋樹與B-Tree
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
2005/7 Linear system-1 The Linear Equation System and Eliminations.
冷凍空調自動控制 - 系統性能分析 李達生. Focusing here … 概論 自動控制理論發展 自控系統設計實例 Laplace Transform 冷凍空調自動控制 控制系統範例 控制元件作動原理 控制系統除錯 自動控制理論 系統穩定度分析 系統性能分析 PID Controller 自動控制實務.
Visual C++重點複習.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2008.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2010.
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
: Finding Paths in Grid ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11486: Finding Paths in Grid 解題者:李重儀 解題日期: 2008 年 10 月 14 日 題意:給一個 7 個 column.
Set Theory Sets 許多數學上的討論中(例如: algebra 、 analysis 、 geometric 等等) 經常藉助集合論中的符號或術語來說 明。集合論是十九世紀後期由 Boole ( 布爾; 1815~1864) 及 Cantor ( 康托爾; 1845 ~ 1918) 所發展出來的。
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2009.
1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 3 Set Theory.
: How many 0's? ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11038: How many 0’s? 解題者:楊鵬宇 解題日期: 2007 年 5 月 15 日 題意:寫下題目給的 m 與 n(m
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Discrete Mathematics Chapter 4 Induction and Recursion 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Sequences and Summations
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Discrete Mathematics Chapter 1 The Foundations : Logic and Proofs, Sets, and Functions 大葉大學 資訊工程系 黃鈴玲.
Discrete Mathematics Chapter 1 The Foundations : Logic and Proofs 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)
Discrete Mathematics Chapter 3 Mathematical Reasoning, Induction, and Recursion 感謝 大葉大學 資訊工程系 黃鈴玲老師 提供.
ICS 253: Discrete Structures I
Graph Theory Chapter 7 Eulerian Graphs 大葉大學 (Da-Yeh Univ.) 資訊工程系 (Dept. CSIE) 黃鈴玲 (Lingling Huang)
Discrete Mathematics Chapter 7 Advanced Counting Techniques 大葉大學 資訊工程系 黃鈴玲.
Graph Theory Chapter 6 Matchings and Factorizations 大葉大學 (Da-Yeh Univ.) 資訊工程系 (Dept. CSIE) 黃鈴玲 (Lingling Huang)
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Chapter 3 Trees and Forests 大葉大學 資訊工程系 黃鈴玲
Discrete Mathematics Chapter 7 Relations 感謝 大葉大學 資訊工程系 黃鈴玲老師 提供.
Discrete Mathematics Section 3.7 Applications of Number Theory 大葉大學 資訊工程系 黃鈴玲.
Basic Structures: Sets, Functions, Sequences, and Sums.
Discrete Mathematics Chapter 5 Counting 大葉大學 資訊工程系 黃鈴玲.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Discrete Mathematics Chapter 6 Advanced Counting Techniques.
大葉大學 資訊工程系 黃鈴玲  G. Agnarsson and R. Greenlaw, Graph Theory: Modeling, Applications, and Algorithms, Pearson,  G. Chartrand and O. R. Oellermann,
Permutation A permutation of the numbers 1,2, and 3 is a rearrangement of these numbers in a definite order. Thus the six possibilities are
CS 2210:0001 Discrete Structures Sets and Functions
Discrete Math (2) Haiming Chen Associate Professor, PhD
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Presentation transcript:

Discrete Mathematics Chapter 2 Basic Structures : Sets, Functions, Sequences, and Sums 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)

2-1 Sets Def 1 : A set is an unordered collection of objects. Def 2 : The objects in a set are called the elements, or members of the set. Example 5 : 常見的重要集合  N = { 0,1,2,3,…}, the set of natural number ( 自然數 )  Z = { …,-2,-1,0,1,2,…}, the set of integers ( 整數 )  Z + = { 1,2,3,…}, the set of positive integers ( 正整數 )  Q = { p / q | p ∈ Z, q ∈ Z, q≠0 }, the set of rational numbers ( 有理數 )  R = the set of real numbers ( 實數 ) ( 元素可表示成 等小數形式 ) Ch2-2

Def 4 : A ⊆ B iff ∀ x, x ∈ A → x ∈ B 補充: A ⊂ B 表示 A ⊆ B 但 A ≠ B Def 5 : S : a finite set The cardinality of S, denoted by |S|, is the number of elements in S. Def 7 : S : a set The power set of S, denoted by P(S), is the set of all subsets of S. Example 13 : S = {0,1,2} P(S) = { , {0}, {1}, {2}, {0,1}, {0,2}, {1,2}, {0,1,2} } Def 8 : A, B : sets The Cartesian Product of A and B, denoted by A x B, is the set A x B = { (a,b) | a ∈ A and b ∈ B } Ch2-3

Note. |A x B| = |A| . |B| Example 16 : A = {1,2}, B = {a, b, c} A x B = {(1,a), (1,b), (1,c), (2,a), (2,b), (2,c)} Exercise : 5, 7, 8, 17, 21, 23 Ch2-4

2-2 Set Operations Def 1,2,4 : A,B : sets  A ∪ B = { x | x  A or x  B } (union)  A∩B = { x | x  A and x  B } (intersection)  A – B = { x | x  A and x  B } ( 也常寫成 A \ B) Def 3 : Two sets A,B are disjoint if A∩B =  Def 5 : Let U be the universal set. The complement of the set A, denoted by A, is the set U – A. Example 10 : Prove that A∩B = A ∪ B pf : 稱為 Venn Diagram Ch2-5

Def 6 : A 1, A 2, …, A n : sets Let I = {1,3,5}, Def : (p.131 右邊 ) A,B : sets The symmetric difference of A and B, denoted by A ⊕ B, is the set { x | x  A  B or x  B  A } = ( A ∪ B )  ( A ∩B ) ※ Inclusion – Exclusion Principle ( 排容原理 ) |A ∪ B| = |A| + |B|  |A ∩ B| Exercise : 14, 45 Ch2-6

2-3 Functions Def 1 : A,B : sets A function f : A → B is an assignment of exactly one element of B to each element of A. We write f (a) = b if b is the unique element of B assigned by f to a ∈ A. eg. Ch2-7 ABAB α β γ α β γ Not a function

Def : ( 以 f : A→B 為例,右上圖 ) f (α) = 1, f (β) = 4, f (γ) = 2 1 稱為 α 的 image (unique), α 稱為 1 的 pre-image(not unique) A : domain of f, B : codomain of f range of f = { f (a) | a ∈ A} = f (A) = {1,2,4} ( 未必 =B) Example 4 : f : Z → Z, f (x) = x 2, 則 f 的 domain, codomain 及 range? Ch2-8 AB 1 2 α β γ AB α β γ 4 a function

Example 6 : Let f 1 : R → R and f 2 : R → R s.t. f 1 (x) = x 2, f 2 (x) = x  x 2, What are the function f 1 + f 2 and f 1 f 2 ? Sol : ( f 1 + f 2 )(x) = f 1 (x) + f 2 (x) = x 2 + ( x – x 2 ) = x ( f 1 f 2 )(x) = f 1 (x) . f 2 (x) = x 2 ( x – x 2 ) = x 3 – x 4 Def 5: A function f is said to be one-to-one, or injective, iff f (x) ≠ f (y) whenever x ≠ y. Example 8 : Ch2-9 AB 1 2 a b c AB 1 2 a b c d d is 1-1 not 1-1, 因 g (a) = g (d) = 4 f g

Example 10 : Determine whether the function f (x) = x + 1 is one-to-one ? Sol : x ≠ y  x + 1 ≠ y + 1  f (x) ≠ f (y) ∴ f is 1-1 Def 7 : A function f : A → B is called onto, or surjective, iff for every element b ∈ B, ∃ a ∈ A with f (a) = b. ( 即 B 的所有 元素都被 f 對應到 ) Example 11 : Ch2-10 Note : 當 |A| < |B| 時, 必定不會 onto. onto a b c d f not onto AB a b c f

Def 8 : The function f is a one-to-one correspondence, or a bijection, if it is both 1-1 and onto. Examples in Fig 5 ※補充 : f : A →B (1) If f is 1-1, then |A| ≤ |B| (2) If f is onto, then |A| ≥ |B| (3) if f is 1-1 and onto, then |A| = |B|. Ch , not onto a b c not 1-1, onto a b c d 1-1 and onto a b c d

※ Some important functions Def 12 :  floor function : x : ≤ x 的最大整數,即 [ x ]  ceiling function : x : ≥ x 的最小整數. Example 24 : ½ = -½ = 7 = Example 29 :  factorial function : f : N → Z +, f ( n ) = n ! = 1 x 2 x … x n Exercise : 1,12,17,19 Ch2-12

2.4 Sequences and Summations ※ Sequence ( 數列 ) Def 1. A sequence is a function f from A  Z + (or A  N ) to a set S. We use a n to denote f ( n ), and call a n a term ( 項 ) of the sequence. Example 1. {a n }, where a n = 1/n, n  Z +  a 1 =1, a 2 =1/2, a 3 =1/3, … Example 2. {b n }, where b n = (  1) n, n  N  b 0 = 1, b 1 =  1, b 2 = 1, … Ch2-13

Example 7. How can we produce the terms of a sequence if the first 10 terms are 5, 11, 17, 23, 29, 35,41, 47, 53, 59 ? Sol : a 1 = 5 a 2 =11 = a 3 =17 = =  2 : :  a n =  (n  1) = 6n  1 Ch2-14

Example 8. Conjecture a simple formula for a n if the first 10 terms of the sequence {a n } are 1, 7, 25, 79, 241, 727, 2185, 6559, 19681, ? Sol : 顯然非等差數列 後項除以前項的值接近 3  猜測數列為 3 n  … 比較: {3 n } : 3, 9, 27, 81, 243, 729, 2187,… {a n } : 1, 7, 25, 79, 241, 727, 2185,…  a n = 3 n  2, n  1 Ch2-15

 Summations Here, the variable j is call the index of summation, m is the lower limit, and n is the upper limit. Ch2-16 Example 10. Example 13. (Double summation)

Example 14. Table 2. Some useful summation formulae Ch2-17

 Cardinality Def 4. The sets A and B have the same cardinality (size) if and only if there is a one-to-one correspondence (1-1 and onto function) from A to B. Def 5. A set that is either finite or has the same cardinality as Z + (or N) is called countable ( 可數 ). A set that is not countable is called uncountable. Ch2-18

Ch2-19 Example 18. Show that the set of odd positive integers is a countable set. Pf: (Figure 1) Z + : … …… { 正奇數 } : … f : Z +  {all positive integers} f ( n) = 2n – 1 is 1-1 & onto.

Example 19. Show that the set of positive rational number (Q + ) is countable. Ch2-20 ∴ Z + : 1, 2, 3, 4, 5, 6, 7, 8, 9 … Q + : ( 注意,因 等於 ,故 不算 ) ※ Note. R is uncountable. (Example 21) Exercise : 9,13,17,42 Pf: Q + = { a / b | a, b  Z + } (Figure 2) 1 1