Binary Matrix Inversion:
the inverse of the companion matrix

First posted
Friday August 6, 2010 09:55
Updated
Tuesday August 24, 2010 06:40

GFSR initialization.

Subabstract

Computation trick for evaluation of ba power using a = a020 + a121 +a222 + ... an-12n-1 where ai = 0 or 1 is used to compute any shift register psuedorandom number in only the order of n operations starting with an initial vector. Can the values of ai be analyticially computed from knowledge of the initial vector and any shift register psuedorandom number? We will see.

Lost in the super-universe theme song.
But I've wandered much further today than I should And I can't seem to find my way back to the Wood

So help me if you can I've got to get back ...

But we got back two different ways.

Pooh, too, can get back two ways. Directly, or back the other way around the world.

We both practically and theoretically got back to where we started using the binary representation of the exponent computation trick.

That means we can venture out into the super-universe, then algorithmically compute a matrix which can theoretically get us back. But can we practically invert that matrix? MAYBE!

We are gaining more insight into inverting a matrix of any power of a companion matrix. By reducing the problem to a combination of 0s and 1s, sorting, ANDing, and mod 2 summing.

Matrix C is the companion matrix.
       1 0 1  
C  = 1 0 0  
       0 1 0  

The inverse of C, C-1, is computed by forming the augmenting C by adding the identity matrix to the right then reducing C to the identity matrix using elementary row operations while performing the same operations on the identity matrix on the rightN1.

1 0 1 1 0 0                        1 0 0
1 0 0 0 1 0 pre-multiply by  1 1 0  
0 1 0 0 0 1                        0 0 1

1 0 1 1 0 0                        1 0 0
0 0 1 1 1 0 pre-multiply by  0 1 1  
0 1 0 0 0 1                        0 0 1

1 0 1 1 0 0                        1 0 0
0 1 1 1 1 1 pre-multiply by  0 1 0
0 1 0 0 0 1                        0 1 1

1 0 1 1 0 0                        1 0 1
0 1 1 1 1 1 pre-multiply by  0 1 0
0 0 1 1 1 0                        0 0 1

1 0 0 0 1 0                        1 0 0
0 1 1 1 1 1 pre-multiply by  0 1 1
0 0 1 1 1 0                        0 0 1

1 0 0 0 1 0                        1 0 0
0 1 0 0 0 1 pre-multiply by  0 1 1
0 0 1 1 1 0                        0 0 1

Thus

            0 1 0
C-1  =   0 0 1
            1 1 0 

And that is C6.

Test:

               1 0 1  0 1 0    1 0 0
C * C-1  = 1 0 0  0 0 1 = 0 1 0 = C1 * C-1 = C1 + -1= C0
               0 1 0  1 1 0    0 0 1

Commutative test

                0 1 0  1 0 1      1 0 0
C-1 * C1  = 0 0 1  1 0 0   = 0 1 0
                1 1 0  0 1 0       0 0 1 .

Six steps to compute the inverse can be replaced using the computation trick to compute C2x C4 = C6 since C23-1 = I

             1 1 1  1 1 0     0 1 0
C2 C4 = 1 0 1  0 1 1 =  0 0 1
             1 0 0  1 1 1     1 1 0

The above observation lead to the generality that the inverse of a power of a companion matrix is as easy to compute as any power using the exponent binary exponent computational trick as the power of the matrix.

Let's look at the pseudorandom sequence produced by powers of the inverse companion matrix, C-1, for patterns while copying C-1 to the right to make multiply computation check easy

          0 1 0  0 1 0
C-1  =  0 0 1  0 0 1
          1 1 0  1 1 0

          0 0 1  0 1 0
C-12 = 1 1 0  0 0 1
          0 1 1  1 1 0
 
          1 1 0  0 1 0
C-13 = 0 1 1  0 0 1
          1 1 1  1 1 0

          0 1 1  0 1 0
C-14 = 1 1 1  0 0 1        
          1 0 1  1 1 0

          1 1 1  0 1 0
C-15 = 1 0 1  0 0 1        
          1 0 0  1 1 0

          1 0 1  0 1 0
C-16 = 1 0 0  0 0 1        
          0 1 0  1 1 0

          1 0 0  0 1 0
C-17 = 0 1 0  0 0 1        
          0 0 1  1 1 0

          0 1 0  
C-18 = 0 0 1  =   C-1
          1 1 0  

Assign first row binary weight 1, second row 2, third row 4 to get the number sequence 4, 2, 5, 6, 7, 3, 1. This is the reverse direction of the sequence formed by computing from powers of C: 3, 7, 6, 5, 2, 4, 1.

Any pseudonoise column vector can be computed Ca where a = a020 + a121 +a222 + ... an-12n-1 times the initial column vector

     1       c0
     0       c1
     .        .
Ca  . =     .
     .        .
     0       cn

to some power even for superastronomical number a using the binary expansion of a computation trick.

Can we analyticallyN1 find a = a020 + a121 +a222 + ... an-12n-1 where

     c0       1
     c1       0
     .         .
