The only constraint on n,m is that they should be strictly positive. So the algorithm is able to deal with under-constrained or over-constrained systems.