Doubt in Aho Corasick algorithm

Revision en1, by teja349, 2016-12-14 12:42:54

Assume there are 2 patterns P1 and P2 such that P1 is a substring of P2 which is nether prefix nor suffix.Then how does a KMP type on string T work Eg: P1=of P2=sofa T=sofa in this if we run aho corasick .will it detect string "of" or not

And also any good tutorial link on it will be apreciated PS:I havent implemented it yet.I was studying it and I got this doubt as I read about its implementation

Tags aho-corasick

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English teja349 2016-12-14 12:43:57 36
en1 English teja349 2016-12-14 12:42:54 441 Initial revision (published)