Expected value of the length of max consecutive sequence of $1$'s in a random binary number

195 Views Asked by At

Let $X$ be a random integer number from $0$ to $2^d − 1$. Denote by $M(X)$ the length of the maximum consecutive sequence of 1’s in the binary representation of $X$. Find expected value $E[M(X)]$ up to a constant multiplicative factor. For example, for the binary number “$1101110$”, we have $M(1101110) = 3$; and for the binary number “$11110110011$”, we have $M(11110110011) = 4$.