東京大学 新領域創成科学研究科 メディカル情報生命専攻 2014年8月実施 問題7
Author
Description
When we analyze the worst time complexity of an algorithm, it is worth observing how the computation time
holds, then
is defined to hold.
(1)
- (A)
- (B)
- (C)
(2) For each proposition below, determine with proof whether it holds or not. Note that
- (A)
and are equal. - (B) If
holds, then .
当我们分析一个算法的最坏时间复杂度时,观察计算时间
成立,则定义
成立。
(1) 如果
- (A)
- (B)
- (C)
(2) 对于下面的每个命题,确定是否成立,并提供证明。注意
- (A)
和 是相等的。 - (B) 如果
成立,则 。
Kai
(1)
(A)
According to the definition of Big-O notation, the highest order term dominates the growth rate. Therefore, and are equivalent.
(B)
In Big-O notation, constant factors and the base of logarithms are ignored, so is equivalent to .
(C)
- None
All other formulas in the box either grow slower or faster than
. Therefore, there are no equivalent formulas.
(2)
(A)
Proof:
We need to prove:
if and only if:
- If
, then :
- If
, then :
Combining these two cases, we get:
Conversely, since
Therefore:
Hence:
Therefore, the proposition is true.
(B)
Proof:
Assume
We need to prove:
Let's consider
Since
So:
If
For example, if
Clearly,
Thus, the correct conclusion is that the proposition does not hold.
Knowledge
时间复杂度
Problem-Solving Tips and Information
- When analyzing time complexity, focus on the highest order term.
- In Big-O notation, different bases of logarithms are considered equivalent.
- For combined functions (such as
), the complexity can be simplified by analyzing the dominant term.
Key Vocabulary
- asymptotic 渐近的
- upper bound 上界
- equivalent 等价的
- exponential 指数的
- limit 极限
References
- "Introduction to Algorithms" Chapter 3: Growth of Functions
- "Mathematical Foundations of Computer Science" Chapter 5: Asymptotic Notation