Linear complementarity, linear and nonlinear programming