  We consider discrete clusters of quasi-resonant triads arising from a
Hamiltonian three-wave equation. A cluster consists of N modes forming a total
of M connected triads. We investigate the problem of constructing a
functionally independent set of quadratic constants of motion. We show that
this problem is equivalent to an underlying basic linear problem, consisting of
finding the null space of a rectangular (M times N) matrix A with entries 1, -1
and 0. In particular, we prove that the number of independent quadratic
invariants is equal to J = N - M* (greater than or equal to N - M), where M* is
the number of linearly independent rows in A. Thus, the problem of finding all
independent quadratic invariants is reduced to a linear algebra problem in the
Hamiltonian case. We establish that the properties of the quadratic invariants
(e.g., locality) are related to the topological properties of the clusters
(e.g., types of linkage). To do so, we formulate an algorithm for decomposing
large clusters into smaller ones and show how various invariants are related to
certain parts of a cluster, including the basic structures leading to M* < M.
We illustrate our findings by presenting examples from the
Charney-Hasegawa-Mima wave model, and by showing a classification of small (up
to three-triad) clusters.
