Robust implementation of Lemke's method for the linear complementarity problem

This note discusses techniques for implementing Lemke's algorithm for the linear complementarity problem in a numerically robust way as well as a method for recovering from loss of feasibility or singularity of the basis. This recovery method is valid for both positive semi-definite M matrices and those with positive principal minors. It also allows a user to start from an advanced basis for such problems.