Determine the dimension of the cycle space (so-called cyclomatic number) of the grid \( m \times n \).
The grid has \( mn \) vertices and \( 2mn-m-n \) edges. The cyclomatic number is \( | E | - | V | + 1 = mn-m-n + 1 \).