Uploaded by curt.elsasser

growth of functions

advertisement
Growth of Functions
The time required to solve a problem depends on more than
only the number of operations it uses.
Glossary
Symbols
Greek Alphabet
Big-O Notation
Examples
Big-O Notation
7x2 is O(x3)
x3 is O(7x2)
Glossary
algorithm: The word algorithm is a distortion of the name of a ninth century Persian
mathematician, Al-Khowarizimi, who devised (or at least wrote down) a number of
methods for doing arithmetic. We shall define an algorithm as a finite sequence of precise
instructions for performing a computation or for solving a problem.
asymptotically dominates: Let F, G: ℕ→[0, ∞) be functions. F asymptotically dominates G if,
for some integer No∈ ℕ and some real number c ∈ (0, ∞) such that for all n > No, G(n) <
c*F(n)
witnesses: The constants C and k in the definition of big-O notation are called witnesses to
the relationship f(x) is O(g(x)). See below.
Symbols
Mathematical Symbols
⇒
Often used in mathematics to represent "implies" or "leads to". For
example, in a mathematical proof, we might say "If A => B, then if
A is true, B must also be true."
∴
therefore
∃
there exists
∀
for all
~
distributed as
{ x | P(x) } or { x : P(x) }
Well known Sets
the set of elements for which P(x) is true. Eg. {x|x>0}
∅ or {}
empty set
U
The universe set is the set of all elements.
ℕ
The set of natural numbers: {0, 1, 2, 3 . . .}
ℤ
The set of integers: {. . . , −2, −1, 0, 1, 2, 3, . . .}
Q
The set of rational numbers.
ℝ
The set of real numbers.
Greek Alphabet
Big-O Notation
One of the advantages of using big-O notation is that we can estimate the growth of a
function without worrying about constant multipliers or smaller order terms. This means
that, using big-O notation, we do not have to worry about the hardware and software used
to implement an algorithm. Furthermore, using big-O notation, we can assume that the
different operations used in an algorithm take the same time, which simplifies the analysis
considerably.
The constants C and k in the definition of big-O notation are called witnesses to the
relationship f(x) is O(g(x)). To establish that f(x) is O(g(x)) we need only one pair of witnesses
to this relationship.
Examples
Big-O Notation
7x2 is O(x3)
x3 is O(7x2)
Download