当前位置:网站首页>[combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
[combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
2022-07-03 16:40:00 【Programmer community】
List of articles
- One 、 Recurrence equation Contents summary
- Two 、 Recurrence equation Definition
- 3、 ... and 、 Recurrence equation Example
- Four 、 Fibonacci sequence ( Fibnacci )
One 、 Recurrence equation Contents summary
Recurrence equation Contents summary :
- Recursive equation definition
- Examples of recursive equations
- Constant coefficient linear recurrence equation
- Definition of linear recurrence equation with constant coefficients
- Formula solution
- Application of recurrence equation in counting problem
Two 、 Recurrence equation Definition
Sequence
a
0
,
a
1
,
⋯
,
a
n
,
⋯
a_0 , a_1 , \cdots , a_n , \cdots
a0,a1,⋯,an,⋯ , Remember to do
{
a
n
}
\{a_n\}
{ an} ,
take
a
n
a_n
an And some
a
i
(
i
<
n
)
a_i \ \ ( i < n )
ai (i<n) Connected equations ,
a
i
a_i
ai It can be
1
1
1 individual , It can be multiple ;
take
a
n
a_n
an Use the previous items
a
n
−
1
,
a
n
−
2
,
⋯
a_{n-1} , a_{n-2} , \cdots
an−1,an−2,⋯ Express it ,
be called About sequence
{
a
n
}
\{a_n\}
{ an} Of Recurrence equation ;
The recursive equation consists of : below
3
3
3 One is a set ;
- The sequence
- Recurrence equation
- initial value
Given the recurrence equation , and initial value , Can Uniquely identify a sequence ;
The relationship expressed by recurrence equation : Recurrence equation It only expresses Item is the same as the previous item The relationship between , If Different initial values , The resulting sequence is different ;
The relationship between recurrence equation and sequence : Recursive equations do not represent a sequence , yes Several series Of Common dependencies ;
Recurrence equation , Is to count the result , Expressed as a sequence ,
{
a
n
}
\{a_n\}
{ an} Is the general term formula ;
Sequence example : Such as selecting questions , from
n
n
n Of the elements
r
r
r Elements , If
n
n
n Given , that
r
r
r That's the parameter ,
- When
r
=
0
r = 0
r=0 The number of choices is
a
0
a_0
a0
- When
r
=
1
r = 1
r=1 The number of choices is
a
1
a_1
a1
⋮
\vdots
⋮
- When
r
=
n
r = n
r=n The number of choices is
a
n
a_n
an
The general term of the sequence , Represents some kind of counting result ;
3、 ... and 、 Recurrence equation Example
1 . Factorial calculation sequence :
1
!
,
2
!
,
3
!
,
4
!
,
5
!
,
6
!
,
⋯
1! , 2! , 3! , 4! , 5! , 6! , \cdots
1!,2!,3!,4!,5!,6!,⋯
In sequence The first
1
1
1 Item is
1
1
1 The factorial , The first
2
2
2 Item is
2
2
2 The factorial ,
⋯
\cdots
⋯ , The first
n
n
n Item is
n
n
n The factorial ;
2 . Recurrence equation :
F
(
n
)
=
n
F
(
n
−
1
)
F(n) = nF(n-1)
F(n)=nF(n−1)
Such as : The first
4
4
4 Item value
F
(
4
)
=
5
!
F(4) = 5!
F(4)=5! , It is equal to
4
−
1
=
3
4-1=3
4−1=3 Item value
F
(
4
−
1
)
=
F
(
3
)
=
4
!
F(4-1)=F(3) = 4!
F(4−1)=F(3)=4! multiply
5
5
5 ;
3 . initial value :
F
(
1
)
=
1
F(1) = 1
F(1)=1
according to
F
(
1
)
=
1
F(1) = 1
F(1)=1 You can calculate
F
(
2
)
F(2)
F(2) , according to
F
(
2
)
F(2)
F(2) You can calculate
F
(
3
)
F(3)
F(3) , according to
F
(
3
)
F(3)
F(3) Sure Calculation
F
(
4
)
F(4)
F(4) ,
⋯
\cdots
⋯ , according to
F
(
n
−
1
)
F(n-1)
F(n−1) You can calculate
F
(
n
)
F(n)
F(n) ;
Four 、 Fibonacci sequence ( Fibnacci )
1 . Fibonacci sequence :
1
,
1
,
2
,
3
,
5
,
8
,
13
,
⋯
1 , 1 , 2 , 3 , 5 , 8 , 13 , \cdots
1,1,2,3,5,8,13,⋯
2 . Recurrence equation :
F
(
n
)
=
F
(
n
−
1
)
+
F
(
n
−
2
)
F(n) = F(n-1) + F(n-2)
F(n)=F(n−1)+F(n−2)
describe : The first
n
n
n Item equal to
n
−
1
n-1
n−1 term and The first
n
−
2
n-2
n−2 Sum of items ;
Such as : The first
4
4
4 Item value
F
(
4
)
=
5
F(4) = 5
F(4)=5 , Is equal to
The first
4
−
1
=
3
4-1=3
4−1=3 Item value
F
(
4
−
1
)
=
F
(
3
)
=
3
F(4-1)=F(3) = 3
F(4−1)=F(3)=3
add The first
4
−
2
=
2
4-2=2
4−2=2 Item value
F
(
4
−
2
)
=
F
(
2
)
=
2
F(4-2) = F(2) =2
F(4−2)=F(2)=2 ;
3 . initial value :
F
(
0
)
=
1
,
F
(
1
)
=
1
F(0) = 1 , F(1) = 1
F(0)=1,F(1)=1
according to
F
(
0
)
=
1
,
F
(
1
)
=
1
F(0) = 1, F(1) = 1
F(0)=1,F(1)=1 You can calculate
F
(
2
)
F(2)
F(2) , according to
F
(
1
)
,
F
(
2
)
F(1),F(2)
F(1),F(2) You can calculate
F
(
3
)
F(3)
F(3) , according to
F
(
2
)
F
(
3
)
F(2)F(3)
F(2)F(3) Sure Calculation
F
(
4
)
F(4)
F(4) ,
⋯
\cdots
⋯ , according to
F
(
n
−
2
)
,
F
(
n
−
1
)
F(n-2) , F(n-1)
F(n−2),F(n−1) You can calculate
F
(
n
)
F(n)
F(n) ;
边栏推荐
- 【剑指 Offer】58 - I. 翻转单词顺序
- 什么是质押池,如何进行质押呢?
- Explore Netease's large-scale automated testing solutions see here see here
- Is it safe to open an account with flush?
- 线程池执行定时任务
- How to initialize views when loading through storyboards- How is view initialized when loaded via a storyboard?
- NLP四范式:范式一:非神经网络时代的完全监督学习(特征工程);范式二:基于神经网络的完全监督学习(架构工程);范式三:预训练,精调范式(目标工程);范式四:预训练,提示,预测范式(Prompt工程)
- 斑马识别成狗,AI犯错的原因被斯坦福找到了
- 面试官:JVM如何分配和回收堆外内存
- Why does the std:: string operation perform poorly- Why do std::string operations perform poorly?
猜你喜欢

深入理解 SQL 中的 Grouping Sets 语句

Daily code 300 lines learning notes day 10

Threejs Part 2: vertex concept, geometry structure

Record windows10 installation tensorflow-gpu2.4.0

Myopia: take off or match glasses? These problems must be understood clearly first

Idea configuration plug-in

斑马识别成狗,AI犯错的原因被斯坦福找到了

Record a jar package conflict resolution process

word 退格键删除不了选中文本,只能按delete

TCP congestion control details | 3 design space
随机推荐
[sword finger offer] 58 - I. flip the word order
面试官:JVM如何分配和回收堆外内存
Learn from me about the enterprise flutter project: simplified framework demo reference
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
Eleven requirements for test management post
Extraction of the same pointcut
[Jianzhi offer] 57 - ii Continuous positive sequence with sum s
Golang 装饰器模式以及在NSQ中的使用
Interpretation of several important concepts of satellite antenna
Why does the std:: string operation perform poorly- Why do std::string operations perform poorly?
2022.02.14_ Daily question leetcode five hundred and forty
[combinatorics] non descending path problem (number of non descending paths with constraints)
Détails du contrôle de la congestion TCP | 3. Espace de conception
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Everyone in remote office works together to realize cooperative editing of materials and development of documents | community essay solicitation
Record windows10 installation tensorflow-gpu2.4.0
为抵制 7-Zip,列出 “三宗罪” ?网友:“第3个才是重点吧?”
Add color to the interface automation test framework and realize the enterprise wechat test report
MySQL converts comma separated attribute field data from column to row
Cocos Creator 2. X automatic packaging (build + compile)