Order_Notation

Order_Notation - Order Notation Big"Oh Let f(n and g(n be...

This preview shows pages 1–2. Sign up to view the full content.

Order Notation Big "Oh" Let f(n) and g(n) be two real valued functions over the integers n ≥ 1. (Sometimes, it may be advantageous to allow n to be real. But, for our purposes, n usually will be the "size" of a problem instance which is normally an integer.) Definition: f(n) is said to be "order" g(n) if and only if there exists positive constants c and N for which f(n) ≤ cg(n) for n ≥ N. What this says is that, as n gets large, the function g(n) is an upper bound on the value of f(n). This is handy when we don't have a "nice" expression for f(n), but do for g(n). That is, we can use g(n) in calculations and know we are not underestimating the running time of whatever f(n) is measuring. Of course, we don't want to overestimate, either. So, our goal is to find the simplest and "tightest" g(n), that is, the best possible bound. Notice that all the "c" does in the definition is to allow us to "talk" about (and use) g(n) in it's simplest form, i. e., with a leading coefficient of one, recognizing we may need to multiply it by a constant for some of the functions it bounds. Sometimes you will see "f(n) is O(g(n))," to be read as "f(n) is 'big-Oh' of g(n)". Or, f(n) O(g(n)), which is read "f(n) is in (or, an element of) O(g(n))." {Many times you will see writers mistakenly write "f(n) = O(g(n))" and claim to mean the same thing. This isn't mathematically correct. In mathematics, ideally, symbols and operators have just one meaning – not like some programming languages which allow symbols to mean different things depending upon the context (overloading of operators). For example, mathematically A = B and B = A mean the

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

Page1 / 4

Order_Notation - Order Notation Big"Oh Let f(n and g(n be...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online