Let be the P(n)number of probes needed for the elements n. Then we can write the following equation:
P(0) = 0
P(n) = 1 + P((n-1)/2)
Explanation: At first, we have no elements - there is nothing to do. Then we make 1 probe and we stay with the elements (n-1)/2(we throw 1 away because we just checked it), so we need to do P((n-1)/2)more.
P(n) floor(lg(n+1)). (, n = 6 n = 7), ,