GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 9

Gaussian elimination operation count

Engineering Mathematics & Other Topics · Linear Algebra · Full GATE CSE 1998 paper

GATE 1998, Q9 5 marks · Descriptive
Report issue

Linear Algebra

Question 9, GATE 1998: Derive the number of operations to solve n linear equations in n unknowns by Gaussian elimination, counting one multiplication followed by an addition as one operation.
Tap to enlarge
Answer & solution

Answer: n(n−1)(2n+5)/6 paired multiply-add operations including RHS updates and back substitution; leading term n³/3. (no official key was published)

Assume a dense nonsingular system Ax=b, successful pivots, ordinary forward elimination followed by back substitution, and no work saved by special structure. Count an update u←u−m·v as one multiplication-addition pair. Divisions and pivot search/comparison are separate because the question's paired-operation definition does not explicitly include them.

At pivot k, for k=1,...,n−1, there are n−k rows below the pivot. Each needs n−k updates to its remaining coefficient entries and one update to its right-hand-side value. Thus this stage uses (n−k)(n−k+1) paired operations. Summing with j=n−k gives

E=Σ_(j=1)n−1 j(j+1)
= (n−1)n(2n−1)/6 + (n−1)n/2
= n(n−1)(n+1)/3.

In back substitution, solving row i subtracts the contributions from the n−i already known variables. This contributes B=Σ_(i=1)n(n−i)=n(n−1)/2 paired updates. Consequently

E+B=n(n−1)(2n+5)/6
   = n³/3+n²/2−5n/6.

For n=2 there are two elimination updates, one to the remaining coefficient and one to the right-hand side, followed by one back-substitution update: three in total, matching the formula. For n=1 there are no such pairs, although one division is still necessary.

The elimination multipliers require n(n−1)/2 divisions, and back substitution requires n more, totaling n(n+1)/2 divisions. If a convention counts each division as one extra operation, the combined count becomes (n³+3n²−n)/3. If only the coefficient-matrix elimination is requested, its pair count is Σj² rather than the full solve count. Actual floating-point operation counts often count multiplication and addition separately, producing leading cost 2n³/3. Under the printed paired-operation convention, the leading cost is n³/3, with the exact lower-order terms dependent on which phases and divisions are included.

Original paper, page 6