Applications of Generalized Inverses to Programming, Games and Networks