A release-checked easy problem for training Counting With Indicators, Linearity of Expectation, Expected Value/LOTUS.
Question
$n$ adjacent colorless squares are linear arranged. Each individual square is colored black or white with equal probability, independent of all other squares. A connected component is a maximal sequence of adjacent squares all with the same color. For example, BBWWBBBWBWWW has $6$ connected components. Find the expected number of connected components in the line after coloring the squares when $n = 100$.
Practice focus
This Probability problem is tagged Counting With Indicators, Linearity of Expectation, Expected Value/LOTUS. State the random variables and conditioning information explicitly, then check the result against boundary cases before opening hints or a solution.