Ca  .     =  .
     .         .
     cn       0 ?
C0

Argument of why a matrix raised to the zeroth power is the identity matrix is given by WolframL3.


Verification, other than the inverse, example is

              0 1 0  1 1 1     1 0 0
C5 C-15 = 0 1 1  1 0 0 =  0 1 0 = C5 C-5 = C0
              1 0 1  1 1 0     0 0 1

C or I? example
For C, the companion matrix,
      1 1 0
C = 0 0 1
      1 0 0

goal is to compute a0, a1, and a2for any c0, c1, and c2 [not all zero]

1 1 0 22a2 + 2a1 + a0  1     c0
0 0 1                     0 = c1
1 0 0                     0    c2

This is equivalent to

1 1 0 22a2 1 1 02a1  1 1 0 a0    1     c0
0 0 1        0 0 1      0 0 1       0 = c1
1 0 0        1 0 0      1 0 0       0    c2
Is a0 = 0 which means C = I or is a0 = 1 or C?

a1 and a2 can be either zero or one so do we have to try all combinations? Or is there a shorter computation method?

Column Vector Expansion to Power of Companion Matrix

The initial column and target vector can be expressed as a power of either matrix C or C-1.

A pattern emerges between columns.



For example, a power of the companion matrix can be developed starting with the column vector of C3. ? indicates value unknown.
       0 ? ?
C3 = 1 ? ?
       1 ? ?

       1 ? 0  
C4 = 0 ? 1  
       1 ? 1  

       0 0 1  
C5 = 1 1 0  
       0 1 1  
Multiplication of C5 by C-1 determines the ? values for C4 and C3.

We can practically invert, even large matrices, using the binary exponent computational trick.

Computation complexity of matrix inversionL7 is


on the order of n3. But we've avoided this for 2i powers of companion matrices.


The computation complexity is on the order of the number of bits in the exponent.

Interchanging rows to help find Inverse of Companion Matrix

Goal is to try to eliminate work to find the companion matrix inverse using the algorithm described in note N1.

Conjecture is that the amount of work may be related to the power the companion matrix was raised.

Elementary matrix operations can be used to interchange rows in a power of a companion matrix and associated identity augmentation.

For example,
 
 0 0 1          0 0 1   0 1 0  1 0 0       1 1 0  0 0 1
 1 0 0   C6 = 1 0 0   0 0 1  0 1 0  =   0 1 0  1 0 0     
 0 1 0          0 1 0   1 1 0  0 0 1        0 0 1  0 1 0

which means that the above two right matrices only need to be multiplied by

1 1 0
0 1 0
0 0 1

to get

1 0 0  1 0 1
0 1 0  0 1 0 = C1
0 0 1  0 0 1

which is the inverse of C6.

Likewise C1 abd the identify matrixcan be multiplied by

1 0 1
0 1 0
0 0 1

to get

1 0 1  1 0 0
0 1 0  0 1 0 = C6
0 0 1  0 0 1

So sorting first using column 1 as the sort key, then zeroing 1 value entries in rows 2 and 3 by muliplication the appropriate elmentary matrix leads to an algorithm that efficiently reduces the power of a companion matrix to all zeros below the main diagonal which contains all ones.

Implicit Matrix Multiplication


Row exchanges, which can be used for sorting, and ANDing rows of a companion matrix and associated identity matrix is used instead of explicit matrix multiplies which are computationally operation-consuming.
LogarithmsL1

Common logarithms are defined to the base 10.

log10 x = 10x

Thus

log10 10 = 1

since

101 = 10 or x = 1

And

log10 100 = log10 102 = 2

since

102 = 100 or x = 1 .

Logarithm of a binary companion matrixL2 is now defined as

logC x = Cx

Thus

logC C = 1

since

C1 = C or x = 1 .

And

logC C*C = logC C2 = 2

since

C*C = C2 or x = 2 .


Notes

N1 Analytic solution is compared to searching. Powers of C or C-1 can be computed to search for a solution. But this doesn't work or large or super-astronomical numbers.


Links

L1 Logarithm
http://en.wikipedia.org/wiki/Logarithm

L2 Logarithm of a matrix
http://en.wikipedia.org/wiki/Logarithm_of_a_matrix

L3 Matrix to the zero power.

L4 Methods of matrix inversion
http://en.wikipedia.org/wiki/Invertible_matrix

L5 LU Decomposition
http://mathworld.wolfram.com/LUDecomposition.html

L6 Binary matrix (Java)
http://en.literateprograms.org/Binary_matrix_(Java)

L7 Computational complexity of mathematical operations
http://en.wikipedia.org/wiki/Computational_complexity_of_mathematical_operations


Notes
N1 Denote the elementary pre-multiplication matrices Ei. Then the product of all of the Eis times the matrix to be inverted is the identity matrix. Correspondingly, the product times the identity matrix is the inverse.


Revision History
Revision Symbol

0
Date

f 08/06/10
Reason

Initial draft started
 

This page is formatted with CSS by second author for first author.