function r=convolute(p,q)
% p(1) = probability of 0, similalry q(1)
r=p(1)*q(1)
n=length(p)
for i=1:(n+length(q)-2)
   J=0:min(i,n-1);
   r=[r sum(p(1+J).*q(1+i-J))];
end

   