当前位置:网站首页>[combinatorics] permutation and combination (examples of combinatorial number of multiple sets | three counting models | selection problem | combinatorial problem of multiple sets | nonnegative intege
[combinatorics] permutation and combination (examples of combinatorial number of multiple sets | three counting models | selection problem | combinatorial problem of multiple sets | nonnegative intege
2022-07-03 13:54:00 【Programmer community】
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 )
One 、 Examples of multiset combinations
take
r
r
r It's the same ball , Put it in
k
k
k In different boxes , There is no limit to the number of balls in each box , Find the total number of ways to put the ball ?
There is no difference between balls , Put the ball in the box , The ball has no label , The box has a label , The number of balls in each box is different ;
The number of balls falling into each box is different , It's a different solution ;
hypothesis
n
n
n Boxes , The number of balls in each box is
x
1
,
x
2
,
⋯
,
x
k
x_1 , x_2 , \cdots , x_k
x1,x2,⋯,xk ;
There are indefinite equations :
x
1
+
x
2
+
⋯
+
x
k
=
r
x_1 + x_2 + \cdots + x_k = r
x1+x2+⋯+xk=r
Value :
x
1
,
x
2
,
⋯
,
x
k
x_1 , x_2 , \cdots , x_k
x1,x2,⋯,xk The value of is a nonnegative integer , It can take
0
∼
r
0 \sim r
0∼r Between the value of the ;
This problem can be equivalent to multiple sets
S
=
{
n
1
⋅
a
1
,
n
2
⋅
a
2
,
⋯
,
n
k
⋅
a
k
}
,
0
≤
r
≤
n
i
≤
+
∞
S = \{ n_1 \cdot a_1 , n_2 \cdot a_2 , \cdots , n_k \cdot a_k \} , \ \ \ 0 \leq r \leq n_i \leq +\infty
S={ n1⋅a1,n2⋅a2,⋯,nk⋅ak}, 0≤r≤ni≤+∞ Of
r
r
r Combinatorial number ;
N
=
C
(
k
+
r
−
1
,
r
)
N= C(k + r - 1, r)
N=C(k+r−1,r)
Reference resources : 【 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 )
Above
r
r
r It's the same ball , Put it in
k
k
k In different boxes , The number of ways to put the ball is
N
=
C
(
k
+
r
−
1
,
r
)
N = C(k + r - 1, r)
N=C(k+r−1,r)
Two 、 Three counting models
Three counting models :
- ① Select the question :
- ② Multiple set combinatorial problem :
- ③ Nonnegative integer solution of the equation :
1. 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
2. Multiple set combinatorial problem :
S
=
{
n
1
⋅
a
1
,
n
2
⋅
a
2
,
⋯
,
n
k
⋅
a
k
}
,
0
≤
n
i
≤
+
∞
S = \{ n_1 \cdot a_1 , n_2 \cdot a_2 , \cdots , n_k \cdot a_k \} , \ \ \ 0 \leq n_i \leq +\infty
S={ n1⋅a1,n2⋅a2,⋯,nk⋅ak}, 0≤ni≤+∞
- Type of elements : Multiple sets contain
k
k
k Different elements ,
- The element represents : Each element is represented as
a
1
,
a
2
,
⋯
,
a
k
a_1 , a_2 , \cdots , a_k
a1,a2,⋯,ak ,
- Element number : The number of occurrences of each element is
n
1
,
n
2
,
⋯
,
n
k
n_1, n_2, \cdots , n_k
n1,n2,⋯,nk ,
- The value of the number of elements :
n
i
n_i
ni The value requirement of is Greater than
0
0
0 , Less than positive infinity
+
∞
+ \infty
+∞ ;
Combination of the above multiple sets , When The repeatability of all elements
n
i
n_i
ni The number of groups is greater than the number of combinations
r
r
r when ,
r
≤
n
i
r \leq n_i
r≤ni when , The combination number of multiple sets is
N
=
C
(
k
+
r
−
1
,
r
)
N= C(k + r - 1, r)
N=C(k+r−1,r)
3. Nonnegative integer solutions of indefinite equations :
x
1
+
x
2
+
⋯
+
x
k
=
r
x_1 + x_2 + \cdots + x_k = r
x1+x2+⋯+xk=r
The number of nonnegative integer solutions is :
N
=
C
(
k
+
r
−
1
,
r
)
N= C(k + r - 1, r)
N=C(k+r−1,r)
边栏推荐
- Mysql:insert date:sql error [1292] [22001]: data truncation: incorrect date value:
- [556. Next larger element III]
- Field problems in MySQL
- Complete DNN deep neural network CNN training with tensorflow to complete image recognition cases
- Richview trvstyle liststyle list style (bullet number)
- Flutter动态化 | Fair 2.5.0 新版本特性
- GoLand 2021.1: rename the go project
- Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
- Qt学习21 Qt 中的标准对话框(下)
- Replace the GPU card number when pytorch loads the historical model, map_ Location settings
猜你喜欢
Using registered classes to realize specific type matching function template
Use docker to build sqli lab environment and upload labs environment, and the operation steps are provided with screenshots.
KEIL5出现中文字体乱码的解决方法
核酸修饰的金属有机框架药物载体|PCN-223金属有机骨架包载Ad金刚烷|ZIF-8包裹阿霉素(DOX)
全面发展数字经济主航道 和数集团积极推动UTONMOS数藏市场
Complete deep neural network CNN training with tensorflow to complete picture recognition case 2
使用vscode查看Hex或UTF-8编码
Kivy tutorial how to automatically load kV files
Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off
使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2
随机推荐
Golang — 命令行工具cobra
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
8 Queen question
[技术发展-24]:现有物联网通信技术特点
Mobile phones and computers can be used, whole people, spoof code connections, "won't you Baidu for a while" teach you to use Baidu
Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
User and group command exercises
RocksDB LRUCache
windos 创建cordova 提示 因为在此系统上禁止运行脚本
Qt学习25 布局管理器(四)
How to promote the progress of project collaboration | community essay solicitation
Golang — template
Implementation of Muduo accept connection, disconnection and sending data
栈应用(平衡符)
Qt学习18 登录对话框实例分析
Unity render streaming communicates with unity through JS
双向链表(我们只需要关注插入和删除函数)
Depth and breadth first traversal of tree (regardless of binary tree)
Go 1.16.4: purpose of go mod tidy
Several common optimization methods matlab principle and depth analysis