Lego Blocks and Linearity of Expectation You are given a Lego block of length $10$ (length is measured discretely as number of “knobs”; the width of all blocks is assumed to be one) and three more Lego blocks of length $3$, $4$, $5$, respectively. 
The Lego blocks are randomly stacked upon the block of length $10$ such that their boundaries are contained within the boundaries of the block of length $10$. The position of a short block is given as the position of the left-most knob of the $10$-block covered by it. Hence, the block of length $3$ could be with equal probability in position $1$, $2$, $3$, $4$, $5$, $6$, $7$, or $8$, the block of length $4$ with equal probability in positions $1$, $2$, $3$, $4$, $5$, $6$, or $7$ and the block of length $5$ with equal probability in positions $1$, $2$, $3$, $4$, $5$ or $6$. The short blocks are placed independently at random. 
Let $X$ be the number of knobs out of the ten of the large block, which are covered by all three shorter blocks; $X \in \{0, 1, 2, 3\}$. What is $E[X]$? Hint: Use indicator random variables.

I am confused as how to approach this problem. What should the indicator variables be, 1 for covered by all three blocks and 0 for not covered by all three blocks? If so then how do I find the probability of all being covered at once?
 A: Let $A$, $B$ and $C$ denote the positions of the 3-block, 4-block and 5-block respectively. For example, $A = 6$ means the 3-block is covering knobs {6,7,8}. 
Then, $A$, $B$ and $C$ are independent discrete random variables, with $A$ ~ Uniform(1,8), $B$ ~ Uniform(1,7) and $C$ ~ Uniform$(1,6)$, and with joint pmf:
$$  f(a,b,c) =  \begin{cases}(\frac18)(\frac17)(\frac16) & \text{       }\{(a,b,c):a\in \{1,\dots,8\},b\in \{1,\dots,7\}, c\in \{1,\dots,6\}\}   \\ 0 & \text{       }\text{otherwise} \end{cases}$$ 
Because the distribution is Uniform, an easy (yet still exact) way forward is to evaluate the combinations ... there are only $8\times7\times6 = 336$ ways to lay the 3 different blocks. Using say Mathematica, the set of possible combinations are:
   combs = Flatten[ Table[ {a + {0,1,2}, b + {0,1,2,3}, c + {0,1,2,3,4}}, 
                           {a, 1, 8}, {b, 1, 7}, {c, 1, 6}],    2];

For each case, check the intersections of the 3 blocks:
    int = Apply[Intersection, combs, 1];

Finally, count how many times the intersection set is of length 0, how many times it is of length 1, and 2 and 3. Dividing by 336 yields $P(X=x)$, for $x = \{0,1,2,3\}$:
    probs = Table[ Count[int, x_ /; Length[x] == i], {i, 0, 3}] /336 


$\left\{\frac{29}{56},\frac{5}{24},\frac{29}{168},\frac{17}{168}\right\}$

We now have the exact pmf for $X$: 
$${P(X=0) = \frac{29}{56}, \text{    }P(X=1) = \frac{5}{24},\text{    }P(X=2)=\frac{29}{168}, \text{    }P(X=3)=\frac{17}{168}}$$ 
and so:
$$E[X] = probs.\{0,1,2,3\} = \frac67$$

Check
As a check, we can also calculate $P(X=3)$ (the probability that all our blocks have 3 knobs in common) directly from pmf $f(a,b,c)$:

Suppose block $B$ is located at position $b$. Then, to get 3 intersecting hits:


*

*(i) the $A$ block must be located at $A = b$ or $b+1$, and

*(ii) the $C$ block must be located at $A  = c$ or $c+1$ or $c+2$, 
so $P(X=3)$ is:

... as above. Here,  Prob is the probability function from the mathStatica add-on to Mathematica [Disclosure: I am an author of same.]
A: Let $X_i$ be the random variable that is $1$ if knob $i$ is covered by all three blocks, and $0$ otherwise.  Thus we are interested in $\displaystyle E(X) = E(\sum_{i=1}^{10} X_i)$.
Now how do we compute $E(X_i)$?  Well, $E(X_i)$ is just the probability that knob $i$ is covered by all three blocks.  Since the events $A_{ik}$ that knob $i$ is covered by block $k$ are independent for different $k$, this is just the product of the probabilities $P(A_{ik})$ for $k=1,2,3$.  So you can use the probabilities $P(A_{ik})$ that block $k$ covers knob $i$ to compute $E(X_i)$ for each $i$, and then use linearity of expectation to compute $E(X)$.
