ๆญฃๅœจๅŠ ่ฝฝๅ›พ็‰‡...
text T a b a b a a b a b a 5=3 pattern P b a a Algorithm Preprocessing time Matching time Naive 0 O(n-m+1)m) Rabin-Karp โŠ™(m) O(n-m+1)m) Finite automaton O(mโˆ‘) ©(n) Knuth-Morris-Pratt ฮ˜(1m) ฮ˜(n) n:the length of text T m:the length of pattern the alphabet set,consisiting ofall possible characters๐‘›:๐‘กโ„Ž๐‘’ ๐‘™๐‘’๐‘›๐‘”๐‘กโ„Ž ๐‘œ๐‘“ ๐‘ก๐‘’๐‘ฅ๐‘ก ๐‘‡ ๐‘š:๐‘กโ„Ž๐‘’ ๐‘™๐‘’๐‘›๐‘”๐‘กโ„Ž ๐‘œ๐‘“ ๐‘๐‘Ž๐‘ก๐‘ก๐‘’๐‘Ÿ๐‘› ๐›ด:the alphabet set , consisiting of all possible characters
<<ๅ‘ไธŠ็ฟป้กตๅ‘ไธ‹็ฟป้กต>>
©2008-็Žฐๅœจ cucdc.com ้ซ˜็ญ‰ๆ•™่‚ฒ่ต„่ฎฏ็ฝ‘ ็‰ˆๆƒๆ‰€ๆœ‰