Generalizations of the number theory concepts of "even" and "odd"?

One of the very first number theory concepts introduced to students -- even before primeness, divisibility, etc. -- is the idea that a natural number can either be "even" (that is, evenly divisible by 2) or "odd" (all other numbers). For all intents and purposes, at that time, even and odd numbers were evenly distributed and of the same density in the natural numbers.

There always seemed to be something inherently "special" about a number's evenness or oddness, besides the trivial one that members of one class could be divided equally into two groups and the other cannot. One would memorize addition and multiplication tables of evenness and oddness (an odd number will remain odd when added to ANY even number). You could not iterate through all of the even numbers through multiplication alone, while you could for the odds.

I've heard the chess board being described as possessing evenness and oddness. For example, dark squares and light squares can represent either even or odd. A diagonal move can be an "even" move and a side-to-side move is an "odd" one, and moves are represented as additions to a square.

In this way, a knight's move is an "odd" move (odd+odd+even), and when added to an odd square will yield an even square; when added to an even square will yield an odd square (odd + odd = even, odd + even = odd) A bishop's move can be considered always even, so once a bishop is on an odd square, it can only ever move onto other odd squares. Likewise for bishops on even squares.

Are there any more generalizations of this concept to math? Is it meaningful to talk of even or odd matrices, or even or odd vectors or vector spaces?

I've heard the concept applied to functions (even or odd functions), but I don't know if they are related to this by anything other than their name.


Solution 1:

Yes. The generalization is provided by modular arithmetic. The properties you are observing all come from the fact that taking the remainder modulo $n$ respects addition and multiplication, and this generalizes to any $n$. More generally in abstract algebra we study rings and their ideals for the same reasons.

The notion of evenness and oddness of functions is closely related, but it is somewhat hard to explain exactly why. The key point is that there is a certain group, the cyclic group $C_2$ of order $2$, which is behind both concepts. For now, note that the product of two even functions is even, the product of an even and odd function is odd, and the product of two odd functions is even, so even and odd functions under multiplication behave exactly the same way as even and odd numbers under addition.

There are also huge generalizations depending on exactly what you're looking at, so it's hard to give a complete list here. You mentioned chessboards; there is a more general construction here, but it is somewhat hard to explain and there are no good elementary references that I know of. Once you learn some modular arithmetic, here is the modular arithmetic explanation of the chessboard idea: you can assign integer coordinates $(x, y)$ to each square (for example the coordinate of the lower left corner), and then you partition them into black or white squares depending on whether $x + y$ is even or odd; that is, depending on the value of $x + y \bmod 2$. Then given two points $(a, b)$ and $(c, d)$ you can consider the difference $c + d - a - b \bmod 2$, and constraints on this difference translate to constraints on the movement of certain pieces. This idea can be used, for example, to prove that certain chessboards (with pieces cut out of them) cannot be tiled with $1 \times 2$ or $2 \times 1$ tiles because these tiles must cover both a white square and a black square. Of course there are generalizations with $2$ replaced by a larger modulus and larger tiles.

As for matrices and vectors, let's just say that there are a lot of things this could mean, and none of them are straightforward generalizations of the above concept.

Solution 2:

One example that immediately comes to mind is permutations.

There is a concept of the parity of a permutation, which corresponds to the parity of the number of swaps needed to get it back to the original position. This same concept is sometimes talked in terms of "sign" of a permutation, which is either 1 or -1, depending on whether the permutation is even or odd.

Permutations are related to matrices, as they show up in the definition of the determinant, and in fact, the sign of the permutation is used unlike the definition of the permanent.

Some configurations of the famous fifteen puzzle are shown to be unsolvable by considering the parity of the permutations involved.

Look at this page: Parity of Permutation which also talks about generalizations of this concept here: Generalizations to Coxeter Groups.