Algorithms for exact solution of systems of linear equations with polynomial coefficients