A new a priori ordering method for sparse systems of equations based on an ordered output set