当前位置:网站首页>[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)
边栏推荐
- Dynamically monitor disk i/o with ZABBIX
- Shutter: about inheritedwidget
- Notes on 32-96 questions of sword finger offer
- (数据库提权——Redis)Redis未授权访问漏洞总结
- 2022年湖南工学院ACM集训第二次周测题解
- Unity3d learning notes 5 - create sub mesh
- 网络通讯之Socket-Tcp(一)
- PHP export word method (phpword)
- Unicode encoding table download
- C language improvement article (wchar_t) character type
猜你喜欢
随机推荐
DEJA_VU3D - Cesium功能集 之 054-模拟火箭发射全过程
(construction notes) learn the specific technology of how to design reusable software entities from three levels: class, API and framework
4000字超详解指针
AOSP ~ NTP (Network Time Protocol)
vulnhub之momentum
OpenGL shader use
OPenGL 基本知识(根据自己理解整理)
OpenStack中的测试分类
VS2015的下载地址和安装教程
Solve msvcp120d DLL and msvcr120d DLL missing
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
(构造笔记)ADT与OOP
vulnhub之cereal
Ripper of vulnhub
Sheet1$. Output [excel source output] Error in column [xxx]. The returned column status is: "the text is truncated, or one or more characters have no matches in the target code page.".
Redis notes 01: Introduction
"Jianzhi offer 04" two-dimensional array search
Qt OpenGL 旋转、平移、缩放
Dart: about Libraries