Artificial intelligent assistant

Taking coins away randomly from 2 piles Suppose we have 2 piles of coins, each with $n$ coins. Every time we randomly pick a pile and take away 1 coin. When one of the piles becomes empty, what is the expectation of the number of coins in the remaining pile?

Let $X_i$ be the number of potential draws from pile $i\in \\{0,1\\}$ until the other pile is empty. Then $$ \mathsf{P}(X_i=k)=\binom{n+k-1}{k}\left(\frac{1}{2}\right)^{n+k}. $$ Letting $Y$ denote the number of remaining coins in a non-empty pile after the other pile has been emptied, for $m\in\\{1,\ldots,n\\}$ one gets \begin{align} \mathsf{P}(Y=m)&=\mathsf{P}(Y=m,X_1

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2d4da1bac7385ec75e59c3f7c7b3086b