| |
| | Dr. Dobb's | Permutation Generation Using Matrices | July 22, 2001 |
 | | A "cyclic-permutation matrix" is an nxn matrix whose first row is a pivot permutation and whose ith row is obtained by a full-right rotate of the (i-1)th row for i=2,...,n. |
 | | The cyclic-permutation matrix can be created using full-left rotates, but the matrix will have to be created bottom up; that is, the pivot permutation is the nth row of the matrix, and for i=(n-1),...,1, the ith row is created by performing a full-left rotate on the (i+1)th row. |
 | | In the cyclic-permutation matrix, the primary diagonals or the secondary diagonals, depending on the direction of rotates used (primary for right and secondary for left), have the same number. |
| www.ddj.com /184409671 (1716 words) |
|