Frictionless contact-detachment analysis: iterative linear complementarity and quadratic programming approaches