How to construct an example for the entropy equation: $H(Z)=H(X)+H(Y)$ where $Z=X+Y$ Given $Z=X+Y$ where X and Y are two random variables, under what conditions does $H(Z)=H(X)+H(Y)$?
Notice $Z$ is a function of $(X,Y)$, therefore $H(Z)\leq H(X,Y)$, and $H(X,Y)\leq H(X)+H(Y)-I(X;Y)$. Therefore when $Z$ and $(X,Y)$ is a one-to-one function and $X$ is independent of $Y$.
My question is, how to find an example that satisfy this problem ? I have a simple example that let $X=0$ so that $Z=Y$, which satisfy the conditions.  However, can anyone gives a more non-trivial example ? Thanks.

To construct a proper example, as you found out yourself in a very nice fashion, there is a bijection between $Z$ and $(X,Y)$ (I suppose that random variables are discrete of course).
Let $X'\sim \text{Bernoulli}(\frac 12)$ and $Y\sim \text{Bernoulli}(\frac 12)$. Set $X=2X'$ and take $Z=X+Y$. Then $Z$ is uniformly distributed over $\{0,1,2,3\}$ and $X$ and $Y$ are also uniformly distributed over $\{0,2\}$ and $\{0,1\}$. Therefore it is easy to see that $H(Z)=H(X)+H(Y)$.
