{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# if x 1 2345 x ln1 x x for x 1 1 x a function

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ⎦ ≥ ( a − ( b − 1 )) / b NCKU IIM NCKU 資料結構 Chapter 3 資料結構 14 Modular Arithmetic • For any integer a and any positive integer n, the value a mod n is the remainder (or residue) of the quotient a/n : remainder residue a/n a mod n = a -⎣a/n⎦n • If(a mod n) = (b mod n). We write a ≡ b (mod n) and say mod that a is equivalent to b, modulo n. equivalent • We write a ≢ b (mod n) if a is not equivalent to b modulo n. NCKU IIM NCKU 資料結構 Chapter 3 資料結構 15 Polynomials v.s. Exponentials d ∑an – A function f(n) is polynomial bounded if polynomial f (n) = O(n k ) = O(nO (1) ) for some constant k • Polynomials: P (n) = i i i=0 . • Exponentials: – Any positive exponential function with a base strictly greater than 1 grows faster than any polynomial. n = o(a ) (a > 1) b n ∞ xi ex = ∑ i =0 i ! 1 + x ≤ e x ≤ 1 + x + x 2 if | x |< 1 xn lim n →∞ (1 + ) = e x n NCKU IIM NCKU 資料結構 Chapter 3 資料結構 16 Logarithms x 2 x3 x 4 x5 ln(1 + x) = x − + − + − ... if | x |< 1 2345 x ≤ ln(1 + x) < x for x > −1 1+ x • A function f(n) is polylogarithmically bounded if polylogarithmically f (n) = O(log k n) = O(log O (1) n) for any postive constant k • Any positive polynomial function grows faster than any polylogarithmic function. log b n = o( n a ) NCKU IIM NCKU 資料結構 Chapter 3 資料結構 17 Factorials • Stirling’s approximation 1 nn n!= 2πn ( ) (1 + Θ( )) n ne n ! = o( n...
View Full Document

{[ snackBarMessage ]}