\section{Algorithms}
\def\code#1{\texttt{#1}}
The algorithms works by going from left to right over the columns of the
matrix, and maintaining the highest index of a \code{1} in each column (the
\code{low}). For each column we look at the column to the left of it, and if
two columns have the same \code{low}, we subtract the leftmost from the
rightmost column. The exhausitve version differs here in that it looks through
the indices \code{i} of all \code{1}s of the current column, and adds any
column \code{j} that has \code{low(j) = i}.