The paper provides a fully self-contained derivation of fast
algorithms to compute discrete Cosine and Sine transforms I - II
based on the concept of the comrade matrix. The comrade matrices
associated with different versions of the transforms differ in
only a few boundary elements; hence, in each case algorithms can
be derived in a unified manner.