Let S be the area of the scene. Let A be the area of the smallest rectangle we want to draw. Let N = S / A
Possible deterministic approach:
, 4 , . , 4 (), .. N , S - , A - . ( ), , 1 , , . . ( , , .)
, O (N) ( , ), .
. k, k .
2: , . , O (logN), /S /S. .
: O (N): O (N):
. , ( , ), , . , .
, , . , > 1/N < 1-1/N. N . < (1-1/N) ^ N < 1/. , , . , , . Nlog (N) 1/N, N² 1/e ^ N.
: , , NlogN ( N²), , .
: O (NlogN) ,
O (N²): O (1)