title: Aho-Corasick and Proper Substrings
body: <p>I'm trying to understand the aho-corasick string match algorithm. Suppose that our patterns are <code>abcd</code> and <code>bc</code>. We end up a tree like this</p>
  
  <pre><code>       []
         /\
      [a]..[b]
      /  :  |
     [b].: [c]
      |     :
     [c].....
      |
     [d]
  </code></pre>
  
  <p>The dotted line show the failure function.</p>
  
  <p>Now supposed that we feed in the string <code>abcd</code>. This will follow the tree and detect the match "abcd," however, as far as I can tell the match <code>bc</code> will not be reported. Am I misunderstanding the algorithm?</p>