A (0, 1) matrix is linear if it does not contain a 2 x 2 submatrix of
all ones. In this paper we give polynomial algorithms to test whether
a linear matrix is balanced or perfect. The algorithms are based on de
composition results previously obtained by the authors.