Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
science, the Method of Four Russians is a technique for speeding up
algorithms involving Boolean matrices, or more generally algorithms
involving matrices in which each cell may take on only a bounded number
of possible values. The main idea of the method is to partition the
matrix into small square blocks of size t × t for some parameter t, and
to use a lookup table to perform the algorithm quickly within each
block. The index into the lookup table encodes the values of the matrix
cells on the block boundary prior to some operation of the algorithm,
and the result of the lookup table encodes the values of the boundary
cells after the operation.