- 1、本文档共165页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
离散数学第七版2.1~2.6
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * We will see this basic counting principle again when we talk about combinatorics. * NOT (x in A - x in B) = NOT (x not in A or x in B) (defn. of implies) = x in A AND x not in B (DeMorgan’s law). * * * * Note that set difference and complement do not relate to each other like arithmetic difference and negative. In arithmetic, we know that a-b = -(b-a). But in sets, A-B is not generally the same as the complement of B-A. * * * A membership table is like a truth table. * * * * * * * * * * So, for example, on a 64-bit processor, using just a single machine-language instruction you can calculate the union or intersection of two sets out of a universe of discourse having up to 64 elements. This leads to an extremely fast way of doing complicated calculations on small sets. It is not a good method for large, sparsely populated sets, because searching the bit string to find which bits are “1” can take a long time. * * * * * * * * * * * * Zero-One Matrices Useful for representing other structures. E.g., relations, directed graphs (later in this course) All elements of a zero-one matrix are either 0 or 1 Representing False True respectively. The join of A, B (both m?n zero-one matrices): A?B :? [aij?bij] The meet of A, B: A?B :? [aij?bij] = [aij bij] The 1’s in A join the 1’s in Bto make up the 1’s in C. Where the 1’s in A meet the 1’s in B, we find 1’s in C. Joins and Meets of Zero-One Matrices Example: Find the join and meet of the zero-one matrices Solution: The join of A and B is The meet of A and B is Boolean Products Let A=[aij] be an m?k zero-one matrix, let B=[bij] be a k?n zero-one matrix, The boolean product of A and B is like normal matrix ?, but using ? instead of + in the row-column “vector dot product”: A⊙B Boolean Powers For a square zero-one matrix A, and any k?0, the kth Boolean power of A is simply the Boolean product of k copies of A. A[k] :? A⊙A⊙…⊙A A[0
文档评论(0)