??????????III (1) ???????? - PowerPoint PPT Presentation

About This Presentation
Title:

??????????III (1) ????????

Description:

Knuth-Morris-Pratt KMP j=2 ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 24
Provided by: bicKyoto
Category:
Tags: iii

less

Transcript and Presenter's Notes

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)
  • ?? ??????????????? T(mn)

?? ?????? O(mn) ??????? ????????m(n-m1)
???????????O(mn) ???
?????????O(mn)?????????????????
7
Knuth-Morris-Pratt??????
8
KMP?????? ????
  • ???? ????????
  • j2 ?????????????????????
  • ? hi ???????? k (???? hi0)

9
KMP?????? ??????
  • ? hi ???????? k (???? hi0)

KMP?????? (??????)
??????????????????? j ??????
10
KMP?????? ???
11
KMP?????? ??
  • ?? KMP??????(??????)??????? O(n)
  • ??
  • ???? () ???????????????
  • j ?1???????i ?1???
  • i?hi ?1???????i ??????1??
  • i ????????????????
  • ???O(n)???????????? O(n)

??????? ?????????(amortized analysis)
????????????????????????
12
KMP?????? ??????
  • ? hi ????
  • ????????????
  • ????????????????hi ??????

?? KMP??????????????? ??? O(mn) ?????
13
Boyer-Moore ??????
14
BM?????? ??????
  • KMP?????????????1???????
  • BM????????????????????????????????????????

?
???c ? d ????d ? P ??????????P ? d
?????????? ???????????????????????
P ?? c ???? T ?? a ??????P ????? a ??????????
15
BM?????? ???
  • ??????????????????? O(mn) ?????????
  • ????? KMP ???????
  • BM ???????????????? O((n/m) logkm) ?????(????k
    ????????????(??????))

16
Aho-Corasick ??????
17
????????????
  • ??
  • ???????
  • ???????
  • ??
  • ????????? j
  • KMP?BM? k ??? ? O(kn) ??
  • Aho-Corasick ?????????O(mn) ??

?????????????????S(??????)??????
18
Aho-Corasick ??????
  • ????
  • ?????????DFA(???????????)???

? W he, she, his, hers
?? ?????? f ?? ???? g
0 ??????? ???
19
Aho-Corasick ?????? ???
W he, she, his, hers , T ushers
u s h e r
s 0 0 3 4
5 8 9
2
0 ??????????
20
Aho-Corasick?????? ??????
O(n)??
W he, she, his, hers T ushers
21
Aho-Corasick ?????? DFA???(1)
  • ??????????????
  • ?????? g ???
  • ????????????? f ???
  • ?????????? h ???(???????OK)

22
Aho-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
Write a Comment
User Comments (0)
About PowerShow.com