TITLE: Elementary applications of linear algebra over finite fields
QUESTION [32 upvotes]: I'm teaching axiomatic linear algebra again this semester.  Although the textbooks I'm using do everything over the real or complex numbers, for various reasons I prefer to work over an arbitrary field when possible.   I always introduce at least $\mathbb{F}_2$ as an example of a finite field.  To help motivate this level of generality, I'd like to cover some application of linear algebra over finite fields.  Ideally it shouldn't make explicit reference to linear algebra or finite fields in its setup, and should require as little background as possible (the students have taken calculus, but not necessarily any other advanced math — in particular applications to group theory are out).  I've looked around a little, but haven't found anything so far that requires little enough overhead to fit into a single 50-minute lecture and wouldn't seem either too abstract or too arbitrary to motivate such students.  Any suggestions?
Alternatively, I'd be interested in elementary applications of linear algebra over any other field which isn't a subfield of $\mathbb{C}$.

REPLY [2 votes]: There is a Martin Gardner problem, reprinted in his Unexpected Hanging collection, that goes like this:

Miranda beat Rosemary in a set of tennis, winning 6–3.  There were five service breaks.  Who served first?

One solution is as follows.  The wins by the player who served first may be represented by a vector  $\mathbb{F}_2^9$ that is the sum of (1,0,1,0,1,0,1,0,1) and another vector of weight 5.  Such a vector must have even weight, so the player who served first won an even number of games.  Thus Miranda served first.
In the book, Gardner writes that his original solution was long and cumbersome, and that the shortest solution he received was by Goran Ohlin: "Whoever served first, served five games, and the other player served four.  Suppose the first server won $x$ of the games she served and $y$ of the other four games.  The total number of games lost by the player who served them is then $5-x+y$.  This equals $5$ [we were told that the non-server won five games].  Therefore $x=y$, and the first server won a total of $2x$ games.  Because only Miranda won an even number of games, she must have been the first server."  Though more elementary in some sense, this solution seems more ad hoc and less conceptual to me than the above argument using $\mathbb{F}_2$.