Discrete convolution (between infinite sequences $f$ an $g$) is defined as $$(f*g)(k) = \sum_{j=-\infty}^{\infty}f(j)g(k-j)$$.
It is well known that convolution is associative, that is $(f*g)*h=f*(g*h)$. But I am a little confused with the following situation:
Let be $f=H$ (discrete Heaviside), that is $H(k)=0$ for $k<0$ and $H(k)=1$ for $k\ge 0$. Let be $g$ defined as $g(0)=1$, $g(1)=-1$ and $g(k)=0$ otherwise. And finally (maybe the problem !) let be $h(k)=1$ for any $k\in\mathbb{Z}$. In this situation we easily obtain:
$(f*g)*h = h$ and $f*(g*h) = 0$
Can someone have an explanation for this point and how it could be avoided?