正在加载图片...
Establishing order of growth using the definition Definition: f(n) is in O(g(n), denoted f(n) O(g(), if order of growth of f(n) s order of growth of g(n)(within constant multiple), i.e., there exist positive constant c and non-negative integer no such that f(m)≤cg(m) for every n≥ Examples: 口10 n is in o(2) 口5n+20 is in o(m) Copyright 2007 Pearson Addison-Wesley. All rights reserved A Levitin "Intoducion to the Design Analysis of Algorithms, 2nd ed, Ch 2 2-14Copyright © 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin “Introduction to the Design & Analysis of Algorithms,” 2 nd ed., Ch. 2 2-14 Establishing order of growth using the definition Definition: f(n) is in O(g(n)), denoted f(n)  O(g(n)), if order of growth of f(n) ≤ order of growth of g(n) (within constant multiple), i.e., there exist positive constant c and non-negative integer n0 such that f(n) ≤ c g(n) for every n ≥ n0 Examples: 10n is in O(n 2 ) 5n+20 is in O(n)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有