We give an explicit formula which describes the solution of the problem of the linear elastic string vibrating against a plane obstacle without loss of energy. This formula allows us to prove continuous dependence on the initial data; a regularity result in some bounded variation spaces is given. A numerical scheme is deduced from the explicit formula. Finally we prove the weak convergence of a subsequence of solutions of the penalized problem to a "weak" solution (i.e. one which does not necessarily conserve energy) of the problem with an obstacle when the obstacle is arbitrary; when the obstacle is plane, all the sequence strongly converges to the solution of the obstacle problem which conserves the energy.