# Fast Computation of Exact Sparse Determinants

 In:= X(*Sparse invertible integer matrix model, with density \ \[GreaterEqual] 2/d*) randomSparseIntegerMatrix[d_] := Block[{m = 500}, SparseArray[ Table[Rule[{RandomInteger[{1, d}], RandomInteger[{1, d}]}, RandomInteger[m]], {2 d}], {d, d}] + m*IdentityMatrix[d] ]
 In:= Xm9s = {0.6687, 1.291, 2.756, 5.199, 12.17, 17.43, 45.21}; m8s = {0.9033, 3.460, 10.21, 22.22, 46.47, 86.32, 114.9}; mpl16s = {1.562, 5.09, 11.53, 29.05, 67.54, 91.84, 182.4};
 In:= X(*Sparse invertible rational matrix model, with density \ \[GreaterEqual] 2/d*) randomSparseRationalMatrix[d_] := Block[{m = 500}, (SparseArray[ Table[Rule[{RandomInteger[{1, d}], RandomInteger[{1, d}]}, RandomInteger[m]], {2 d}], {d, d}] + m*IdentityMatrix[d])/ RandomInteger[{1, m}, {d, d}] ]
 In:= Xm9s = {0.2651, 1.169, 2.068, 4.522, 9.007, 12.55, 27.04}; m8s = {0.5771, 2.727, 6.995, 19.51, 38.37, 95.82, 113.9}; mpl16s = {10.33, 21.36, 42.5, 139.2, 211.1, 455.3, 910.};

#### Shown are timings for determinants of square integer sparse matrices. The experiment was performed on an Intel Xeon 3.07 GHz 64-bit Linux system, with a time limit of 3600 seconds. The number at the bottom tells how many times faster Mathematica 9 is than Maple 16. #### Shown are timings for determinants of sparse square rational matrices. 