Defining Big-O Notation

I really want to know the real definition. I tried to read the book, but could not understand it.

O: Worst case of Big-O notation.
Θ: average theta designation.
Ω: best omega notation.

Why does Wikipedia represent the speed of algorithms only in Big-O, including its average, best, and worst cases? Why didn’t they replace these formal keywords?

+3
source share
2 answers

O, Θ, and Ω do not represent the worst, middle, and best case; although they have a similar meaning.

The designation Big-O f (n) = O (g (n)) means that f grows slower than g for large values ​​of n ("n> n 0" " n" ). , g - : g (, - O (n!)). Big-O : Big-O.

Ω (f , g), , , ( , , Ω (1)).

, g , O (g), Ω (g). , O- (O, n²) Big-O ( , n²) Ω Ω (n).

: sort merge - O (n log n) Ω (n log n). , Θ (n log n), , Θ- (, , ).

, , - "f" "f avg", . , f = O (n²) - , , f avg= O (n log n).

+10

, , .

, - .

Big-O, Theta Omega , .

Big-O, Theta Omega. .

. : O Ω ?

: big-O (, ) ( Theta).


.

, , , f(n) = k1n k1.

k1n - O (n), Θ (n), Ω (n). , O (n 2), O (n 3),... Ω (1), Ω (log n), Ω (log log n),..., , .

: g(n) = k2n2 h(n) = k3n2, O (n 2), Θ (n 2), Ω (n 2).


: , , ? Theta ?

, - ( , ).

, , / . - (0 n) Ω (1.5 n), ~ θ (1.6 n) .

+3

Source: https://habr.com/ru/post/1784498/


All Articles