The Generalized Inverse in Network Analysis and Quadratic Error-Minimization Problems