離散數(shù)學(xué)英文課件:DM_lecture2_2 The Union Operator_第1頁(yè)
離散數(shù)學(xué)英文課件:DM_lecture2_2 The Union Operator_第2頁(yè)
離散數(shù)學(xué)英文課件:DM_lecture2_2 The Union Operator_第3頁(yè)
離散數(shù)學(xué)英文課件:DM_lecture2_2 The Union Operator_第4頁(yè)
離散數(shù)學(xué)英文課件:DM_lecture2_2 The Union Operator_第5頁(yè)
已閱讀5頁(yè),還剩24頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、2.2: The Union Operator,For sets A, B, their union AB is the set containing all elements that are either in A, or (“”) in B (or, of course, in both). Formally, A,B: AB = x | xA xB. Note that AB is a superset of both A and B (in fact, it is the smallest such superset): A, B: (AB A) (AB B),a,b,c2,3 =

2、a,b,c,2,3 2,3,53,5,7 = 2,3,5,3,5,7 =2,3,5,7,Union Examples,The Intersection Operator,For sets A, B, their intersection AB is the set containing all elements that are simultaneously in A and (“”) in B. Formally, A,B: AB=x | xA xB. Note that AB is a subset of both A and B (in fact it is the largest su

3、ch subset): A, B: (AB A) (AB B),a,b,c2,3 = _ 2,4,63,4,5 = _,Intersection Examples,4,Disjointedness,Two sets A, B are calleddisjoint (i.e., unjoined)iff their intersection isempty. (AB=) Example: the set of evenintegers is disjoint withthe set of odd integers.,Set Difference,For sets A, B, the differ

4、ence of A and B, written AB, is the set of all elements that are in A but not B. Formally: A B : x xA xB x xA xB Also called: The complement of B with respect to A.,Set Difference Examples,1,2,3,4,5,6 2,3,5,7,9,11 = _ Z N , 1, 0, 1, 2, 0, 1, = x | x is an integer but not a nat. # = x | x is a negati

5、ve integer Result = , 3, 2, 1,1,4,6,Set Difference,AB is whats left after B“takes a bite out of A”,Set A,Set B,Symmetric Difference,For sets A, B, the symmetric difference of A and B, written A B, is the set:A B : (A B) (B A) (A B) (A B) E.g. A= 1, 2, 3, 4, 5, B = 4, 5, 6, 7, 8, A B= 1, 2, 3, 6, 7,

6、8,Set Complements,When the context clearly defines The universe of discourse U, we say that for any set AU, the complement of A, written , is the complement of A w.r.t. U, i.e., it is UA. E.g., If U=N, Note: Alternative notation is Ac, and x| xU and x A.,More on Set Complements,An equivalent definit

7、ion, when U is clear:,A,U,Set Identities,Identity: A = A = AU Domination: AU = U, A = Idempotent: AA = A = AA Double complement: Commutative: AB = BA, AB = BA Associative: A(BC)=(AB)C , A(BC)=(AB)C Distributive: ()=()() ()=()(),DeMorgans Law for Sets,Exactly analogous to (and provable from) DeMorgan

8、s Law for propositions. Dont memorize them, understand them!,Proving Set Identities,To prove statements about sets, of the form E1 = E2 (where the Es are set expressions), here are three useful techniques: 1. Prove E1 E2 and E2 E1 separately. 2. Use set builder notation & logical equivalences. 3. Us

9、e a membership table.,Method 1: Mutual subsets,Example: Show A(BC)=(AB)(AC). Part 1: Show A(BC)(AB)(AC). Assume xA(BC), & show x(AB)(AC). We know that xA, and either xB or xC. Case 1: xB. Then xAB, so x(AB)(AC). Case 2: xC. Then xAC , so x(AB)(AC). Therefore, x(AB)(AC). Therefore, A(BC)(AB)(AC). Par

10、t 2: Show (AB)(AC) A(BC). ,Method 2: Logical equivalence,Show or or is a tautology. But the consequent is always false. Therefore, the antecedent better always be false also.,Method 3: Membership Tables,Just like truth tables for propositional logic. Columns for different set expressions. Rows for a

11、ll combinations of memberships in constituent sets. Use “1” to indicate membership in the derived set, “0” for non-membership. Prove equivalence with identical columns.,Membership Table Example,Prove (AB)B = AB.,Membership Table Exercise,Prove (AB)C = (AC)(BC).,Generalized Unions & Intersections,Sin

12、ce union & intersection are commutative and associative, we can extend them from operating on ordered pairs of sets (A,B) to operating on sequences of sets (A1,An), or even on unordered sets of sets, X=A | P(A).,Generalized Union,Binary union operator: AB n-ary union:AA2An : (A1 A2) ) An)(grouping &

13、 order is irrelevant) “Big U” notation: Or for infinite sets of sets:,Generalized Intersection,Binary intersection operator: AB n-ary intersection:A1A2An(A1A2)An)(grouping & order is irrelevant) “Big Arch” notation: Or for infinite sets of sets:,Examples,Let,Examples,if Then Then,Inclusion/Exclusion

14、,Example: How many people are wearing a watch? How many people are wearing sneakers?,How many people are wearing a watch OR sneakers?,|A B| = |A| + |B| - |A B|,Generalized Inclusion/Exclusion,Suppose we have:,And I want to know |A U B U C|,|A U B U C| = |A| + |B| + |C|,+ |A B C|,- |A B| - |A C| - |B

15、 C|,Representations,A frequent theme of this course will be methods of representing one discrete structure using another discrete structure of a different type. E.g., one can represent natural numbers as Bit strings: 0:0, 1:1, 2:10, 3:11, 4:100, ,Representing Sets with Bit Strings,For an enumerable u.d. U with ordering x1, x2, , represent a finite set SU as the finite bit string B=b1b2bn wherei: xiS (in bi=1). e.g. U=N, S=2,3,5,7,11, B=001101010001. In this repr

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論