当前位置:网站首页>[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
2022-07-03 12:06:00 【Programmer community】
List of articles
- One 、 Arrange and combine content summary
- Two 、 Select the question
- 3、 ... and 、 Set arrangement
- Four 、 Ring arrangement
- 5、 ... and 、 Set combination
Reference blog :
- 【 Combinatorial mathematics 】 Basic counting principle ( The principle of addition | Multiplication principle )
- 【 Combinatorial mathematics 】 Examples of permutation and combination of sets ( array | Combine | Circular arrangement | binomial theorem )
One 、 Arrange and combine content summary
Arrange and combine content summary :
- Select the question
- The arrangement and combination of sets
- Application of basic counting formula
- The arrangement and combination of multiple sets
Two 、 Select the question
n
n
n Meta set
S
S
S , from
S
S
S Select... From the set
r
r
r Elements ;
according to Whether the element can be repeated , Whether the selection process is orderly , The selection question is divided into four sub types :
Elements do not repeat | Elements can be repeated | |
---|---|---|
Orderly selection | Set arrangement P ( n , r ) P(n,r) P(n,r) | Multiset arrangement |
Unordered selection | Set combination C ( n , r ) C(n,r) C(n,r) | Combination of multiple sets |
Select the question :
- Non repeatable elements , Orderly selection , Corresponding Arrangement of sets
- Non repeatable elements , Unordered selection , Corresponding A combination of sets
- Repeatable elements , Orderly selection , Corresponding Arrangement of multiple sets
- Repeatable elements , Unordered selection , Corresponding Combination of multiple sets
3、 ... and 、 Set arrangement
n
n
n Meta set
S
S
S , from
S
S
S Collection Orderly , No repetition selection
r
r
r Elements ,
This operation is called
S
S
S One of the sets
r
−
r-
r− array ,
S
S
S A collection of
r
−
r-
r− The arrangement is recorded as
P
(
n
,
r
)
P(n, r)
P(n,r)
P
(
n
,
r
)
=
{
n
!
(
n
−
r
)
!
n
≥
r
0
n
<
r
P(n,r)=\begin{cases} \dfrac{n!}{(n-r)!} & n \geq r \\\\ 0 & n < r \end{cases}
P(n,r)=⎩⎪⎪⎨⎪⎪⎧(n−r)!n!0n≥rn<r
The permutation formula uses the multiplication rule to get : Think of the whole arrangement as
r
r
r A place
- The first
1
1
1 There are two positions
n
n
n
n
n Choose one of the elements , be left over
n
−
1
n-1
n−1 Elements ;
n There are two ways to place , That is, from the current
- The first
2
2
2 There are two positions
n
−
1
n-1
n
−
1
n-1
n−1 Choose one of the elements , be left over
n
−
2
n-2
n−2 Elements ;
n−1 There are two ways to place , That is, from the current
- The first
3
3
3 There are two positions
n
−
2
n-2
n
−
2
n-2
n−2 Choose one of the elements , be left over
n
−
3
n-3
n−3 Elements ;
n−2 There are two ways to place , That is, from the current
⋮
\vdots
⋮
- The first
r
r
r There are two positions
n
−
(
r
−
1
)
=
n
−
r
+
1
n-(r-1) = n - r + 1
n
−
r
+
1
n - r + 1
n−r+1 Choose one of the elements , be left over
n
−
r
n-r
n−r Elements ;
n−(r−1)=n−r+1 There are two ways to place , That is, from the current
0
!
=
1
0! = 1
0!=1
Four 、 Ring arrangement
n
n
n Meta set
S
S
S , from
S
S
S Collection Orderly , No repetition selection
r
r
r Elements ,
S
S
S A collection of
r
−
r-
r− Ring arrangement number
=
P
(
n
,
r
)
r
=
n
!
r
(
n
−
r
)
!
= \dfrac{P(n,r)}{r} = \dfrac{n!}{r (n-r)!}
=rP(n,r)=r(n−r)!n!
r
r
r Different linear permutations , Equivalent to the same ring arrangement ;
A ring arrangement , Cut from any position , Can constitute a
r
r
r Different linear arrangements ;
5、 ... and 、 Set combination
n
n
n Meta set
S
S
S , from
S
S
S Collection disorder , No repetition selection
r
r
r Elements ,
This operation is called
S
S
S One of the sets
r
−
r-
r− Combine ,
S
S
S A collection of
r
−
r-
r− The combination is written as
C
(
n
,
r
)
C(n, r)
C(n,r)
C
(
n
,
r
)
=
{
P
(
n
,
r
)
r
!
=
n
!
r
!
(
n
−
r
)
!
n
≥
r
0
n
<
r
C(n,r)=\begin{cases} \dfrac{P(n,r)}{r!} = \dfrac{n!}{r!(n-r)!} & n \geq r \\\\ 0 & n < r \end{cases}
C(n,r)=⎩⎪⎪⎨⎪⎪⎧r!P(n,r)=r!(n−r)!n!0n≥rn<r
r
−
r-
r− Arrangement can also be understood in this way ( Combine first and then arrange ) : elect
r
r
r An orderly arrangement
C
(
n
,
r
)
C(n,r)
C(n,r) , It can be
r
r
r Make a disordered choice , Then arrange all the selected elements
C
(
n
,
r
)
r
!
=
P
(
n
,
r
)
C(n,r) r! = P(n,r)
C(n,r)r!=P(n,r) ;
Combinatorial identity :
C
(
n
,
r
)
=
C
(
n
,
n
−
r
)
C(n,r) = C(n, n-r)
C(n,r)=C(n,n−r)
边栏推荐
- [learning notes] DP status and transfer
- 网络通讯之Socket-Tcp(一)
- Download address and installation tutorial of vs2015
- libvirt 中体验容器
- Optimize interface performance
- vulnhub之momentum
- Dart: about grpc (I)
- Wrong arrangement (lottery, email)
- Duplicate numbers in the array of sword finger offer 03
- (database authorization - redis) summary of unauthorized access vulnerabilities in redis
猜你喜欢
Php Export word method (One MHT)
vulnhub之tomato(西红柿)
OpenGL 索引缓存对象EBO和线宽模式
Vulnhub geminiinc
Vulnhub's Nagini
Colleagues wrote a responsibility chain model, with countless bugs
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
错排问题 (抽奖,发邮件)
vulnhub之GeminiInc v2
PHP export word method (phpword)
随机推荐
(数据库提权——Redis)Redis未授权访问漏洞总结
OpenGL 索引缓存对象EBO和线宽模式
OpenStack中的测试分类
Redis 笔记 01:入门篇
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
vulnhub之momentum
Pragma pack syntax and usage
Differences between MySQL Union and union all
(construction notes) learning experience of MIT reading
Flutter Widget : Flow
Basic knowledge of OpenGL (sort it out according to your own understanding)
Visual Studio 2022下载及配置OpenCV4.5.5
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
Colleagues wrote a responsibility chain model, with countless bugs
"Jianzhi offer 04" two-dimensional array search
在CoreOS下部署WordPress实例教程
Visual studio 2022 downloading and configuring opencv4.5.5
牛牛的组队竞赛
php 获取文件夹下面的文件列表和文件夹列表
Qt OpenGL 旋转、平移、缩放