Title: ??????????III (1) ????????
1??????????III(1) ????????
- ??? ??
- ???? ?????
- ????????????????
2????
- ?1? ????????
- ?2? ????????
- ?3? ???????????????????
- ?4? ??????????
- ?5? ?????????
- ?6? ????
- ?7? ???????
- ?8? ?????????
- ?9? ??????????
- ?10? ????
- ?11? RNA??????
- ?12? ???????????????
- ?13? ????????????????k?
- ?14? ?????????
3???????????
- ????
- ???????????????????????????????????
- ??????????????????????????????????????????????????
?????? - ??????????????????????????????????????????
- ????
- ??4??????6?
- ?????????????????
- ???(???5-8???11-12?)
- ?????????????????????????????????2007
- ???(?1?3?)
- Crochemore Rytter Jewels of Stringology, World
Scientific, 2002 - ??????????????????????????????
4??????????
5??????????(1)
- ??
- ???????
- ???????
- ??
- ????????? j
????????
6??????????(2)
?? ?????? O(mn) ??????? ????????m(n-m1)
???????????O(mn) ???
?????????O(mn)?????????????????
7Knuth-Morris-Pratt??????
8KMP?????? ????
- ???? ????????
- j2 ?????????????????????
- ? hi ???????? k (???? hi0)
9KMP?????? ??????
- ? hi ???????? k (???? hi0)
KMP?????? (??????)
??????????????????? j ??????
10KMP?????? ???
11KMP?????? ??
- ?? KMP??????(??????)??????? O(n)
- ??
- ???? () ???????????????
- j ?1???????i ?1???
- i?hi ?1???????i ??????1??
- i ????????????????
- ???O(n)???????????? O(n)
??????? ?????????(amortized analysis)
????????????????????????
12KMP?????? ??????
- ? hi ????
- ????????????
- ????????????????hi ??????
?? KMP??????????????? ??? O(mn) ?????
13Boyer-Moore ??????
14BM?????? ??????
- KMP?????????????1???????
- BM????????????????????????????????????????
?
???c ? d ????d ? P ??????????P ? d
?????????? ???????????????????????
P ?? c ???? T ?? a ??????P ????? a ??????????
15BM?????? ???
- ??????????????????? O(mn) ?????????
- ????? KMP ???????
- BM ???????????????? O((n/m) logkm) ?????(????k
????????????(??????))
16Aho-Corasick ??????
17????????????
- ??
- ???????
- ???????
- ??
- ????????? j
- KMP?BM? k ??? ? O(kn) ??
- Aho-Corasick ?????????O(mn) ??
?????????????????S(??????)??????
18Aho-Corasick ??????
- ????
- ?????????DFA(???????????)???
? W he, she, his, hers
?? ?????? f ?? ???? g
0 ??????? ???
19Aho-Corasick ?????? ???
W he, she, his, hers , T ushers
u s h e r
s 0 0 3 4
5 8 9
2
0 ??????????
20Aho-Corasick?????? ??????
O(n)??
W he, she, his, hers T ushers
21Aho-Corasick ?????? DFA???(1)
- ??????????????
- ?????? g ???
- ????????????? f ???
- ?????????? h ???(???????OK)
22Aho-Corasick ?????? DFA???(2)
O(m)??
?? Aho-Corasick??????? ????????????? O(mn) ?????
23???
- ???????? ???????
- KMP?????? ???????
- Boyer-Moore?????????????????
- Aho-Corasick???????????????
- ??
- ????????????????
- ??????????????????
- Aho-Corasick ?? O(log S)????????????????????????
?????????????????????? Dori Landau Inf. Proc.
Lett. 2006