07a关系的定义200612.ppt

  1. 1、本文档共15页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
07a关系的定义200612

关系的定义 Relation 相关内容的回顾 关系的定义 关系的域 Relations as Subsets of Cartesian Products Relations as Subsets of Cartesian Products Graph Example Relations as Subsets of Cartesian Products Relations as Subsets of Cartesian Products Relations as Subsets: ?, ?, ?, -,? Relations as Subsets: ?, ?, ?, -,? 思考 特殊的关系 关系的表示 课本练习 * * 第十三讲 序偶:有序的偶对 序偶相等的定义: x,y = u,v ? x=u 且 y=v 集合A、B的笛卡儿乘积 A?B = ?x,y?(x?A)∧(y?B)? 性质:A?B ? B?A 关系是两个集合的笛卡儿乘积的子集。 关系R是序偶的集合: 若x,y?R则记为xRy 若x,y?R则记为xRy 集合A到集合B的关系:A?B的子集 集合A上的关系: A?A的子集 关系R的前域:domR = { x | (?y)(x,y?R)} 关系R的值域: ranR = { y | (?x)(x,y?R)} 若R?A?B ,则domR?A 且 ranR?B 关系的域 FLD R= domR∪ranR 因为 R ? A?B ? (A∪B) ? (A∪B),所以: A到B的关系是(A∪B)上的关系 见课本P106 例题1、2、3 DEF: Let A1, A2, … , An be sets. An n-ary relation on these sets (in this order) is a subset of A1×A2× … ×An. Most of the time we consider n = 2 in which case have a binary relation and also say the the relation is “from A1 to A2”. With this terminology, all functions are relations, but not vice versa. Q: What additional property ensures that a relation is a function? A: Vertical line test : For every a in A1 there is a unique b in A2 for which (a,b) is in the relation. Here A1 is thought of as the x-axis, A2 is the y-axis and the relation is represented by a graph. Q: How can this help us visualize the square root function: x y A: Visualize both branches of solution to x = y 2 as the graph of a relation: Q: How many n-ary relations are there on A1, A2, … , An ? A: Just the number of subsets of A1×A2× … ×An or 2|A1|·|A2|· … ·|An| DEF: A relation on the set A is a subset of A × A. Because relations are just subsets, all the usual set theoretic operations are defined between relations which belong to the same Cartesian product. Q: Suppose we have relations on {1,2} given by R = {(1,1), (2,2)}, S = {(1,1),(1,2)}. Find: The union R ?S The intersection R ? S The symmetric difference R ?S The difference R-S The complement R A: R = {(1,1),(2,2)}, S = {(1,1),(1,2)

文档评论(0)

xy88118 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档