当前位置:网站首页>[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 ;
边栏推荐
- [教程]在 CoreOS 上构建你的第一个应用
- Redis core technology and practice - learning notes (VII) sentinel mechanism
- How do microservices aggregate API documents? This wave of operation is too good
- [combinatorics] generating function (shift property)
- Fedora 21 installs lamp host server
- Five problems of database operation in commodity supermarket system
- [enumeration] annoying frogs always step on my rice fields: (who is the most hateful? (POJ hundred practice 2812)
- Deops入门
- OpenSSL的SSL/BIO_get_fd
- Website with JS doesn't work in IE9 until the Developer Tools is activated
猜你喜欢

(8) HS corner detection
![Golang string (string) and byte array ([]byte) are converted to each other](/img/41/20f445ef9de4adf2a2aa97828cb67f.jpg)
Golang string (string) and byte array ([]byte) are converted to each other

Research Report on investment trends and development planning of China's thermal insulation material industry, 2022-2028

How to install PHP on Ubuntu 20.04

(9) Opencv Canny edge detection

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

How to expand the capacity of golang slice slice

Redis on local access server

The third day of writing C language by Yabo people

Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries
随机推荐
Keepalived 设置不抢占资源
Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries
[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
Records of long objects and long judgments in the stream of list
[combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
Win32: analyse du fichier dump pour la défaillance du tas
Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition
STM32实现74HC595控制
supervisor监控Gearman任务
Codeforces Round #803 (Div. 2) C. 3SUM Closure
PHP MySQL where clause
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]
Keepalived setting does not preempt resources
Draw some simple graphics with MFC
Fedora 21 安装 LAMP 主机服务器
聊聊支付流程的設計與實現邏輯
Leetcode Valentine's Day Special - looking for a single dog
分布式的任务分发框架-Gearman
[combinatorics] generating function (summation property)
OpenSSL的SSL/BIO_get_fd