Answer:
E(x) [tex]= \frac{n+1}{2}[/tex]
Var(x) [tex]= \frac{1}{4} [ n - 1 ][/tex]
Step-by-step explanation:
Hint x = 1 + x1 + ......... Xn-1
[tex]X_{i} = \left \{ {{1} if the ith adjacent pair of magnets repel each other \atop {0} if ith adjacent pair of magnets join} \right.[/tex]
attached below is the detailed solutioN
usually like poles of magnets repel each other and unlike poles of magnets attract each other forming a block