title: What is the theory behind KMP pattern matching algorithm?
body: <p>What is the theoretical basis of KMP pattern-matching algorithm?</p>
  
  <p>I understand the algorithm itself, but, don't understand how did Knuth, Morris and Pratt invent this algorithm. </p>
  
  <p>Was there any mathematical proof?</p>
  
  <p>Can you give a link please?</p>