Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am teaching discrete math for computer science majors and I want some good examples of how mathematical induction is used to prove program correctness.

I have lots of experience with math induction but no experience with proofs of correctness so a few simple then harder examples would be nice.

Also, if you know any resources (books or papers) that talk about this that would be great.

share|cite|improve this question
Guys on another site or rather this may have more idea. – 007resu Jan 14 '13 at 20:13
@Freddy, real programmers do no stinkin' proofs... Look for the books by Gries "A science of programming" or so. Dijkstra did prove most of his programs, but used a higly idiosincratic language and style. Be advised that this is hard going! – vonbrand Jan 23 '13 at 2:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.