Convergence of sequence of probabilities (competition problem) Let $\{p_i\}_{i=1}^\infty$ be a sequence of real number such that $0<p_i<1$ for all $i$. For each $n \in \mathbb{N}$ we assemble a subset $A_n$ of $I_n=\{1, 2,\cdots, n\}$ as follows: For any $i\in I_n$ we include $i$ in $A_n$ with probability $p_i$.
Let $q_n$ be the probability of "$A_n$ has an even number of elements".
a) Prove that $q_n=\frac{1}{2}$ iff there exists $i \in I_n$ such that $p_i=\frac{1}{2}$. 
b) Assume $p_i \neq \frac{1}{2}\, \forall i$ and name $\overline{p_i}=\min(p_i,1-p_i)$. Prove that $\lim_{n\rightarrow \infty} q_n=\frac{1}{2}$ iff $\sum_i \overline{p_i}$ diverges.
Any solution or hint for part b) will be appreciated.
 A: A shortcut: let $T_i=\mathbf 1_{i\in A_n}$ and $U_i=(-1)^{T_i}$ for every $i$ in $\{1,\ldots,n\}$, then $U_1U_2\cdots U_n=1$ if $|A_n|$ is even and $U_1U_2\cdots U_n=-1$ if $|A_n|$ is odd hence 
$$
2q_n-1=P[|A_n|\ \text{is even}]-P[|A_n|\ \text{is odd}]=E[U_1U_2\cdots U_n].
$$
Next note that by independence $E[U_1U_2\cdots U_n]=E[U_1]E[U_2]\cdots E[U_n]$ and that for every $i$, 
$$
E[U_i]=2p_i-1.
$$
Hence,
$$
2q_n-1=\prod_{i=1}^n(2p_i-1),
$$
and a) and b) follow.
A: I think I got it. Here is a draft.
Part a):
The relation between $q_n$ and $p_n$ is given by:
$$
q_n=p_n(1-q_{n-1})+(1-p_n)q_{n-1}, \; n>1,\;\;\;\; \mbox{ and } q_1=p_1.
$$
Note that $q_n=\frac{1}{2}$ is equivant to $0=(p_n-\frac{1}{2})(q_{n-1}-\frac{1}{2})$.
Therefore if $p_i=0$, then $q_j=\frac{1}{2}$ for all $j\ge i$. 
For the other side, if $q_n=\frac{1}{2}$, then $p_n=\frac{1}{2}$ or $q_{n-1}=\frac{1}{2}$. If $p_n=\frac{1}{2}$ we are done, otherwise $q_{n-1}=\frac{1}{2}$. So using induction we conclude that exists $p_i,\; i\le n-1$ such that $p_i=\frac{1}{2}$.
Part b)
We have
$$
q_n=p_n+q_{n-1}-2p_nq_{n-1}
$$
Or equivantly
$$
q_n-\frac{1}{2}=(q_{n-1}-\frac{1}{2})(1-2p_n)
$$
Note that if $p_n<\frac{1}{2}$ then $p_n=\overline{p_n}$ and if $p_n>\frac{1}{2}$ then $1-p_n=\overline{p_n}$.
Then
$$
\frac{q_n-\frac{1}{2}}{q_{n-1}-\frac{1}{2}}=1-2\overline{p_n}
$$
and therefore
$$
q_n-\frac{1}{2}=(q_1-\frac{1}{2})\prod_{i=1}^n 1-2\overline{p_i}
$$
and the previous product converges to zero iff $\sum_{i=1}^n \overline{p_i}$ diverges (some details should be mentioned here). 
