patternMinor
Counting solutions to system of linear equations modulo prime
Viewed 0 times
linearcountingequationssystemsolutionsprimemodulo
Problem
I have implemented Gaussian elimination for solving system of linear equations in the field of modulo prime remainders. If there is a pivot equal to zero I assume the system has no solution but how to calculate number of solutions of such systems when all pivots are non-zero? (i.e. one and more solutions)
Solution
The integers modulo a prime form a field, so all assumptions done applying Gaussian eliminations work exactly the same. Luckily, there are no numerical instability problems. The system can be inconsistent (no solutions), underdetermined (several solutions modulo $p$) or have a unique solution modulo $p$.
Context
StackExchange Computer Science Q#10567, answer score: 2
Revisions (0)
No revisions yet.