Doubt in Aho Corasick algorithm

Правка en2, от teja349, 2016-12-14 12:43:57

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

Теги aho-corasick

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский teja349 2016-12-14 12:43:57 36
en1 Английский teja349 2016-12-14 12:42:54 441 Initial revision (published)