当前位置:网站首页>[combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation example 2 | extended to integer solution)
[combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation example 2 | extended to integer solution)
2022-07-03 18:02:00 【Programmer community】
List of articles
- One 、 Examples of using generating functions to solve the number of solutions of indefinite equations
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 )
One 、 Examples of using generating functions to solve the number of solutions of indefinite equations
1
1
1 Gram weight
2
2
2 individual ,
2
2
2 Gram weight
1
1
1 individual ,
4
4
4 Gram weight
2
2
2 individual ,
Which weights can be weighed , How many schemes are there ;
The weights can be placed on the left and right sides
The concept of generating functions , It can be generalized to the negative power , On the left is a positive number , No, it's
0
0
0 , On the right is a negative number ,
1
1
1 Gram's weight The number is
x
1
x_1
x1 individual , The value range is
−
2
≤
x
1
≤
2
-2 \leq x_1 \leq 2
−2≤x1≤2 , Value for
−
2
,
−
1
,
0
,
1
,
2
-2, -1, 0 , 1, 2
−2,−1,0,1,2
2
2
2 The number of weights of gram is
x
2
x_2
x2 individual , The value range is
−
1
≤
x
2
≤
1
-1 \leq x_2 \leq 1
−1≤x2≤1 , Value for
−
1
,
0
,
1
-1, 0,1
−1,0,1
4
4
4 The number of weights of gram is
x
3
x_3
x3 individual , The value range is
−
2
≤
x
3
≤
2
-2 \leq x_3 \leq 2
−2≤x3≤2 , Value for
−
2
,
−
1
,
0
,
1
,
2
-2, -1, 0,1,2
−2,−1,0,1,2
x
1
+
2
x
2
+
4
x
3
=
r
x_1 + 2x_2 + 4x_3 = r
x1+2x2+4x3=r , among
r
r
r Represents the weight that can be weighed ,
Write the above , With restrictions , And with coefficients Of nonnegative integer solutions of indefinite equations Generating function :
x
1
x_1
x1 term , With restrictions , There is no coefficient , Its The bottom is
y
y
y , Power value
0
,
1
,
2
0 , 1, 2
0,1,2 , The corresponding generating function item is
(
y
−
2
+
y
−
1
+
1
+
y
+
y
2
)
(y^{-2} + y^{-1} + 1 + y + y^2 )
(y−2+y−1+1+y+y2)
x
2
x_2
x2 term , With restrictions , With coefficients
2
2
2 , Its The bottom is
y
2
y^2
y2 , Power value
0
,
1
0,1
0,1 , The corresponding generating function item is
(
y
2
)
−
1
+
(
y
2
)
0
+
(
y
2
)
1
=
y
−
2
+
1
+
y
2
(y^2)^{-1} + (y^2)^0 + (y^2)^1 = y^{-2} + 1+ y^2
(y2)−1+(y2)0+(y2)1=y−2+1+y2
x
3
x_3
x3 term , With restrictions , With coefficients
4
4
4 , Its The bottom is
y
4
y^4
y4 , Power value
0
,
1
,
2
0,1, 2
0,1,2 , The corresponding generating function item is
(
y
4
)
−
2
+
(
y
4
)
−
1
+
(
y
4
)
0
+
(
y
4
)
1
+
(
y
4
)
2
=
y
−
8
+
y
−
4
+
1
+
y
4
+
y
8
(y^4)^{-2} + (y^4)^{-1} + (y^4)^0 + (y^4)^1 + (y^4)^2 = y^{-8} + y^{-4} + 1+ y^4 + y^8
(y4)−2+(y4)−1+(y4)0+(y4)1+(y4)2=y−8+y−4+1+y4+y8
Multiply the above three items , And unfold :
G
(
x
)
=
(
y
−
2
+
y
−
1
+
1
+
y
+
y
2
)
(
y
−
2
+
1
+
y
2
)
(
y
−
8
+
y
−
4
+
1
+
y
4
+
y
8
)
G(x) = ( y^{-2} + y^{-1} + 1 + y + y^2 ) (y^{-2} + 1+ y^2) (y^{-8} + y^{-4} + 1+ y^4 + y^8)
G(x)=(y−2+y−1+1+y+y2)(y−2+1+y2)(y−8+y−4+1+y4+y8)
=
5
+
3
y
+
4
y
2
+
3
y
3
+
5
y
4
+
3
y
5
+
4
y
6
+
3
y
7
+
4
y
8
+
2
y
9
+
2
y
10
+
y
11
+
y
12
\ \ \ \ \ \ \ \ \ \ =5 + 3y + 4y^2 + 3y^3 + 5y^4 + 3y^5 + 4y^6 + 3y^7 + 4y^8 + 2y^9 + 2y^{10} + y^{11} + y^{12}
=5+3y+4y2+3y3+5y4+3y5+4y6+3y7+4y8+2y9+2y10+y11+y12
After the above expansion
y
y
y The idempotent of is weight , The coefficient is Number of schemes , Such as
4
y
2
4y^2
4y2 Item representation , Weigh out
2
2
2 Gram weight , Yes
4
4
4 A plan ;
General description :
1
1
1 term : Express
y
0
y^0
y0 , Weigh out
0
0
0 g , Yes
0
0
0 Kind of plan ;
3
y
3y
3y term : Express
3
y
1
3y^1
3y1 , Weigh out
1
1
1 g , Yes
3
3
3 Kind of plan ;
4
y
2
4y^2
4y2 term : Express
4
y
2
4y^2
4y2 , Weigh out
2
2
2 g , Yes
4
4
4 Kind of plan ;
3
y
3
3y^3
3y3 term : Express
3
y
3
3y^3
3y3 , Weigh out
3
3
3 g , Yes
3
3
3 Kind of plan ;
5
y
4
5y^4
5y4 term : Express
5
y
4
5y^4
5y4 , Weigh out
4
4
4 g , Yes
5
5
5 Kind of plan ;
3
y
5
3y^5
3y5 term : Express
3
y
5
3y^5
3y5 , Weigh out
5
5
5 g , Yes
3
3
3 Kind of plan ;
4
y
6
4y^6
4y6 term : Express
4
y
6
4y^6
4y6 , Weigh out
6
6
6 g , Yes
4
4
4 Kind of plan ;
3
y
7
3y^7
3y7 term : Express
3
y
7
3y^7
3y7 , Weigh out
7
7
7 g , Yes
3
3
3 Kind of plan ;
4
y
8
4y^8
4y8 term : Express
4
y
8
4y^8
4y8 , Weigh out
8
8
8 g , Yes
4
4
4 Kind of plan ;
2
y
9
2y^9
2y9 term : Express
2
y
9
2y^9
2y9 , Weigh out
9
9
9 g , Yes
2
2
2 Kind of plan ;
2
y
10
2y^{10}
2y10 term : Express
2
y
10
2y^{10}
2y10 , Weigh out
10
10
10 g , Yes
2
2
2 Kind of plan ;
y
11
y^{11}
y11 term : Express
y
11
y^{11}
y11 , Weigh out
11
11
11 g , Yes
1
1
1 Kind of plan ;
y
12
y^{12}
y12 term : Express
y
12
y^{12}
y12 , Weigh out
12
12
12 g , Yes
1
1
1 Kind of plan ;
边栏推荐
- Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition
- Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
- Records of long objects and long judgments in the stream of list
- 圖像24比特深度轉8比特深度
- Interviewer: why is the value nil not equal to nil?
- Embedded-c language-7
- [combinatorics] generating function (shift property)
- Design limitations of structure type (struct)
- Valentine's day, send you a little red flower~
- A. Berland Poker & 1000 [simple mathematical thinking]
猜你喜欢
![AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]](/img/3d/6d61fefc62063596221f98999a863b.png)
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]

