Walsh permutation; inversions





Stripes
Among the n-bit Walsh permutations are 2n with striped inversion sets. As seen below they correspond to Walsh functions, i.e. the rows of the Walsh matrix of order 2n. These permutations under composition form the group Z2n, just like the row numbers under bitwise XOR.

3-bit
An extract of the table of 3-bit Walsh permutations: Sorting by Permutation gives the (0,4,2,6, 1,5,3,7) in the left column, which is the bit-reversal permutation wp(4,2,1).

4-bit


Sorting by Permutation gives the (0,8,4,12, 2,10,6,14, 1,9,5,13, 3,11,7,15) in the left column, which is the bit-reversal permutation wp( 8, 4, 2, 1).

Compression matrices
 The CM of the n-th permutation is a matrix B with horizontal stripes for the binary digits of n (gray lines in the image), XORed with a modified unity matrix U (black dots in the image). U is modified by including an empty row where n has its lowest binary digit. It pushes the other rows of the unity matrix down, and the last row "out of the matrix".

Bended stripes
Among the n-bit Walsh permutations are 2n-1 whose inversion sets show bended stripes. They correspond to Walsh functions, i.e. the rows of the Walsh matrix of order 2n-1. These permutations under composition form the group Z2n-1, just like the row numbers under bitwise XOR.

3-bit
Sorting by # or Permutation gives (0,2,1,3) in the left column, which is the bit-reversal permutation wp(2,1). Sorting by CV gives (0,3,1,2) in the left column, which is wp(3,1).

4-bit
Sorting by # or Permutation gives (0,4,2,6, 1,5,3,7) in the left column, which is the bit-reversal permutation wp(4,2,1). Sorting by CV gives (0,3,5,6, 1,2,4,7) in the left column, which is wp(7,1,2).

Compression matrices
 The CM are matrices with an even number of horizontal stripes (gray lines in the image) XORed with the unity matrix (black dots in the image). The order by the evil numbers of the matrices, used in the image, corresponds to the lexicographical order of the compression vectors.

Bit permutations
The inversion sets in the table below have a common property that is not easily seen with this layout of the triangles: They are symmetric to the diagonal that starts in the top right corner. (So all columns are symmetrical.) This is also the case for all complemented bit permutations (with compression vectors that are permutations of (14,13,11, 7)).

Nimber multiplication
Images: