東京大学 新領域創成科学研究科 メディカル情報生命専攻 2015年8月実施 問題7
Author
Description
自然数
- (1)
- (2)
- (3)
- (4)
- (5)
各再帰的定義を満たす
Let
- (1)
- (2)
- (3)
- (4)
- (5)
From the following complexity classes, select the smallest class for
Kai
(1)
For this recurrence, we use the Master Theorem. The recurrence is of the form
- Here,
, , and . - We need to compare
with .
First, compute
According to the Master Theorem:
- If
where , then . - If
, then . - If
where and for some and sufficiently large , then .
In this case,
Since
Thus,
(2)
To solve this recurrence, we can use the iterative method:
When
The sum
Thus,
Thus,
(3)
This is a non-homogeneous linear recurrence relation. We can use the iterative method:
The sum
And the sum
Therefore:
Thus,
(4)
For this recurrence, we again use the Master Theorem. The recurrence is of the form
- Here,
, , and . - We need to compare
with .
First, compute
According to the Master Theorem:
- If
where , then . - If
, then . - If
where and for some and sufficiently large , then .
In this case,
Since
Thus,
(5)
For this recurrence, we use the Master Theorem. The recurrence is of the form
- Here,
, , and . - We need to compare
with .
First, compute
According to the Master Theorem:
- If
where , then . - If
, then . - If
where and for some and sufficiently large , then .
In this case,
Since
Thus,
Summary
- Recurrence 1:
, . - Recurrence 2:
, . - Recurrence 3:
, . - Recurrence 4:
, . - Recurrence 5:
, .
Knowledge
主定理 递归 复杂度分析
解题技巧和信息
对于递归方程的时间复杂度分析,使用主定理是一个强大的工具。主定理适用于形如
重点词汇
- Recurrence Relation 递归关系
- Master Theorem 主定理
- Time Complexity 时间复杂度
- Logarithm 对数
- Big O Notation 大 O 符号
参考资料
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, 3rd Edition. MIT Press, Chapter 4.