Published online by Cambridge University Press: 05 June 2012
In this chapter, we review standard asymptotic notation, introduce the formal computational model we shall use throughout the rest of the text, and discuss basic algorithms for computing with large integers.
Asymptotic notation
We review some standard notation for relating the rate of growth of functions. This notation will be useful in discussing the running times of algorithms, and in a number of other contexts as well.
Suppose that x is a variable taking non-negative integer or real values, and let g denote a real-valued function in x that is positive for all sufficiently large x; also, let f denote any real-valued function in x. Then
f = O(g) means that |f(x)| ≤ cg(x) for some positive constant c and all sufficiently large x (read, “f is big-O of g”),
f = Ω(g) means that f(x) ≥ cg(x) for some positive constant c and all sufficiently large x (read, “f is big-Omega of g”),
f = ⊗(g) means that cg(x) ≤ f(x) ≤ dg(x), for some positive constants c and d and all sufficiently large x (read, “f is big-Theta of g”),
f = o(g) means that f/g → 0 as x → ∞ (read, “f is little-o of g”), and
f ∼ g means that f/g → 1 as x → ∞ (read, “f is asymptotically equal to g”).
Example 3.1. Let f(x) ≔ x2 and g(x) ≔ 2x2 - x+1. Then f = O(g) and f = Ω(g). Indeed, f = ⊗(g). ▪
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.