I try to solve a problem and I don't know how to merge my result, what is the final result?
Problem: we have 2 card decks, each contains $n$ cards. If we swap 1 randomly chosen card from the 1st deck with a randomly chosen card from the 2nd deck. How much is the entropy ?
I think in the following way: 2 cases:
If we swap the same cards the entropy remains the same $$-n\left(\frac1n\right)\log_2\left(\frac1n\right)=\log_2(n)$$ because $$H(x) = -\sum p(i) \log_2(p(i))\;.$$
Or if we choose different cards then the entropy looks like this $$H(x) = -(n-2) \left(\frac1n\right)\log_2\left(\frac1n\right) - (1)\left(\frac2n\right)\log_2\left(\frac2n\right)$$ So in this case the deck contains 2 same card, then the probability on this event is doubled and the other (n-2) remains the same.
Is this the final result? Can I make a more general formula ?
Thanks for answers :)