当前位置:网站首页>[combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
[combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
2022-07-03 13:54:00 【Programmer community】
List of articles
- One 、 Two counting principles 、 Set arrangement example
- Two 、 Set arrangement 、 Example of circle arrangement
Arrange and combine reference blogs :
- 【 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 )
- 【 Combinatorial mathematics 】 Permutation and combination ( Arrange and combine content summary | Select the question | Set arrangement | Set combination )
- 【 Combinatorial mathematics 】 Permutation and combination ( Examples of permutations )
- 【 Combinatorial mathematics 】 Permutation and combination ( Multiset arrangement | Full Permutation of multiple sets | Multiset incomplete permutation The repetition of all elements is greater than the number of permutations | Multiset incomplete permutation The repetition of some elements is less than the number of permutations )
- 【 Combinatorial mathematics 】 Permutation and combination ( The combinatorial number of multiple sets | The repetition of all elements is greater than the number of combinations | The combinatorial number of multiple sets deduction 1 Division line derivation | The combinatorial number of multiple sets deduction 2 Derivation of the number of nonnegative integer solutions of indefinite equations )
- 【 Combinatorial mathematics 】 Permutation and combination ( Example of the number of combinations of multiple sets | Three counting models | Select the question | Multiple set combinatorial problem | Nonnegative integer solutions of indefinite equations )
One 、 Two counting principles 、 Set arrangement example
array
26
26
26 Letters , bring
a
,
b
a,b
a,b There are
7
7
7 Letters , Find the number of permutation methods ;
Need to use Classification and counting principle ( The principle of addition ) , Step by step counting principle ( Multiplication principle ) ;
- Category count ( The principle of addition ) : Yes
3
3
3 Class scheme , The first is
2
2
2 A plan , The second category is
4
4
4 A plan , The third category is
1
1
1 A plan , All in all
2
+
4
+
1
=
7
2 + 4 + 1 = 7
2+4+1=7 A plan ;
- Step by step counting principle ( Multiplication principle ) : Yes
3
3
3 Class scheme , The first step is
2
2
2 A plan , The second step is
4
4
4 A plan , The third step is
1
1
1 A plan , All in all
2
×
4
×
1
=
8
2 \times 4 \times 1 = 8
2×4×1=8 A plan ;
1. First, use the step-by-step counting principle ,
- First step : First construct with
a
,
b
a,b
a,b As boundary , There is... In the middle
7
7
7 A substructure of letters ;
- The second step : take
a
,
b
a,b
a,b Substructure as element , And others
26
−
9
=
17
26-9 = 17
26−9=17 Child elements together , in total
18
18
18 All elements are arranged ;
The principle of counting by steps corresponds to the law of multiplication , The end result is Number of solutions in the first step multiply Number of schemes in the second step ;
2. First step calculation : First construct with
a
,
b
a,b
a,b As boundary , There is... In the middle
7
7
7 A substructure of letters ;
In this substructure
7
7
7 Letters , It is equivalent to dividing
a
,
b
a,b
a,b Other than
24
24
24 Choose from the letters
7
7
7 Arrange letters ,
One-to-one correspondence : It is equivalent to a set in which the elements are not repeated , Make an orderly selection , Corresponding to the arrangement of sets , Use the set arrangement formula to calculate ;
24
24
24 Choose from the letters
7
7
7 Arrange letters , The selection methods are
P
(
24
,
7
)
P(24, 7)
P(24,7) Kind of ;
This involves the principle of classification and counting ,
- The first category is
a
a
a before ,
b
b
P
(
24
,
7
)
P(24, 7)
P(24,7) Kind of ;
b The situation after , The selection methods are
- The second type is
b
b
b before ,
a
a
P
(
24
,
7
)
P(24, 7)
P(24,7) Kind of ;
a The situation after , The selection methods are
The principle of classification and counting corresponds to the law of addition , The total number of methods is The first category And The second category Add it up , The selection methods are
2
P
(
24
,
7
)
2\ P(24, 7)
2 P(24,7) Kind of ;
3. The second step is to calculate : take
a
,
b
a,b
a,b Substructure as element , And others
26
−
9
=
17
26-9 = 17
26−9=17 Child elements together , in total
18
18
18 All elements are arranged ;
18
18
18 All elements are arranged , The result is
18
!
18!
18! ;
4. The first step multiply The second step plan ( Step by step calculation principle The law of addition ) :
Number of solutions in the first step multiply Number of schemes in the second step ;
N
=
2
P
(
24
,
7
)
18
!
N = 2\ P(24, 7) \ 18!
N=2 P(24,7) 18!
Two 、 Set arrangement 、 Example of circle arrangement
10
10
10 A boy ,
5
5
5 A girl , Stand in a row , If there are no girls nearby , How many ways ? If you stand in a circle , How many ways ?
Need to use Classification and counting principle ( The principle of addition ) , Step by step counting principle ( Multiplication principle ) ;
- Category count ( The principle of addition ) : Yes
3
3
3 Class scheme , The first is
2
2
2 A plan , The second category is
4
4
4 A plan , The third category is
1
1
1 A plan , All in all
2
+
4
+
1
=
7
2 + 4 + 1 = 7
2+4+1=7 A plan ;
- Step by step counting principle ( Multiplication principle ) : Yes
3
3
3 Class scheme , The first step is
2
2
2 A plan , The second step is
4
4
4 A plan , The third step is
1
1
1 A plan , All in all
2
×
4
×
1
=
8
2 \times 4 \times 1 = 8
2×4×1=8 A plan ;
1.
10
10
10 A boy ,
5
5
5 A girl , Stand in a row , If there are no girls nearby , How many ways :
Step by step processing is required : Put the boys away first , Then insert the girl into the space ;
① First step : Put the boys away first , schoolboy
10
10
10 individual , After standing there
11
11
11 Lattice ;
10
10
10 The placement of boys , Orderly selection of elements without repetition , This is a set arrangement problem , The arrangement scheme has
P
(
10
,
10
)
=
10
!
P(10,10) = 10!
P(10,10)=10! A plan ;
② The second step : Then insert the girl into the space ,
5
5
5 Girls can only put here
11
11
11 In a grid ;
11
11
11 Put
5
5
5 A girl , Orderly selection of elements without repetition , This is the arrangement of sets , The arrangement scheme has
P
(
11
,
5
)
P(11, 5)
P(11,5)
③ Step by step counting principle ( Multiplication principle ) : take Number of solutions in the first step And Number of schemes in the second step Multiply , The number of schemes is :
P
(
10
,
10
)
P
(
11
,
5
)
P(10,10) \ P(11, 5)
P(10,10) P(11,5)
2.
10
10
10 A boy ,
5
5
5 A girl , stand in a ring , If there are no girls nearby , How many ways :
Step by step processing is required : Put the boys away first , Then insert the girl into the space ;
① First step : First put the boys in a circle , schoolboy
10
10
10 individual , Because it's in a circle , So after standing up, there is only
10
10
10 Lattice ;
10
10
10 The placement of boys , Orderly selection of elements without repetition , This is the arrangement of set circles , You need to use the circle arrangement formula , The arrangement scheme has
P
(
10
,
10
)
10
\cfrac{P(10,10)}{10}
10P(10,10) A plan ;
Reference resources : 【 Combinatorial mathematics 】 Permutation and combination ( Arrange and combine content summary | Select the question | Set arrangement | Set combination ) 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
= \dfrac{P(n,r)}{r}
=rP(n,r)
r
r
r Different linear permutations , Equivalent to the same ring arrangement ;
A ring arrangement , Cut from any position , Can constitute ar
r
r Different linear arrangements ;
② The second step : Then insert the girl into the space ,
5
5
5 Girls can only put here
10
10
10 In a grid ;
10
10
10 Put
5
5
5 A girl , Orderly selection of elements without repetition , This is the arrangement of sets , The arrangement scheme has
P
(
10
,
5
)
P(10, 5)
P(10,5)
③ Step by step counting principle ( Multiplication principle ) : take Number of solutions in the first step And Number of schemes in the second step Multiply , The number of schemes is :
P
(
10
,
10
)
10
P
(
10
,
5
)
\cfrac{P(10,10)}{10} \ P(10, 5)
10P(10,10) P(10,5)
边栏推荐
- JVM系列——概述,程序计数器day1-1
- Thrift threadmanager and three monitors
- php 迷宫游戏
- ThreadPoolExecutor realizes multi-threaded concurrency and obtains the return value (elegant and concise way)
- How to use lxml to judge whether the website announcement is updated
- Replace the GPU card number when pytorch loads the historical model, map_ Location settings
- Disruptor -- a high concurrency and high performance queue framework for processing tens of millions of levels
- 8 Queen question
- SQL Injection (GET/Search)
- 金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
猜你喜欢
8 Queen question
太阳底下无新事,元宇宙能否更上层楼?
掌握Cypress命令行选项,是真正掌握Cypress的基础
Logback log sorting
Summary of common error reporting problems and positioning methods of thrift
研发团队资源成本优化实践
RichView TRVStyle ListStyle 列表样式(项目符号编号)
SQL Injection (AJAX/JSON/jQuery)
Flutter dynamic | fair 2.5.0 new version features
Unity embeddedbrowser browser plug-in event communication
随机推荐
【电脑插入U盘或者内存卡显示无法格式化FAT32如何解决】
Asp. Net core1.1 without project JSON, so as to generate cross platform packages
Sequence table (implemented in C language)
Implementation of Muduo asynchronous logging
使用tensorflow进行完整的DNN深度神经网络CNN训练完成图片识别案例
Flutter动态化 | Fair 2.5.0 新版本特性
Error running 'application' in idea running: the solution of command line is too long
RichView TRVStyle ListStyle 列表样式(项目符号编号)
Unity EmbeddedBrowser浏览器插件事件通讯
Flutter dynamic | fair 2.5.0 new version features
MapReduce implements matrix multiplication - implementation code
Heap structure and heap sort heapify
Stack application (balancer)
全面发展数字经济主航道 和数集团积极推动UTONMOS数藏市场
Field problems in MySQL
从零开始的基于百度大脑EasyData的多人协同数据标注
Summary of common error reporting problems and positioning methods of thrift
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:
KEIL5出现中文字体乱码的解决方法
如何使用lxml判断网站公告是否更新