Duże O
f,g:N→R
f(n)=O(g(n))≡( ∃c ∃n0 ∀n>n0:∣∣∣f(n)∣∣∣≤c∣∣∣g(n)∣∣∣ )
Example O #1
Dla f(n)=n3+O(n2)≡∃h(n)=O(n2) takie że f(n)=n3+h(n)
Example O #2
f(n)=1010n+O(ln(n))=O(n)
## Duże Ω |
f(n)=Ω(g(n))≡( ∃c ∃n0 ∀n≥n0:c∣g(n)∣≤∣f(n)∣ ) |
### Example Ω |
n=Ω(log2(n)) n=O(ln(n)) |
Duże Θ
f(n)=Θ(g(n))≡f(n)=O(g(n))∧f(n)=Ω(g(n)) ≡∃c1,c2∀n≥n0:c1∣∣∣g(n)∣∣∣≤f(n)≤c2∣∣∣g(n)∣∣∣
## Małe o |
f(n)=o(g(n))≡( ∀c ∃n0 ∀n≥n0:∣∣∣f(n)∣∣∣≤c∣∣∣g(n)∣∣∣ ) |
### Example o |
13n2=O(n2) 13n2=o(n3) ale 13n2=o(n2) |
Mała ω
f(n)=ω(g(n))≡( ∀c ∃n0 ∀n≥n0:c∣∣∣g(n)∣∣∣≤∣∣∣f(n)∣∣∣ )