By virtue of the suggestion in my previous question, I constructed the sparse matrix whose size is $518400 \times 86400$, mostly filled with $0$ and $\pm 1$. Now I want to calculate its rank.
Since RowReduce
requires a huge amount of memory to fill in $0$s, my first approach was to divide the matrix into many parts, e.g., each containing 144 rows ($144\times 86400$).
Module[{i, part, rank},
For [i = 0, 144 (i + 1) <= 518400, i++,
part = RowReduce[input[[144*i + 1 ;; 144 (i + 1)]]];
rank = MatrixRank[part];
If[i == 0, result = part[[1 ;; rank]],
result = Join[result, part[[1 ;; rank]]]]
];
]
Unfortunately, this does not work because all rows in each part are linearly independent so that the number of rows does not decrease.
Does anyone have such an experience? Should I export the matrix to the file and calculate its rank via other language / packages? If so, any suggestion?