《离散数学》杨争锋ch06-5

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
§7.5 Inclusion-Exclusion (容斥)
1. Introduction
Example 0 (page 499)
A discrete mathematics class contains 30 women and 50 sophomores (二年级学 生). How many students in the class are either women or sophomore?
B ------ the set of positive integers not exceeding 1000 that are divisible by 11
Then, A∪B ----- the set of integers not exceeding
1000 that are divisible by either 7 or 11
A∩B ----- the set of integers not exceeding 1000 that are divisible by both 7 and 11.
Further, we have: |A| = └ 1000/7 ┘= 142 |B| = └ 1000/11 ┘= 90 |A∩B| = └ 1000/(7∙11) ┘= 12
Further, we have:
|S|=1232, |F|=879, |R|=114, |S∪F|=103, |S∪R|=23, |F∪R|=14, and
|S∪F∪R|=2096
Inserting these questions into the equation
|S∪F∪R| = |S| + |F| + |R|
Solution: A------ the set of students in the class majoring in computer science B------ the set of students in the class majoring in mathematics
|A∪B| = |A|+|B|-|A∩B| = 25 + 13 -8 = 30
|A1∪A2∪…∪An|
=
∑1≤i≤n |Ai| - ∑1≤i<j≤n |Ai∩Aj|
+ ∑1≤i<j<k≤n |Ai∩Aj∩Ak| - ……..
+ (-1)n+1|A1∩A2∩…∩An|
Proof:
Please see page 503.
(6) Example 5 (page 504)
Given a formula for the number of elements in the union of four sets.
Therefore, |A∪B| = |A| + |B| - |A∩B| = 142 + 90 – 12 =220
(3) Example 3 (page 501)
Suppose that there are 1807 freshmen (大 学一年级学生) at your school. Of these, 453 are taking a course in computer science, 567 are taking a course in mathematics, and 299 are taking courses in both computer science and mathematics. How many are not taking a course either in computer science or maset of all freshmen taking a
course in computer science
B ----- the set of all freshmen taking a
course in mathematics
It follows that |A|=453, |B|=567, and |A∩B|=299.
(2) Example 2 (Page 501)
How many positive integers not exceeding 1000 are divisible by 7 or 11?
Solution:
A ------ the set of positive integers not exceeding 1000 that are divisible by 7
(4) Example 4 (page 502)
A total of 1232 students have taken a course in Spanish, 879 have taken a course in French, and 114 have taken a course in Russian. Further, 103 have taken courses in both Spanish and French, 23 have taken courses in both Spanish and Russian, and 14 have taken courses in both French and Russian. If 2092 students have taken at least one of Spanish, French, and Russian, how many students have taken a course in all three languages?
Assignments
• 2、8、16、20
Therefore, |A∪B| = |A| + |B| - |A∩B| = 721
Consequently, there are 1807-721=1086 freshmen who are not taking a course in computer science or mathematics.
Solution:
S ----- the set of students who have taken a course in Spanish
F ----- the set of students who have taken a course in French
R ----- the set of students who have taken a course in Russian
(1) Example 1 (page 500)
A discrete mathematics class contains 25 students majoring in computer science, 13 students majoring in mathematics, and eight joint mathematics and computer science majors. How many students are in this class, if every student is majoring in mathematics, computer science, or both mathematics and computer science?
Solution: |A1 ∪ A2 ∪ A3 ∪ A4|
= |A1| + |A2| + |A3| + |A4| - |A1∩A2| - |A1∩A3| - |A1∩A4| - |A2∩A3| - |A2∩A4| - |A3∩A4| +|A1∩A2∩A3|+|A1∩A2∩A4| +|A1∩A3∩A4|+|A2∩A3∩A4| - |A1∩A2∩A3∩A4|
Solution:
This question can not be answered unless more information is provided.
♦ ♦ ♦ ♦ need to know the number of women sophomores.
2. The Principle of Inclusion-Exclusion (容斥原理)
- |S∪F| - |S∪R| - |F∪R| + |S∩F∩R| Therefore, we have:
|S∩F∩R|=7
(5) The Principle of Inclusion-Exclusion
(容斥原理, page 503)
Let A1, A2, … , An be finite sets. Then
相关文档
最新文档