-
[Introduction to Algorithms, CLRS] Exercises 2.2-1알고리즘 2017. 11. 25. 20:06
This is a solution for Introduction to Algorithms. I write this for my study purpose.
Exercises 2.2-1
Express the function n3 / 1000 - 100n2 - 100n + 3 in terms of Θ notation.
Answer:
The answer’s going to be Θ(n^3). (n to the 3)
Writing e for the original expression,
Θ(e) = Θ(max(n^3/1000, −100n^2, −100n, 3)).
This will equal to Θ(max(n^3 , n^2 , n, 1)).
As Θ(1) < Θ(n) < Θ(n^2 ) < Θ(n^3 ), Θ(max(n^3 , n^2 , n, 1)) = Θ(n^3 ).
Source: https://web.cs.wpi.edu/~guttman/cs2223/hw1_clrs.pdf
'알고리즘' 카테고리의 다른 글
[Introduction to Algorithms, CLRS] Exercises 2.2-3 (0) 2017.12.23 [Introduction to Algorithms, CLRS] Exercises 2.2-2 (0) 2017.12.09 [Introduction to Algorithms, CLRS] Exercises 2.1-4 (0) 2017.11.25 [Introduction to Algorithms, CLRS] Exercises 2.1-3 (0) 2017.09.16 [Introduction to Algorithms, CLRS] Exercises 2.1-2 (0) 2017.09.03