This study deals with the development of a programming procedure for the analysis and design of general problems of elastic bodies in contact. The procedure utilizes a simplex-type algorithm. The technique is applied to Hertzian-type contacts, and contacts of beams on elastic foundations. The selection of initial separations in the latter case for the optimal load distribution is considered as an example for the design scheme. The technique gives an effective and relatively inexpensive means of treating this class of problems.