版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 消化内科护理中的健康教育
- 烟草企业应急管理指南
- 电梯运行试验记录(完整版)
- (完整版)UASB反应器施工方案(专家论证版)
- 专科护士培养方案
- 护理急救与重症监护
- 早期康复护理的国际交流
- 标杆病房的护理管理:策略与实践
- X射线光电子能谱元素价态分析实验报告
- 医院放射科大型设备散热及线路检查台账
- 2024-2025学年辽宁省丹东市第十九中学七年级下学期期中考试数学试题
- 幼儿园中班数学课《认识数字1-10》课件
- 2024广东海洋大学教师招聘考试真题及答案
- 劳技课编手链课件
- 猫宁供应商入驻考试答案50题苏宁考试题库
- 2025年人教版七年级数学下册期中复习题(基础版)(范围:相交线与平行线、实数、平面直角坐标系)解析版
- 武侯祠历史讲解
- 推进信息化建设“十五五”规划-(2025-2025年)-根据学校十五五
- 2025年高考数学全国一卷试题真题及答案详解(精校打印)
- 2025年中考一模卷(贵州)历史试题含答案解析
- 商业购物中心广告氛围形象管理规范课件分享
评论
0/150
提交评论