Probability of a relay circuit becoming short circuited. 
Given, the probability of X being switched on (it will connect with another terminal) is p, 
how to calculate the probability for terminal-a and terminal -b being connected
For instance, if 1,2 both relays are closed, there will be a connection between a,b. 
Probability that, 
i) 1,2 both are closed is,  $p^2$
 ii) 3,4 both are closed is, $p^2$
 ii) 1,4 both are closed is, $p^2$
 ii) 3,2 both are closed is, $p^2$
So, the probability that, one of these paths will remain active is, $4p^2$
And, the probability that, all of the relays will be closed, is $p^4$
So, the probability that, there will be a connection between $a$ and $b$, 
$P_{ab} = 4p^2 + p^4$ 
But, I realize that I am over counting some probabilities, as the my calculated value for $P_{ab}$ becomes greater than 1. 
I am not sure where is the over count happening. 
 A: Putting $X = closed = TRUE$, in this simple case you have
$$
X_{\,a}  = \left( {X_{\,1}  \vee X_{\,3} } \right)\; \wedge \;\left( {X_{\,2}  \vee X_{\,4} } \right)
$$
and thus
$$
\begin{gathered}
  P\left( {X_{\,a} } \right) = \left( {P\left( {X_{\,1} } \right) + P\left( {X_{\,3} } \right) - P\left( {X_{\,1} } \right)P\left( {X_{\,3} } \right)} \right)\left( {P\left( {X_{\,2} } \right) + P\left( {X_{\,4} } \right) - P\left( {X_{\,2} } \right)P\left( {X_{\,4} } \right)} \right) =  \hfill \\
   = \left( {2p - p^{\,2} } \right)^{\,2}  = p^{\,2} \left( {2 - p} \right)^{\,2}  \hfill \\ 
\end{gathered} 
$$
A: Here, when we are doing, $p^2 + p^2 + p^2 + p^2$ , we are counting one of the possibilities, 
from set theory, we know that,
$n ( A U B U C U D) = n (A) + n(B) + n(C) + n(D) - n(AU B UC ) - n (A U B U D) - n (A U C U D) - n (B U C U D) + n (A U B U C U D)$
If, $A, B , C ,D$ are events of being $(X1, X2)$ being connected, $(X3, X4)$, $(X1,X4)$, $(X3, X2)$ being connected and so forth,
And, if $P(A) = P(B) = P(C) = P(D) = p^2$
So, 
We can derive that, 
$p^2 + p^2 + p^2 + p^2 - p^3 - p^3  - p^3 - p^3 + p^4= 4*p^2 - 4*p^3 + p^4$
