当前位置:网站首页>[set theory] inclusion exclusion principle (including examples of exclusion principle)
[set theory] inclusion exclusion principle (including examples of exclusion principle)
2022-07-03 04:09:00 【Programmer community】
List of articles
- One 、 Principle of tolerance and exclusion
- Two 、 Principle of tolerance and exclusion Example
One 、 Principle of tolerance and exclusion
A
1
,
A
2
,
⋯
,
A
n
A_1 , A_2 , \cdots , A_n
A1,A2,⋯,An yes
n
n
n A collection of ; be this
n
n
n A collection of Number of elements in union yes :
∣
⋃
i
=
1
n
A
i
∣
=
∑
i
=
1
n
∣
A
i
∣
−
∑
i
<
j
∣
A
i
∩
A
j
∣
+
∑
i
<
j
<
k
∣
A
i
∩
A
j
∩
A
k
∣
−
⋯
+
(
−
1
)
n
−
1
∣
A
1
∩
A
2
∩
⋯
∩
A
n
∣
| \bigcup_{i=1}^{n} A_i | = \sum_{i = 1}^n | A_i | - \sum_{i < j} | A_i \cap A_j | + \sum_{i < j < k} | A_i \cap A_j \cap A_k | - \cdots + ( -1 )^{n - 1} | A_1 \cap A_2 \cap \cdots \cap An |
∣i=1⋃nAi∣=i=1∑n∣Ai∣−i<j∑∣Ai∩Aj∣+i<j<k∑∣Ai∩Aj∩Ak∣−⋯+(−1)n−1∣A1∩A2∩⋯∩An∣
analysis :
n
n
n After the union operation of sets , Element number , Usually use Principle of tolerance and exclusion Calculate ;
∑
i
=
1
n
∣
A
i
∣
\sum_{i = 1}^n | A_i |
∑i=1n∣Ai∣ : In each set Element number Add up , The value is greater than Total elements , Need to be corrected ; ( Coefficient value
(
−
1
)
0
(-1)^0
(−1)0 )
∑
i
<
j
∣
A
i
∩
A
j
∣
\sum_{i < j} | A_i \cap A_j |
∑i<j∣Ai∩Aj∣ : Subtract the number of intersecting elements , This value is less than Total elements , Continue to make corrections ; ( Coefficient value
(
−
1
)
1
(-1)^1
(−1)1 )
∑
i
<
j
<
k
∣
A
i
∩
A
j
∩
A
k
∣
\sum_{i < j < k} | A_i \cap A_j \cap A_k |
∑i<j<k∣Ai∩Aj∩Ak∣ : Add the number of elements intersected by the three sets , The value is greater than Total elements , Continue to make corrections ; ( Coefficient value
(
−
1
)
2
(-1)^2
(−1)2 )
Subtract the number of elements intersected by the four sets , The value is less than Total elements , Continue to make corrections ; ( Coefficient value
(
−
1
)
3
(-1)^3
(−1)3 )
⋮
\vdots
⋮
(
−
1
)
n
−
1
∣
A
1
∩
A
2
∩
⋯
∩
A
n
∣
( -1 )^{n - 1} | A_1 \cap A_2 \cap \cdots \cap An |
(−1)n−1∣A1∩A2∩⋯∩An∣ : add
(
−
1
)
n
−
1
( -1 )^{n - 1}
(−1)n−1 multiply
n
−
1
n-1
n−1 The number of elements intersected by sets ; ( Coefficient value
(
−
1
)
n
−
1
(-1)^{n-1}
(−1)n−1 )
Above Odd sets Number of intersection elements The former coefficient is Positive numbers , Even number of sets Number of intersection elements The former coefficient is negative ;
Two 、 Principle of tolerance and exclusion Example
1
1
1 ~
10000
10000
10000 Between , It is neither the square of an integer , It's not the cube of an integer , Number of ?
The complete :
E
E
E A set is a complete set , yes
1
1
1 To
10000
10000
10000 The natural number of ,
E
E
E The number of sets
∣
E
∣
=
10000
|E| = 10000
∣E∣=10000
The set of numbers corresponding to square
A
A
A :
A
A
A A set is Some number The square of Corresponding Some number aggregate ,
A
=
{
x
∈
E
∣
x
=
k
2
∧
k
∈
Z
}
A = \{ x \in E | x = k^2 \land k \in Z \}
A={ x∈E∣x=k2∧k∈Z} ,
A
A
A The number of set elements is
∣
100
∣
|100|
∣100∣ ;
10
0
2
=
10000
100^2 = 10000
1002=10000 , therefore
A
A
A The elements of the set are
{
0
,
1
,
2
,
⋯
,
100
}
\{0, 1, 2 , \cdots , 100 \}
{ 0,1,2,⋯,100} , The number of elements is
100
100
100 individual ;
1
2
,
2
2
,
3
3
,
⋯
,
10
0
2
1^2 , 2^2 , 3^3, \cdots ,100^2
12,22,33,⋯,1002 All in
1
1
1 To
10000
10000
10000 Between ,
10
1
2
=
10201
101^2 = 10201
1012=10201 More than
10000
10000
10000 了 ;
The set of numbers corresponding to the cube
B
B
B :
B
B
B A set is Some number The cube of Corresponding Some number aggregate ,
B
=
{
x
∈
E
∣
x
=
k
3
∧
k
∈
Z
}
B = \{ x \in E | x = k^3 \land k \in Z \}
B={ x∈E∣x=k3∧k∈Z} ,
A
A
A The number of set elements is
∣
21
∣
|21|
∣21∣ ;
2
1
3
=
9261
21^3 = 9261
213=9261 , therefore
B
B
B The elements of the set are
{
0
,
1
,
2
,
⋯
,
21
}
\{0, 1, 2 , \cdots , 21 \}
{ 0,1,2,⋯,21} , The number of elements is
21
21
21 individual ;
1
3
,
2
3
,
3
3
,
⋯
,
2
1
3
1^3 , 2^3 , 3^3, \cdots ,21^3
13,23,33,⋯,213 All in
1
1
1 To
10000
10000
10000 Between ,
2
2
2
=
10648
22^2 = 10648
222=10648 More than
10000
10000
10000 了 ;
Calculation
A
∩
B
A \cap B
A∩B Intersection of sets
C
C
C : Element number , Is square , It's cubic again , It must be a number to the power of six ,
C
=
{
x
∈
E
∣
x
=
k
6
∧
k
∈
Z
}
C= \{ x \in E | x = k^6 \land k \in Z \}
C={ x∈E∣x=k6∧k∈Z} ,
C
C
C The number of elements in the set is
4
4
4 ;
4
6
=
4096
4^6 = 4096
46=4096 , therefore
C
C
C The elements of the set are
{
1
,
2
,
3
,
4
}
\{1, 2 , 3, 4\}
{ 1,2,3,4} , The number of elements is
4
4
4 individual ;
1
6
,
2
6
,
3
6
,
4
6
1^6 , 2^6 , 3^6, 4^6
16,26,36,46 All in
1
1
1 To
10000
10000
10000 Between ,
5
6
=
15
,
625
5^6 = 15,625
56=15,625 More than
10000
10000
10000 了 ;
The title can be translated into : aggregate
Z
Z
Z in , Neither belong to
A
A
A aggregate , Have not belong to
B
B
B aggregate The number of ;
aggregate
A
A
A And aggregate
B
B
B Union is
A
∪
B
A \cup B
A∪B
The above union Of Absolute complement
∼
(
A
∪
B
)
\sim ( A \cup B )
∼(A∪B) Element number
∣
∼
(
A
∪
B
)
∣
|\sim ( A \cup B ) |
∣∼(A∪B)∣ , It is the result required in the title ;
∣
∼
(
A
∪
B
)
∣
=
∣
E
∣
−
∣
A
∪
B
∣
|\sim ( A \cup B ) | = |E| - |A \cup B|
∣∼(A∪B)∣=∣E∣−∣A∪B∣
In the above formula ,
∣
E
∣
=
10000
|E| = 10000
∣E∣=10000 ,
∣
A
∪
B
∣
|A \cup B|
∣A∪B∣ Value can be used Principle of tolerance and exclusion Calculate ;
∣
A
∪
B
∣
|A \cup B|
∣A∪B∣ The number of elements of the union of two sets , You can add the number of elements of two sets , Then subtract the number of elements of the intersection of two sets ;
∣
A
∪
B
∣
=
∣
A
∣
+
∣
B
∣
−
∣
A
∪
B
∣
=
100
+
21
−
4
=
117
|A \cup B| = |A| + |B| - |A \cup B| = 100 + 21 - 4 = 117
∣A∪B∣=∣A∣+∣B∣−∣A∪B∣=100+21−4=117
Substitute into the general formula :
∣
∼
(
A
∪
B
)
∣
=
∣
E
∣
−
∣
A
∪
B
∣
=
10000
−
117
=
9883
|\sim ( A \cup B ) | = |E| - |A \cup B| = 10000 - 117 = 9883
∣∼(A∪B)∣=∣E∣−∣A∪B∣=10000−117=9883
边栏推荐
- QSAR model establishment script based on pytoch and rdkit
- 2022年已过半,得抓紧
- JS realizes lazy loading of pictures
- 在 .NET 6 项目中使用 Startup.cs
- 『期末复习』16/32位微处理器(8086)基本寄存器
- China Mobile Internet of things oneos and onenet were selected in the list of 2021 Internet of things demonstration projects
- Social phobia of contemporary young people (III)
- The time has come for the domestic PC system to complete the closed loop and replace the American software and hardware system
- [Apple Photo Album push] IMessage group anchor local push
- JS实现图片懒加载
猜你喜欢
【刷题篇】多数元素(超级水王问题)
Cnopendata China Customs Statistics
[Apple Photo Album push] IMessage group anchor local push
Which code editor is easy to use? Code editing software recommendation
pytorch是什么?pytorch是一个软件吗?
The latest analysis of the main principals of hazardous chemical business units in 2022 and the simulated examination questions of the main principals of hazardous chemical business units
国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
Busycal latest Chinese version
学会pytorch能干什么?
Is it better to speculate in the short term or the medium and long term? Comparative analysis of differences
随机推荐
毕设-基于SSM宠物领养中心
Commands related to the startup of redis under Linux server (installation and configuration)
Nodejs Foundation: shallow chat URL and querystring module
xrandr修改分辨率与刷新率
Interface embedded in golang struct
『期末复习』16/32位微处理器(8086)基本寄存器
国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
深潜Kotlin协程(十九):Flow 概述
In Net 6 project using startup cs
2022-07-02:以下go语言代码输出什么?A:编译错误;B:Panic;C:NaN。 package main import “fmt“ func main() { var a =
【刷题篇】 找出第 K 小的数对距离
CVPR 2022 | 大连理工提出自校准照明框架,用于现实场景的微光图像增强
vim 的实用操作
Basic syntax of class
2022 polymerization process examination questions and polymerization process examination skills
[set theory] set concept and relationship (set represents | number set | set relationship | contains | equality | set relationship property)
"Designer universe" argument: Data Optimization in the design field is finally reflected in cost, safety and health | chinabrand.com org
学会pytorch能干什么?
How to connect WiFi with raspberry pie
Half of 2022 is over, so we must hurry up