General Outline
The main goal of this assignment is to compute the determinant
of a matrix. Here the computations are not done in the integers
itself, but in the ring modulo some fixed number. If this number
is 92, then addition, substraction and multiplication have arguments
and results in the set {0,1,2,...,90,91} and work as the following
examples show:
5 + 8 == 13
22 + 8 == 30
90 + 8 == 6
4 - 3 == 1
4 - 6 == 90
8 - 9 == 91
16 * 4 == 64
16 * 6 == 4
32 * 6 == 8
23 * 8 == 0
The task is now to compute in this modified arithmetic the
determinant of a matrix. Although there is a complicated
polynomial to compute the determinant directly, this polynomial
is very large and therefore mathematicians do other methods
to compute it: They transform the
matrix with operations which preserve the determinant until
the lower triangle of the matrix below the diagonal consists
entirely of zeros. Then the determinant is just the product
of the elements in the diagonal. The goal of this assignment
is to program this for some randomly chosen matrix and then
to display this new matrix. So a sample output of the correct
program would be the following.
Computing the determinant.
Computations modulo 92; the matrix has size 11 times 11.
The solution is 69.
Printing the matrix.
57 34 85 56 8 69 87 67 80 88 51
20 40 48 80 57 88 50 18 76 60 89
57 73 10 7 11 41 55 36 2 80 32
43 64 11 41 11 42 35 67 26 12 72
48 17 64 88 14 32 32 0 88 16 8
58 12 80 55 5 6 34 5 1 29 12
46 53 68 43 52 50 65 83 6 76 49
86 18 54 70 75 78 30 73 56 44 72
30 26 22 8 24 1 14 43 15 46 69
74 65 65 11 10 69 70 63 52 15 50
25 55 53 50 13 35 37 9 65 83 75
Printing the matrix.
1 66 65 68 19 33 17 21 68 28 38
0 1 87 41 70 60 10 61 26 48 16
0 0 1 22 77 9 68 57 24 72 13
0 0 0 1 23 59 78 26 74 28 23
0 0 0 0 1 32 78 46 84 64 77
0 0 0 0 0 1 24 70 53 23 78
0 0 0 0 0 0 1 67 9 83 85
0 0 0 0 0 0 0 1 48 47 91
0 0 0 0 0 0 0 0 1 75 0
0 0 0 0 0 0 0 0 0 3 19
0 0 0 0 0 0 0 0 0 0 23
The determinant is 69.
What is missing in the given assignment is the
routine to transform the matrix and this should
be programmed. Further information
on matrices are found on the page of the dictionary
Wikipedia