## ~mht/cra

ref: 933b27350404d77d37a8f2b73e9ae8bc2139e4a5 cra/algos.tex -rw-r--r-- 543 bytes
933b2735 — Martin Hafskjold Thoresen Fix warnings and remove some dead code 10 months ago

1
2
3
4
5
6
7
8
9
10
\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}.