Take-Away Notes for Module COMP2048.
- Completed
- Corrected
- Reviewed
Several functions that often appear in algorithm analysis:
General | Mathematical |
---|---|
Constant | |
Logarithmic | |
Linear | |
N-Log-N | |
Quadratic | |
Cubic | |
Exponential |
Multiplication Rule for Big-Oh
1.
Let , , , be functions mapping positive
integers to positive real numbers. Show that if and , then .
Premise: 1.
Prof:
Given Premise 1:
Hence,
Given Premise 2:
Hence,
Given Premise 3:
Hence,
Set certain
Hence, there exists positive real constant
Hence,
Q.E.D.
Big-Oh Rules: Drop Smaller Terms
2.
Let , be functions mapping positive
integers to positive real numbers. Show that if with as , then .
Premise: 1.
Proof:
Given Premise 2:
Hence, there exists
Hence,
Hence,
Hence,
Q.E.D
Exercises 1-2
Apply the Big-Oh rules to justify the answers:
Exercise 3
Prove that:
Let
Let
For
Hence,
Hence,
Q.E.D.
Prove that:
Let
Let
For
Hence,
Hence,
Q.E.D.
Exercise 4
Order the following function groups by asymptotic growth rate.
Note: 2
as default,
equivalent to lb
.
Exercise 5
1. Prove / Disprove:
Premise:
Statement:
Proof:
To prove the given statement is to prove:
Take arbitrary positive real constant
by the definition of Little-Oh
;
Take
Hence, obviously, $n n_0 ,
Hence,
Q.E.D.
2. Prove / Disprove:
Premise:
Statement:
Proof:
To prove the given statement is to prove:
Take arbitrary positive real constant
by the definition of Little-Oh
;
Take
Hence, obviously, $n n_0 ,
Hence,
Q.E.D.
3. Prove / Disprove:
Premise:
Statement:
Disproof: To prove by contradiction:
Suppose the given statement is true,
thus
Hence, take arbitrary positive real constant
Given
obviously
Hence,
Hence
given all positive real constant
Hence, the statement
Q.E.D.
Counter Example:
When
Exercise 6
1. Prove / Disprove:
Let
Let
For c = 4,
Hence,
Hence,
Q.E.D.
2. Prove / Disprove:
Let
Let
For c = 1,
Hence,
Hence,
Q.E.D.
3. Prove / Disprove:
Premise:
Statement:
Disproof:
To prove the given statement is to prove:
Take arbitrary positive real constant
Hence
given all positive real constant
Hence, the statement
Q.E.D.
Counter Example:
When
4. Prove / Disprove:
Premise:
Statement:
Proof:
To prove the given statement is to prove:
Take arbitrary positive real constant
by the definition of Little-Oh
;
Take
Hence, obviously,
Hence,
Q.E.D.
5. Prove / Disprove:
Let
Let
For
For
Hence,
Hence,
Q.E.D.
6. Prove / Disprove:
Let
Let
For c = 1,
Hence,
Hence,
Q.E.D.
7. Prove / Disprove:
Premise:
Statement:
Proof:
To prove the given statement is to prove:
Take arbitrary positive real constant
by the definition of Little-Oh
;
Take
Hence, obviously, $n n_0 ^{},
Hence,
Q.E.D. ### 8. Prove / Disprove:
Statement:
Proof:
To prove the given statement is to prove:
Take arbitrary positive real constant
by the definition of Little-Oh
;
As
that is, it will grow bigger first, then grow smaller and eventually be smaller than c.
Hence, there exists an integer constant
Hence,
Q.E.D.
Exercise 7
1.
Given if is even, if is odd. Find the Big-Oh and Big-Omega
behaviors of .
Suppose
- By the definition of Big-Oh:
Take
Take
Hence:
Hence,
Hence,
Q.E.D.
- By the definition of Big-Omega:
Take
Take
Hence:
Hence,
Hence,
Q.E.D.