Leetcode 538 converts binary search tree into cumulative tree -- recursive method and iterative method
![[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela](/img/df/a034032e203e7935dafaf8a71cb6c8.jpg)
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
![Lesson 13 of the Blue Bridge Cup -- tree array and line segment tree [exercise]](/img/da/0a282b4773fe3909d1e5e9d19f8549.jpg)
Lesson 13 of the Blue Bridge Cup -- tree array and line segment tree [exercise]

Records of long objects and long judgments in the stream of list

Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028

The second largest gay dating website in the world was exposed, and the status of programmers in 2022

How to draw non overlapping bubble chart in MATLAB

Implementation of Tetris in C language

Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026
随机推荐
Closure and closure function
A. Odd Selection【BruteForce】
Website with JS doesn't work in IE9 until the Developer Tools is activated
ArrayList分析3 : 删除元素
PHP MySQL preprocessing statement
Bidding procurement scheme management of Oracle project management system
TCP congestion control details | 3 design space
Gear2021 monthly update - December
On Data Mining
STM32实现74HC595控制
Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
Prototype inheritance..
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]
OpenSSL的SSL/BIO_get_fd
SSL / bio pour OpenSSL Get FD
How to install PHP on Ubuntu 20.04
[combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
The second largest gay dating website in the world was exposed, and the status of programmers in 2022
Draw some simple graphics with MFC
[教程]在 CoreOS 上构建你的第一个应用