I have the following problem:
I have two binary matrices, that might look like this:
| 1 | 0 | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | | 0 | 1 | 0 | 0 | 0 | 0 |
a = | 0 | 0 | 0 | 1 | 1 | 0 | b = | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 1 | | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | | 0 | 0 | 0 | 0 | 0 | 1 |
Now i would like to find the row echelon form (not necesarily reduced row echelon form) of the matrix a, and then apply the same matrix operations on matrix b, which would result in something like this:
| 1 | 0 | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | | 0 | 1 | 0 | 0 | 0 | 0 |
a = | 0 | 0 | 1 | 0 | 0 | 0 | b = | 1 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 | 0 | | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 1 | 0 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | | 1 | 0 | 1 | 0 | 1 | 1 |
Using numpy to convert the first matrix to rref works great, except I have no way of knowing what row operations were performed, so I can't apply the same operations on the second matrix.
Now this is just an example, but the actual matrices are going to be 50.000x50.000 or larger, and not necessarily square. I tried implementing my own solution, but it's just way too slow. Is there something out there, that can do what I want, or do I have to try to optimize my own solution?
Thanks for the help
/Morten