1
$\begingroup$

If an operation in Mathematica (say, computing the determinant of a $88\times88$ parametric matrix) takes much time to be computed on a personal computer (core i7), say a week, then, is there any hope that using a supercomputer get the result faster? Is this running time related to Mathematica's limitation or the computer we are running Mathematica on it?

My matrix $M$ is sparse and ArrayRules[SparseArray[M]] is as follows. Can someone please make comment on how I can ask Mathematica to compute its determinant faster?

sp:={{1, 1} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {1, 
   2} -> -E^(((I x)/2)) + E^((I x)/2) x, {1, 3} -> 1 - x, {1, 4} -> 
  1 + x, {2, 3} -> -1 - x, {2, 4} -> -1 + x, {2, 5} -> 
  1 + x, {2, 6} -> 
  1 - x, {3, 5} -> -1 + x, {3, 6} -> -1 - x, {3, 7} -> 
  1 + x, {3, 8} -> 1 - x, {4, 1} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {4, 2} -> 
  E^((I x)/2) + E^((I x)/2) x, {4, 7} -> -1 + x, {4, 8} -> -1 - x, {5,
    9} -> -E^(((I x)/2)) + E^((I x)/2) x, {5, 10} -> -E^(-((I x)/2)) -
    E^(-((I x)/2)) x, {5, 11} -> 1 + x, {5, 12} -> 
  1 - x, {6, 11} -> -1 + x, {6, 12} -> -1 - x, {6, 13} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {6, 14} -> 
  E^((I x)/2) + E^((I x)/2) x, {7, 13} -> -E^(-((I x)/2)) - 
   E^(-((I x)/2)) x, {7, 14} -> -E^(((I x)/2)) + E^((I x)/2) x, {7, 
   15} -> 1 - x, {7, 16} -> 1 + x, {8, 9} -> 
  E^((I x)/2) + E^((I x)/2) x, {8, 10} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {8, 15} -> -1 - x, {8, 
   16} -> -1 + x, {9, 17} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {9, 
   18} -> -E^(((I x)/2)) + E^((I x)/2) x, {9, 19} -> 1 - x, {9, 20} ->
   1 + x, {10, 19} -> -1 - x, {10, 20} -> -1 + x, {10, 21} -> 
  E^((I x)/2) + E^((I x)/2) x, {10, 22} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {11, 21} -> -E^(((I x)/2)) + 
   E^((I x)/2) x, {11, 22} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {11,
    23} -> 1 + x, {11, 24} -> 1 - x, {12, 17} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {12, 18} -> 
  E^((I x)/2) + E^((I x)/2) x, {12, 23} -> -1 + x, {12, 24} -> -1 - 
   x, {13, 25} -> -E^(((I x)/2)) + E^((I x)/2) x, {13, 
   26} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {13, 27} -> 
  1 + x, {13, 28} -> 
  1 - x, {14, 27} -> -1 + x, {14, 28} -> -1 - x, {14, 29} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {14, 30} -> 
  E^((I x)/2) + E^((I x)/2) x, {15, 29} -> -E^(-((I x)/2)) - 
   E^(-((I x)/2)) x, {15, 30} -> -E^(((I x)/2)) + E^((I x)/2) x, {15, 
   31} -> 1 - x, {15, 32} -> 1 + x, {16, 25} -> 
  E^((I x)/2) + E^((I x)/2) x, {16, 26} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {16, 31} -> -1 - x, {16, 
   32} -> -1 + x, {17, 33} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {17,
    34} -> -E^(((I x)/2)) + E^((I x)/2) x, {17, 35} -> 
  1 - x, {17, 36} -> 
  1 + x, {18, 35} -> -1 - x, {18, 36} -> -1 + x, {18, 37} -> 
  E^((I x)/2) + E^((I x)/2) x, {18, 38} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {19, 37} -> -E^(((I x)/2)) + 
   E^((I x)/2) x, {19, 38} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {19,
    39} -> 1 + x, {19, 40} -> 1 - x, {20, 33} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {20, 34} -> 
  E^((I x)/2) + E^((I x)/2) x, {20, 39} -> -1 + x, {20, 40} -> -1 - 
   x, {21, 41} -> -E^(((I x)/2)) + E^((I x)/2) x, {21, 
   42} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {21, 43} -> 
  1 + x, {21, 44} -> 
  1 - x, {22, 43} -> -1 + x, {22, 44} -> -1 - x, {22, 45} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {22, 46} -> 
  E^((I x)/2) + E^((I x)/2) x, {23, 45} -> -E^(-((I x)/2)) - 
   E^(-((I x)/2)) x, {23, 46} -> -E^(((I x)/2)) + E^((I x)/2) x, {23, 
   47} -> 1 - x, {23, 48} -> 1 + x, {24, 41} -> 
  E^((I x)/2) + E^((I x)/2) x, {24, 42} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {24, 47} -> -1 - x, {24, 
   48} -> -1 + x, {25, 49} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {25,
    50} -> -E^(((I x)/2)) + E^((I x)/2) x, {25, 51} -> 
  1 - x, {25, 52} -> 
  1 + x, {26, 51} -> -1 - x, {26, 52} -> -1 + x, {26, 53} -> 
  E^((I x)/2) + E^((I x)/2) x, {26, 54} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {27, 53} -> -E^(((I x)/2)) + 
   E^((I x)/2) x, {27, 54} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {27,
    55} -> 1 + x, {27, 56} -> 1 - x, {28, 49} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {28, 50} -> 
  E^((I x)/2) + E^((I x)/2) x, {28, 55} -> -1 + x, {28, 56} -> -1 - 
   x, {29, 65} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {29, 
   66} -> -E^(((I x)/2)) + E^((I x)/2) x, {29, 67} -> 
  1 - x, {29, 68} -> 
  1 + x, {30, 67} -> -1 - x, {30, 68} -> -1 + x, {30, 69} -> 
  E^((I x)/2) + E^((I x)/2) x, {30, 70} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {31, 69} -> -E^(((I x)/2)) + 
   E^((I x)/2) x, {31, 70} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {31,
    71} -> 1 + x, {31, 72} -> 1 - x, {32, 65} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {32, 66} -> 
  E^((I x)/2) + E^((I x)/2) x, {32, 71} -> -1 + x, {32, 72} -> -1 - 
   x, {33, 81} -> -1 - x, {33, 82} -> -1 + x, {33, 83} -> 
  1 - x, {33, 84} -> 
  1 + x, {34, 83} -> -1 - x, {34, 84} -> -1 + x, {34, 85} -> 
  E^((I x)/2) + E^((I x)/2) x, {34, 86} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {35, 85} -> -E^(((I x)/2)) + 
   E^((I x)/2) x, {35, 86} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {35,
    87} -> 1 + x, {35, 88} -> 1 - x, {36, 81} -> 1 - x, {36, 82} -> 
  1 + x, {36, 87} -> -1 + x, {36, 88} -> -1 - x, {37, 
   57} -> -E^(((I x)/2)) + E^((I x)/2) x, {37, 
   58} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {37, 59} -> 
  1 + x, {37, 60} -> 
  1 - x, {38, 59} -> -1 + x, {38, 60} -> -1 - x, {38, 61} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {38, 62} -> 
  E^((I x)/2) + E^((I x)/2) x, {39, 61} -> -E^(-((I x)/2)) - 
   E^(-((I x)/2)) x, {39, 62} -> -E^(((I x)/2)) + E^((I x)/2) x, {39, 
   63} -> 1 - x, {39, 64} -> 1 + x, {40, 57} -> 
  E^((I x)/2) + E^((I x)/2) x, {40, 58} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {40, 63} -> -1 - x, {40, 
   64} -> -1 + x, {41, 73} -> -E^(((I x)/2)) + E^((I x)/2) x, {41, 
   74} -> -E^(-((I x)/2)) - E^(-((I x)/2)) x, {41, 75} -> 
  1 + x, {41, 76} -> 
  1 - x, {42, 75} -> -1 + x, {42, 76} -> -1 - x, {42, 77} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {42, 78} -> 
  E^((I x)/2) + E^((I x)/2) x, {43, 77} -> -E^(-((I x)/2)) - 
   E^(-((I x)/2)) x, {43, 78} -> -E^(((I x)/2)) + E^((I x)/2) x, {43, 
   79} -> 1 - x, {43, 80} -> 1 + x, {44, 73} -> 
  E^((I x)/2) + E^((I x)/2) x, {44, 74} -> 
  E^(-((I x)/2)) - E^(-((I x)/2)) x, {44, 79} -> -1 - x, {44, 
   80} -> -1 + x, {45, 65} -> 1, {45, 66} -> 
  1, {45, 73} -> -1, {45, 74} -> -1, {46, 65} -> 
  I x, {46, 66} -> -I x, {46, 73} -> -I x, {46, 74} -> 
  I x, {47, 49} -> 1, {47, 50} -> 
  1, {47, 57} -> -1, {47, 58} -> -1, {48, 49} -> 
  I x, {48, 50} -> -I x, {48, 57} -> -I x, {48, 58} -> 
  I x, {49, 61} -> -1, {49, 62} -> -1, {49, 69} -> 1, {49, 70} -> 
  1, {50, 61} -> -I x, {50, 62} -> I x, {50, 69} -> 
  I x, {50, 70} -> -I x, {51, 1} -> 1, {51, 2} -> 
  1, {51, 9} -> -1, {51, 10} -> -1, {52, 1} -> 
  I x, {52, 2} -> -I x, {52, 9} -> -I x, {52, 10} -> 
  I x, {53, 13} -> -1, {53, 14} -> -1, {53, 21} -> 1, {53, 22} -> 
  1, {54, 13} -> -I x, {54, 14} -> I x, {54, 21} -> 
  I x, {54, 22} -> -I x, {55, 17} -> 1, {55, 18} -> 
  1, {55, 25} -> -1, {55, 26} -> -1, {56, 17} -> 
  I x, {56, 18} -> -I x, {56, 25} -> -I x, {56, 26} -> 
  I x, {57, 33} -> 1, {57, 34} -> 
  1, {57, 41} -> -1, {57, 42} -> -1, {58, 33} -> 
  I x, {58, 34} -> -I x, {58, 41} -> -I x, {58, 42} -> 
  I x, {59, 45} -> 1, {59, 46} -> 
  1, {59, 53} -> -1, {59, 54} -> -1, {60, 45} -> 
  I x, {60, 46} -> -I x, {60, 53} -> -I x, {60, 54} -> 
  I x, {61, 29} -> -1, {61, 30} -> -1, {61, 37} -> 1, {61, 38} -> 
  1, {62, 29} -> -I x, {62, 30} -> I x, {62, 37} -> 
  I x, {62, 38} -> -I x, {63, 77} -> 1, {63, 78} -> 
  1, {63, 85} -> -1, {63, 86} -> -1, {64, 77} -> 
  I x, {64, 78} -> -I x, {64, 85} -> -I x, {64, 86} -> 
  I x, {65, 5} -> -E^(I t - (I x)/2), {65, 6} -> -E^(
   I t + (I x)/2), {65, 81} -> E^((I x)/2), {65, 82} -> 
  E^(-((I x)/2)), {66, 5} -> -I E^(I t - (I x)/2) x, {66, 6} -> 
  I E^(I t + (I x)/2) x, {66, 81} -> 
  I E^((I x)/2) x, {66, 82} -> -I E^(-((I x)/2)) x, {67, 67} -> 
  E^((9 I d \[Pi])/11 + (I x)/2), {67, 68} -> 
  E^((9 I d \[Pi])/11 - (I x)/2), {67, 71} -> -E^(
   I b - (9 I d \[Pi])/11 - (I x)/2), {67, 72} -> -E^(
   I b - (9 I d \[Pi])/11 + (I x)/2), {68, 67} -> 
  I E^((9 I d \[Pi])/11 + (I x)/2) x, {68, 
   68} -> -I E^((9 I d \[Pi])/11 - (I x)/2) x, {68, 71} -> -I E^(
   I b - (9 I d \[Pi])/11 - (I x)/2) x, {68, 72} -> 
  I E^(I b - (9 I d \[Pi])/11 + (I x)/2) x, {69, 83} -> E^(
  I d \[Pi] + (I x)/2), {69, 84} -> E^(
  I d \[Pi] - (I x)/2), {69, 87} -> -E^(
   I b - I d \[Pi] - (I x)/2), {69, 88} -> -E^(
   I b - I d \[Pi] + (I x)/2), {70, 83} -> 
  I E^(I d \[Pi] + (I x)/2) x, {70, 84} -> -I E^(
   I d \[Pi] - (I x)/2) x, {70, 87} -> -I E^(
   I b - I d \[Pi] - (I x)/2) x, {70, 88} -> 
  I E^(I b - I d \[Pi] + (I x)/2) x, {71, 3} -> 
  E^((I d \[Pi])/11 + (I x)/2), {71, 4} -> 
  E^((I d \[Pi])/11 - (I x)/2), {71, 7} -> -E^(
   I b - (I d \[Pi])/11 - (I x)/2), {71, 8} -> -E^(
   I b - (I d \[Pi])/11 + (I x)/2), {72, 3} -> 
  I E^((I d \[Pi])/11 + (I x)/2) x, {72, 
   4} -> -I E^((I d \[Pi])/11 - (I x)/2) x, {72, 7} -> -I E^(
   I b - (I d \[Pi])/11 - (I x)/2) x, {72, 8} -> 
  I E^(I b - (I d \[Pi])/11 + (I x)/2) x, {73, 11} -> -E^(
   I b - (2 I d \[Pi])/11 - (I x)/2), {73, 12} -> -E^(
   I b - (2 I d \[Pi])/11 + (I x)/2), {73, 15} -> 
  E^((2 I d \[Pi])/11 + (I x)/2), {73, 16} -> 
  E^((2 I d \[Pi])/11 - (I x)/2), {74, 11} -> -I E^(
   I b - (2 I d \[Pi])/11 - (I x)/2) x, {74, 12} -> 
  I E^(I b - (2 I d \[Pi])/11 + (I x)/2) x, {74, 15} -> 
  I E^((2 I d \[Pi])/11 + (I x)/2) x, {74, 
   16} -> -I E^((2 I d \[Pi])/11 - (I x)/2) x, {75, 19} -> 
  E^((3 I d \[Pi])/11 + (I x)/2), {75, 20} -> 
  E^((3 I d \[Pi])/11 - (I x)/2), {75, 23} -> -E^(
   I b - (3 I d \[Pi])/11 - (I x)/2), {75, 24} -> -E^(
   I b - (3 I d \[Pi])/11 + (I x)/2), {76, 19} -> 
  I E^((3 I d \[Pi])/11 + (I x)/2) x, {76, 
   20} -> -I E^((3 I d \[Pi])/11 - (I x)/2) x, {76, 23} -> -I E^(
   I b - (3 I d \[Pi])/11 - (I x)/2) x, {76, 24} -> 
  I E^(I b - (3 I d \[Pi])/11 + (I x)/2) x, {77, 27} -> -E^(
   I b - (4 I d \[Pi])/11 - (I x)/2), {77, 28} -> -E^(
   I b - (4 I d \[Pi])/11 + (I x)/2), {77, 31} -> 
  E^((4 I d \[Pi])/11 + (I x)/2), {77, 32} -> 
  E^((4 I d \[Pi])/11 - (I x)/2), {78, 27} -> -I E^(
   I b - (4 I d \[Pi])/11 - (I x)/2) x, {78, 28} -> 
  I E^(I b - (4 I d \[Pi])/11 + (I x)/2) x, {78, 31} -> 
  I E^((4 I d \[Pi])/11 + (I x)/2) x, {78, 
   32} -> -I E^((4 I d \[Pi])/11 - (I x)/2) x, {79, 35} -> 
  E^((5 I d \[Pi])/11 + (I x)/2), {79, 36} -> 
  E^((5 I d \[Pi])/11 - (I x)/2), {79, 39} -> -E^(
   I b - (5 I d \[Pi])/11 - (I x)/2), {79, 40} -> -E^(
   I b - (5 I d \[Pi])/11 + (I x)/2), {80, 35} -> 
  I E^((5 I d \[Pi])/11 + (I x)/2) x, {80, 
   36} -> -I E^((5 I d \[Pi])/11 - (I x)/2) x, {80, 39} -> -I E^(
   I b - (5 I d \[Pi])/11 - (I x)/2) x, {80, 40} -> 
  I E^(I b - (5 I d \[Pi])/11 + (I x)/2) x, {81, 43} -> -E^(
   I b - (6 I d \[Pi])/11 - (I x)/2), {81, 44} -> -E^(
   I b - (6 I d \[Pi])/11 + (I x)/2), {81, 47} -> 
  E^((6 I d \[Pi])/11 + (I x)/2), {81, 48} -> 
  E^((6 I d \[Pi])/11 - (I x)/2), {82, 43} -> -I E^(
   I b - (6 I d \[Pi])/11 - (I x)/2) x, {82, 44} -> 
  I E^(I b - (6 I d \[Pi])/11 + (I x)/2) x, {82, 47} -> 
  I E^((6 I d \[Pi])/11 + (I x)/2) x, {82, 
   48} -> -I E^((6 I d \[Pi])/11 - (I x)/2) x, {83, 51} -> 
  E^((7 I d \[Pi])/11 + (I x)/2), {83, 52} -> 
  E^((7 I d \[Pi])/11 - (I x)/2), {83, 55} -> -E^(
   I b - (7 I d \[Pi])/11 - (I x)/2), {83, 56} -> -E^(
   I b - (7 I d \[Pi])/11 + (I x)/2), {84, 51} -> 
  I E^((7 I d \[Pi])/11 + (I x)/2) x, {84, 
   52} -> -I E^((7 I d \[Pi])/11 - (I x)/2) x, {84, 55} -> -I E^(
   I b - (7 I d \[Pi])/11 - (I x)/2) x, {84, 56} -> 
  I E^(I b - (7 I d \[Pi])/11 + (I x)/2) x, {85, 59} -> -E^(
   I b - (8 I d \[Pi])/11 - (I x)/2), {85, 60} -> -E^(
   I b - (8 I d \[Pi])/11 + (I x)/2), {85, 63} -> 
  E^((8 I d \[Pi])/11 + (I x)/2), {85, 64} -> 
  E^((8 I d \[Pi])/11 - (I x)/2), {86, 59} -> -I E^(
   I b - (8 I d \[Pi])/11 - (I x)/2) x, {86, 60} -> 
  I E^(I b - (8 I d \[Pi])/11 + (I x)/2) x, {86, 63} -> 
  I E^((8 I d \[Pi])/11 + (I x)/2) x, {86, 
   64} -> -I E^((8 I d \[Pi])/11 - (I x)/2) x, {87, 75} -> -E^(
   I b - (10 I d \[Pi])/11 - (I x)/2), {87, 76} -> -E^(
   I b - (10 I d \[Pi])/11 + (I x)/2), {87, 79} -> 
  E^((10 I d \[Pi])/11 + (I x)/2), {87, 80} -> 
  E^((10 I d \[Pi])/11 - (I x)/2), {88, 75} -> -I E^(
   I b - (10 I d \[Pi])/11 - (I x)/2) x, {88, 76} -> 
  I E^(I b - (10 I d \[Pi])/11 + (I x)/2) x, {88, 79} -> 
  I E^((10 I d \[Pi])/11 + (I x)/2) x, {88, 
   80} -> -I E^((10 I d \[Pi])/11 - (I x)/2) x, {_, _} -> 0}
