, , ceil (log3 (N)).
, . , 3- . , , , , . , , . , log3 (N), N 3, , N.
If you do not know if an object of different weights is heavier or lighter than the rest, then it takes about log3 / 2 (N), since in the worst case you can throw out only one of the three piles, thereby reducing the number of objects in two times.
source
share