We consider clusters of interconnected resonant triads arising from the QG model. A cluster consists of N modes forming a total of M connected
triads. We investigate the problem of constructing a linearly 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 × 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* ≥ N − M, where M∗ is the number of linearly
independent rows in A. We formulate an algorithm for decomposing large clusters of complicated topology into smaller ones and show how various
invariants are related to certain parts and linking types of a cluster, including the basic structures leading to M* < M.