What does "Contribution to Knowledge" mean?
Contribution to knowledge means creating new knowledge based on the previous available knowledge by doing extensive and innovative research.
Look up this related illustrative post by Matt Might on what is a PhD.
And for the said MS student, he should get his degree without any problem, because he showed a new & original application of the CS algorithm in a new field. Hence, new knowledge generated.
I think of a contribution to knowledge as being a body of work that could be published as a journal article.
Finding a new and good way to solve a problem in the field of interest is definitely counts as a contribution. What makes it as an official contribution is publishing it and making it visible to the peers.