$\endgroup$
1
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – Kuba
    Commented Oct 24, 2022 at 6:52

1 Answer 1

3
$\begingroup$

It's not so much about a supercomputer but about using the right tools. As pointed out in the comments, a SparseMatrix should be significantly faster:

s=SparseArray[yourMatrix,{88,88}];
Det[s]
$\endgroup$
11
  • $\begingroup$ Thanks, then I should run this new command and see how long it will take to compute it. $\endgroup$
    – charmin
    Commented Oct 19, 2022 at 15:03
  • $\begingroup$ it gives error that the matrix is not square. $\endgroup$
    – charmin
    Commented Oct 19, 2022 at 15:13
  • 1
    $\begingroup$ @charmin, provide SparseArray the actual dimensions of your matrix: s = SparseArray[matrix, {88, 88}] $\endgroup$
    – Domen
    Commented Oct 19, 2022 at 15:40
  • 1
    $\begingroup$ You complained that Mathematica gives error that the matrix is not square. My comment is meant to solve this problem by explicitly making the matrix be square. $\endgroup$
    – Domen
    Commented Oct 19, 2022 at 15:59
  • 1
    $\begingroup$ @charmin can you upload the whole matrix somewhere? Maybe at pastebin $\endgroup$ Commented Oct 20, 2022 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.