# How to bound the maximal consecutive length in a random subset of [n] as function of n?

Let $S$ be a random subset of $[n]=\{1,2,\ldots,n\}$ chosen uniformly from $[n]$'s subsets. How can I find a function $f(n)$ s.t. for any $\varepsilon \gt 0$,

$$\lim_{n \rightarrow \infty} P\left[(1- \varepsilon) f(n) \le \lambda (S) \le (1 + \varepsilon)f(n)\right]=1 ?$$

-
What is the purpose of these 2 links? –  Did Feb 12 '13 at 20:52
What did you try to solve this question? –  Did Feb 12 '13 at 20:52
@Did related material I found but didn't help me. may helps to other people. –  mati Feb 12 '13 at 20:54
What did you try to solve this question? –  Did Feb 12 '13 at 21:00
Here is the answer: $f(n)=\log_2n$. I hesitate to post a full proof, for the usual reasons.