  We study two functionals of a random matrix $\boldsymbol A$ with independent
elements uniformly distributed over the cyclic group of integers $\{0,1,\ldots,
M-1\}$ modulo $M$. One of them, $V_0(\boldsymbol A)$ with mean $\mu$, gives the
total number of solutions for a generalised birthday problem, and the other,
$W(\boldsymbol A)$ with mean $\lambda$, gives the number of solutions detected
by Wagner's tree based algorithm.
  We establish two limit theorems. Theorem 2.1 describes an asymptotical
behaviour of the ratio $\lambda/\mu$ as $M\to\infty$. Theorem 2.2 suggests
Chen-Stein bounds for the total variation distance between Poisson distribution
and distributions of $V_{0}$ and $W$.
