当前位置:网站首页>[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)
边栏推荐
猜你喜欢

vulnhub之presidential

为什么我的mysql容器启动不了呢

ArcGIS应用(二十一)Arcmap删除图层指定要素的方法

Basic knowledge of OpenGL (sort it out according to your own understanding)

【mysql专项】读锁和写锁

vulnhub之Nagini

STL Tutorial 9 deep copy and shallow copy of container elements

vulnhub之raven2

《剑指offer 04》二维数组查找

STL tutorial 10 container commonalities and usage scenarios
随机推荐
Shardingsphere sub database and sub table < 3 >
ArcGIS application (XXI) ArcMap method of deleting layer specified features
Dart: about grpc (I)
Unicode encoding table download
Go language to realize static server
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
XML (DTD, XML parsing, XML modeling)
(construction notes) learn the specific technology of how to design reusable software entities from three levels: class, API and framework
CGroup introduction
Oracle advanced (I) realize DMP by expdp impdp command
Php Export word method (One MHT)
Basic knowledge of OpenGL (sort it out according to your own understanding)
为什么我的mysql容器启动不了呢
vulnhub之momentum
How to convert a numeric string to an integer
vulnhub之narak
previous permutation lintcode51
Ripper of vulnhub
PHP導出word方法(一mht)
Go语言实现静态服务器