当前位置:网站首页>[combinatorics] non descending path problem (outline of non descending path problem | basic model of non descending path problem | non descending path problem expansion model 1 non origin starting poi
[combinatorics] non descending path problem (outline of non descending path problem | basic model of non descending path problem | non descending path problem expansion model 1 non origin starting poi
2022-07-03 16:08:00 【Programmer community】
List of articles
- One 、 Non descending path problem A synopsis
- Two 、 Non descending path problem Basic model
- Two 、 Non descending path problem Expand the model 1
- 3、 ... and 、 Non descending path problem Expand the model 2
Combinatorial identity reference blog :
- 【 Combinatorial mathematics 】 Binomial theorem and combinatorial identities ( binomial theorem | Three combinatorial identities recursion | recursion 1 | recursion 2 | recursion 3 Pascal / Yang Hui's trigonometric formula | Combination analysis method | Characteristics of recursive combinatorial identities )
- 【 Combinatorial mathematics 】 Combinatorial identity ( Recurrence Combinatorial identity | Change the next term to sum Combinatorial identity Simple and | Change the next term to sum Combinatorial identity Staggered and )
- 【 Combinatorial mathematics 】 Combinatorial identity ( Change the next term to sum 3 Combinatorial identity | Change the next term to sum 4 Combinatorial identity | binomial theorem + Derivation Prove the combinatorial identity | Use known combinatorial identities to prove combinatorial identities )
- 【 Combinatorial mathematics 】 Combinatorial identity ( Review of eight combinatorial identities | Combinatorial identity product 1 | prove | Use scenarios )
- 【 Combinatorial mathematics 】 Combinatorial identity ( Combinatorial identity Sum of product 1 | Sum of product 1 prove | Combinatorial identity Sum of product 2 | Sum of product 2 prove )
One 、 Non descending path problem A synopsis
Non descending path problem It is a combined counting model , Using this combined counting model , It can deal with some common combination counting problems ;
Non descending path problem :
( 1 ) Basic model
( 2 ) The number of non descending paths under limited conditions
( 3 ) Application of non descending path model
- ① Proof identity
- ② Monotone function count
- ③ Stack output
Two 、 Non descending path problem Basic model
Calculation from
(
0
,
0
)
(0,0)
(0,0) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths ?
1 . Non descending path requirements :
starting point : from
(
0
,
0
)
(0,0)
(0,0) set out ;
Moving coordinate requirements : turn right Integer coordinates , Both horizontal and vertical coordinates go Integer length ;
The direction of movement requires : Only right at a time , Or move up ; Not to the left , Go down ;
2 . Turn to the selection question : Turn it into a selection problem ,
Step analysis : from
(
0
,
0
)
(0,0)
(0,0) To
(
m
,
n
)
(m, n)
(m,n) , Go to the right
m
m
m Step , Go up
n
n
n Step ;
Select the problem description : All in all
m
+
n
m+n
m+n Step , You need to choose those steps up , Which steps to the right , As long as it is in the sum
m
+
n
m + n
m+n In step , Turn to the right
m
m
m After all steps are calibrated , The rest is the upward step ;
Select the number of problem combinations to calculate : So here's just from
m
+
n
m+n
m+n Select
m
m
m Step by step , The result is
C
(
m
+
n
,
m
)
C(m+n, m)
C(m+n,m) , It can be written again
(
m
+
n
m
)
\dbinom{m + n}{m}
(mm+n)
Two 、 Non descending path problem Expand the model 1
Calculation from
(
a
,
b
)
(a,b)
(a,b) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths ?
Above from
(
a
,
b
)
(a,b)
(a,b) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths ,
be equal to
from
(
0
,
0
)
(0,0)
(0,0) To
(
m
−
a
,
n
−
b
)
(m-a, n-b)
(m−a,n−b) The number of non descending paths ;
Coordinate translation : The above principle is Coordinate translation , Set the overall coordinates Pan left
a
a
a , Translate down
b
b
b , You can get from
(
0
,
0
)
(0,0)
(0,0) To
(
m
−
a
,
n
−
b
)
(m-a, n-b)
(m−a,n−b) Of Basic model of non descending path problem ;
therefore from
(
a
,
b
)
(a,b)
(a,b) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths is
C
(
m
−
a
+
n
−
b
,
m
−
a
)
C(m-a + n-b , m-a)
C(m−a+n−b,m−a) strip ;
3、 ... and 、 Non descending path problem Expand the model 2
Calculation from
(
a
,
b
)
(a,b)
(a,b) after
(
c
,
d
)
(c, d)
(c,d) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths ?
1 . Description of calculation process :
( 1 ) Step by step processing : Use Step by step counting principle , Corresponding multiplication rule ;
( 2 ) First step : First calculate from
(
a
,
b
)
(a,b)
(a,b) To
(
c
,
d
)
(c, d)
(c,d) The number of non descending paths ;
( 3 ) The second step : And then calculate from
(
c
,
d
)
(c, d)
(c,d) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths ;
( 4 ) product rule : According to the law of multiplication , Multiply the above two results , The final result is the number of non descending paths required by the result ;
2 . The first step in the calculation
Calculate from
(
a
,
b
)
(a,b)
(a,b) To
(
c
,
d
)
(c, d)
(c,d) The number of non descending paths , Before substituting The formula
from
(
a
,
b
)
(a,b)
(a,b) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths is
C
(
m
−
a
+
n
−
b
,
m
−
a
)
C(m-a + n-b , m-a)
C(m−a+n−b,m−a) strip
The result is :
C
(
c
−
a
+
c
−
b
,
c
−
a
)
C(c-a + c-b , c-a)
C(c−a+c−b,c−a)
3 . Calculate the second step
Calculate from
(
c
,
d
)
(c,d)
(c,d) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths , Before substituting The formula
from
(
a
,
b
)
(a,b)
(a,b) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths is
C
(
m
−
a
+
n
−
b
,
m
−
a
)
C(m-a + n-b , m-a)
C(m−a+n−b,m−a) strip
The result is :
C
(
m
−
c
+
n
−
d
,
m
−
c
)
C(m-c + n-d , m-c)
C(m−c+n−d,m−c)
4 . product rule
Multiply the above two non decreasing path numbers , It's the end result ;
from
(
a
,
b
)
(a,b)
(a,b) after
(
c
,
d
)
(c, d)
(c,d) To
(
m
,
n
)
(m, n)
(m,n) The number of non descending paths is :
C
(
c
−
a
+
c
−
b
,
c
−
a
)
C
(
m
−
c
+
n
−
d
,
m
−
c
)
C(c-a + c-b , c-a) C(m-c + n-d , m-c)
C(c−a+c−b,c−a)C(m−c+n−d,m−c)
边栏推荐
- Microservices Seata distributed transactions
- Secsha system 1- login function
- Microservice API gateway
- Brush questions -- sword finger offer
- 首发!!lancet饿了么官方文档
- Persisting in output requires continuous learning
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- Go语言自学系列 | golang switch语句
- Reflection on some things
- [200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)
猜你喜欢
Myopia: take off or match glasses? These problems must be understood clearly first
App移动端测试【3】ADB命令
《微服务设计》读书笔记(下)
嵌入式开发:避免开源软件的7个理由
Brush questions -- sword finger offer
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
[web security] - [SQL injection] - error detection injection
Vs2017 is driven by IP debugging (dual machine debugging)
面试官:JVM如何分配和回收堆外内存
Please be prepared to lose your job at any time within 3 years?
随机推荐
June to - -------
Distributed task scheduling XXL job
Win32 create window and button (lightweight)
C language brush questions ~leetcode and simple questions of niuke.com
pycharm错Error updating package list: connect timed out
From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing
分布式事务(Seata) 四大模式详解
高等数学(第七版)同济大学 习题2-1 个人解答
Problems of CString in multithreading
【Proteus仿真】74HC595+74LS154驱动显示16X16点阵
Shell script import and export data
Client does not support authentication protocol requested by server; consider upgrading MySQL client
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Go language self-study series | golang switch statement
坚持输出需要不断学习
《微服务设计》读书笔记(下)
Three dimensional reconstruction of deep learning
MongoDB 的安装和基本操作
几种常见IO模型的原理
Microservice - declarative interface call openfeign