当前位置:网站首页>[combinatorics] generating function (positive integer splitting | unordered | ordered | allowed repetition | not allowed repetition | unordered not repeated splitting | unordered repeated splitting)
[combinatorics] generating function (positive integer splitting | unordered | ordered | allowed repetition | not allowed repetition | unordered not repeated splitting | unordered repeated splitting)
2022-07-03 18:05:00 【Programmer community】
List of articles
- One 、 Positive integer split
- Two 、 Unordered split
- 1、 Unordered split No repetition
- 2、 Unordered split Allow repetition
Reference blog :
- 【 Combinatorial mathematics 】 Generating function Brief introduction ( Generating function definition | Newton's binomial coefficient | Common generating functions | Related to constants | Related to binomial coefficient | Related to polynomial coefficients )
- 【 Combinatorial mathematics 】 Generating function ( Linear properties | Product properties )
- 【 Combinatorial mathematics 】 Generating function ( Shift property )
- 【 Combinatorial mathematics 】 Generating function ( The nature of summation )
- 【 Combinatorial mathematics 】 Generating function ( Commutative properties | Derivative property | Integral properties )
- 【 Combinatorial mathematics 】 Generating function ( Summary of nature | Important generating functions ) *
- 【 Combinatorial mathematics 】 Generating function ( Generate function examples | Given the general term formula, find the generating function | Given the generating function, find the general term formula )
- 【 Combinatorial mathematics 】 Generating function ( Generate function application scenarios | Solving recursive equations using generating functions )
- 【 Combinatorial mathematics 】 Generating function ( Use the generating function to solve multiple sets r Combinatorial number )
- 【 Combinatorial mathematics 】 Generating function ( Use generating function to solve the number of solutions of indefinite equation )
- 【 Combinatorial mathematics 】 Generating function ( Examples of using generating functions to solve the number of solutions of indefinite equations )
- 【 Combinatorial mathematics 】 Generating function ( Examples of using generating functions to solve the number of solutions of indefinite equations 2 | Extended to integer solutions )
One 、 Positive integer split
Positive integer split Contents involved :
- Split definition and classification
- Unordered split
- Orderly splitting
A positive integer can Split into several positive integers And , Each different split method , Can As a plan ;
Sort according to the splitting order :
4
4
4 Split into
1
1
1 and
3
3
3 ,
4
4
4 Split into
3
3
3 and
1
1
1 ;
- Orderly splitting : Above
2
2
2 individual Positive integer split , yes Two different splitting methods ;
- Unordered split : Above
2
2
2 individual Positive integer split , yes The same split method ;
Classify according to whether it is repeated :
- Allow repetition : When splitting , It is allowed to split into several repeated positive integers , Such as
3
3
3 Split into
3
3
3 individual
1
1
1 ;
- No repetition : When splitting , Split positive integer No repetition , Such as
3
3
3 Split into
3
3
3 individual
1
1
1 It's wrong. , Can only be split into
1
,
2
1,2
1,2 ;
Positive integer splitting can be done by nature , It is divided into
4
4
4 class ;
- Orderly repetition
- Order does not repeat
- Disorderly repetition
- Disorder does not repeat
Two 、 Unordered split
Unordered split basic model :
take Positive integer
N
N
N Unordered split into positive integers ,
a
1
,
a
2
,
⋯
,
a
n
a_1, a_2, \cdots , a_n
a1,a2,⋯,an It is a split
n
n
n Number ,
The split is unordered , Split above
n
n
n The number of numbers may be different ,
hypothesis
a
1
a_1
a1 Yes
x
1
x_1
x1 individual ,
a
2
a_2
a2 Yes
x
2
x_2
x2 individual ,
⋯
\cdots
⋯ ,
a
n
a_n
an Yes
x
n
x_n
xn individual , Then there is the following equation :
a
1
x
1
+
a
2
x
2
+
⋯
+
a
n
x
n
=
N
a_1x_1 + a_2x_2 + \cdots + a_nx_n = N
a1x1+a2x2+⋯+anxn=N
This form can be used Number of nonnegative integer solutions of indefinite equation Generation function calculation of , yes With coefficients , With restrictions , Reference resources : Combinatorial mathematics 】 Generating function ( Use generating function to solve the number of solutions of indefinite equation )
In the case of unordered splitting , A positive integer after splitting , Allow repetition and No repetition , It is two kinds of combinatorial problems ;
If No repetition , So these
x
i
x_i
xi The value of , Can only Value
0
,
1
0, 1
0,1 ; amount to With restrictions , With coefficients Of Nonnegative integer solutions of indefinite equations The situation of ;
If Allow repetition , So these
x
i
x_i
xi The value of , Namely Natural number ; amount to With coefficients Of Nonnegative integer solutions of indefinite equations The situation of ;
1、 Unordered split No repetition
Discuss Unordered split , Repetition is not allowed , This way Equivalent to With restrictions , With coefficients Of Nonnegative integer solutions of indefinite equations The situation of ;
a
1
a_1
a1 Item corresponds to the generating function item ,
x
1
x_1
x1 Value
0
,
1
0,1
0,1 , Then the corresponding generating function item is
(
y
a
1
)
0
+
(
y
a
1
)
1
=
1
+
y
a
1
(y^{a_1})^{0} + (y^{a_1})^{1}= 1+ y^{a_1}
(ya1)0+(ya1)1=1+ya1
a
2
a_2
a2 Item corresponds to the generating function item ,
x
2
x_2
x2 Value
0
,
1
0,1
0,1 , Then the corresponding generating function item is
(
y
a
2
)
0
+
(
y
a
2
)
1
=
1
+
y
a
2
(y^{a_2})^{0} + (y^{a_2})^{1}= 1+ y^{a_2}
(ya2)0+(ya2)1=1+ya2
⋮
\vdots
⋮
a
n
a_n
an Item corresponds to the generating function item ,
x
n
x_n
xn Value
0
,
1
0,1
0,1 , Then the corresponding generating function item is
(
y
a
n
)
0
+
(
y
a
n
)
1
=
1
+
y
a
n
(y^{a_n})^{0} + (y^{a_n})^{1}= 1+ y^{a_n}
(yan)0+(yan)1=1+yan
Multiply the above generated function items , Then the complete generating function can be obtained :
G
(
x
)
=
(
1
+
y
a
1
)
(
1
+
y
a
2
)
⋯
(
1
+
y
a
n
)
G(x) = (1+ y^{a_1}) (1+ y^{a_2}) \cdots (1+ y^{a_n})
G(x)=(1+ya1)(1+ya2)⋯(1+yan)
After the above generation function is written , Calculation an ,
y
y
y Of
N
N
N Coefficient of power , Namely Positive integer
N
N
N The number of splitting schemes ;
2、 Unordered split Allow repetition
Discuss Unordered split , Repetition is allowed , This way Equivalent to Without restrictions , With coefficients Of Nonnegative integer solutions of indefinite equations The situation of ;
a
1
a_1
a1 Item corresponds to the generating function item ,
x
1
x_1
x1 Value
0
,
1
,
⋯
0,1, \cdots
0,1,⋯ , Then the corresponding generating function item is
(
y
a
1
)
0
+
(
y
a
1
)
1
+
(
y
a
1
)
2
=
1
+
y
a
1
+
y
2
a
1
⋯
(y^{a_1})^{0} + (y^{a_1})^{1} + (y^{a_1})^{2}= 1+ y^{a_1} + y^{2a_1}\cdots
(ya1)0+(ya1)1+(ya1)2=1+ya1+y2a1⋯
a
2
a_2
a2 Item corresponds to the generating function item ,
x
2
x_2
x2 Value
0
,
1
,
⋯
0,1, \cdots
0,1,⋯ , Then the corresponding generating function item is
(
y
a
2
)
0
+
(
y
a
2
)
1
+
(
y
a
2
)
2
=
1
+
y
a
2
+
y
2
a
2
⋯
(y^{a_2})^{0} + (y^{a_2})^{1} + (y^{a_2})^{2}= 1+ y^{a_2} + y^{2a_2}\cdots
(ya2)0+(ya2)1+(ya2)2=1+ya2+y2a2⋯
⋮
\vdots
⋮
a
n
a_n
an Item corresponds to the generating function item ,
x
n
x_n
xn Value
0
,
1
,
⋯
0,1, \cdots
0,1,⋯ , Then the corresponding generating function item is
(
y
a
n
)
0
+
(
y
a
n
)
1
+
(
y
a
n
)
2
=
1
+
y
a
n
+
y
2
a
n
⋯
(y^{a_n})^{0} + (y^{a_n})^{1} + (y^{a_n})^{2}= 1+ y^{a_n} + y^{2a_n}\cdots
(yan)0+(yan)1+(yan)2=1+yan+y2an⋯
Multiply the above generated function items , Then the complete generating function can be obtained :
G
(
x
)
=
(
1
+
y
a
1
+
y
2
a
1
⋯
)
(
1
+
y
a
2
+
y
2
a
2
⋯
)
⋯
(
1
+
y
a
n
+
y
2
a
n
⋯
)
G(x) = (1+ y^{a_1}+ y^{2a_1}\cdots) (1+ y^{a_2} + y^{2a_2}\cdots) \cdots (1+ y^{a_n}+ y^{2a_n}\cdots )
G(x)=(1+ya1+y2a1⋯)(1+ya2+y2a2⋯)⋯(1+yan+y2an⋯)
The above generating function can be generated according to Common values of the following generation functions :
{
a
n
}
\{a_n\}
{ an} ,
a
n
=
1
n
a_n = 1^n
an=1n ;
A
(
x
)
=
∑
n
=
0
∞
x
n
=
1
1
−
x
\begin{aligned} A(x) & = \sum_{n=0}^{\infty} x^n = \frac{1}{1-x} \end{aligned}
A(x)=n=0∑∞xn=1−x1
take
1
+
y
a
1
+
y
2
a
1
⋯
1+ y^{a_1}+ y^{2a_1}\cdots
1+ya1+y2a1⋯ Medium
y
a
1
y^{a_1}
ya1 Yuan Cheng
x
x
x , Then you can get
1
+
x
+
x
2
+
x
3
+
⋯
1 + x + x^2 + x^3 + \cdots
1+x+x2+x3+⋯
The corresponding sequence is
1
n
1^n
1n
As mentioned above
1
+
y
a
1
+
y
2
a
1
⋯
=
1
1
−
y
a
1
1+ y^{a_1}+ y^{2a_1}\cdots =\cfrac{1}{1-y^{a_1}}
1+ya1+y2a1⋯=1−ya11
The final simplification result :
G
(
x
)
=
(
1
+
y
a
1
+
y
2
a
1
⋯
)
(
1
+
y
a
2
+
y
2
a
2
⋯
)
⋯
(
1
+
y
a
n
+
y
2
a
n
⋯
)
G(x) = (1+ y^{a_1}+ y^{2a_1}\cdots) (1+ y^{a_2} + y^{2a_2}\cdots) \cdots (1+ y^{a_n}+ y^{2a_n}\cdots )
G(x)=(1+ya1+y2a1⋯)(1+ya2+y2a2⋯)⋯(1+yan+y2an⋯)
=
1
(
1
−
y
a
1
)
(
1
−
y
a
2
)
⋯
(
1
−
y
a
n
)
\ \ \ \ \ \ \ \ \ \ =\cfrac{1}{ (1-y^{a_1}) (1-y^{a_2}) \cdots (1-y^{a_n}) }
=(1−ya1)(1−ya2)⋯(1−yan)1
After the above generation function is written , Calculation an ,
y
y
y Of
N
N
N Coefficient of power , Namely Positive integer
N
N
N The number of splitting schemes ;
边栏推荐
- PHP MySQL order by keyword
- Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
- Keepalived setting does not preempt resources
- Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
- Closure and closure function
- Bidding procurement scheme management of Oracle project management system
- Assembly for unloading Loadfrom() loaded assembly - unloading the assembly loaded with assembly LoadFrom()
- Fedora 21 安装 LAMP 主机服务器
- Kotlin的协程:上下文
- Theoretical description of linear equations and summary of methods for solving linear equations by eigen
猜你喜欢

Research Report on competitive strategy Outlook Analysis and investment strategic planning of China's smart home equipment industry, 2022-2028

Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries

TCP拥塞控制详解 | 3. 设计空间

Micro service component sentinel console call

Global and Chinese health care OEM and ODM market status survey and investment planning recommendations report 2022-2028

Computer graduation project PHP library book borrowing management system

面试官:值为 nil 为什么不等于 nil ?

Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028

聊聊支付流程的设计与实现逻辑

Codeforces Round #803 (Div. 2) C. 3SUM Closure
随机推荐
[untitled]
Line by line explanation of yolox source code of anchor free series network (5) -- mosaic data enhancement and mathematical understanding
Solve the problem of inaccurate network traffic monitored by ZABBIX with SNMP
Redis on local access server
图像24位深度转8位深度
Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
Leetcode540: a single element in an ordered array
远程办公工具分享|社区征文
Ssl/bio of OpenSSL_ get_ fd
MinGW compile boost library
Getting started with deops
AcWing 271. 杨老师的照相排列【多维DP】
Five problems of database operation in commodity supermarket system
A. Odd Selection【BruteForce】
Distributed task distribution framework gearman
Kotlin的協程:上下文
Redis core technology and practice - learning notes (VII) sentinel mechanism
(9) Opencv Canny edge detection
PHP returns 500 errors but no error log - PHP return 500 error but no error log
Mature port AI ceaspectus leads the world in the application of AI in terminals, CIMC Feitong advanced products go global, smart terminals, intelligent ports, intelligent terminals