maths.free › Discrete Math & Logic › Algorithms and growth of functions
Algorithms and growth of functions
Big-O notation, comparing growth rates, and what "efficient" means.
Big-O compares functions by eventual growth: n² is O(n³), 2ⁿ dominates every polynomial, n! dominates 2ⁿ. Picture it: the graphs of n, n log n, n², 2ⁿ pulling apart. Think it: P vs NP asks whether a whole class of problems is polynomial — the Frontiers page.
Toimiva esimerkki: limit of (2^n)/(n!) as n -> oo
Askel kerrallaan
- \lim_{n \to \infty^+-} \frac{2^{n}}{n!}
Try direct substitution first.
- \
As x grows without bound, compare the fastest-growing terms (or divide top and bottom by the highest power).
- = 0
Take the limit.
Paljasta vastaus
Symbols used here
The value f(x) approaches as x approaches a.
Not a number: "grows without bound" in limits and intervals.
Least upper bound, greatest lower bound.
Grows no faster than n² (up to a constant), for large n.
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
Number of k-element subsets of n things: n!/(k!(n−k)!).
Add a_k for k = 1 up to n.
x belongs to A; every element of A is in B.
In either; in both; in A but not B.
The set with no elements; the number of elements of A.
Quantifiers: every x; at least one x.
Logical connectives.
Marks the point where the statement has been established.
n divides a − b; a and b have the same remainder.
What is left after dividing a by n.
How to: Algorithms and growth of functions
- Try direct substitution first.
- As x grows without bound, compare the fastest-growing terms (or divide top and bottom by the highest power).
- Take the limit.
Questions people ask
What makes mathematics "discrete"?
It deals with separate, countable objects — integers, graphs, statements — rather than continuous quantities. No limits, no infinitesimals; instead induction, counting and logic.
How does a proof by induction work?
Show the statement for the first case, then show that whenever it holds for n it holds for n + 1. Like dominoes: the first falls, and each knocks over the next.