Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
16Activity
0 of .
Results for:
No results containing your search query
P. 1
Bai 1 - String Searching

Bai 1 - String Searching

Ratings: (0)|Views: 839 |Likes:
Published by mo125
cui bap
cui bap

More info:

Categories:Topics, Art & Design
Published by: mo125 on Apr 06, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/16/2013

pdf

text

original

 
1
Data Structures & Algorithms
Các thu
t toán
đố
i sánh chu
i(String Searching)
Nguy
n Tri Tu
nKhoa CNTT –
 Đ
H.KHTN.Tp.HCMEmail:nttuan@ fit.hcmuns.edu.vn
Autumn 2008Data Structures & Algorithms -String Searching -Nguyen Tri Tuan, DH.KHTN Tp.HCM2
String Searching
Gi
i thi
uCác b
ướ
c x
Các cách ti
ế
p c
nBrute-ForceKnuth-Morris-Pratt
 
2
Autumn 2008Data Structures & Algorithms -String Searching -Nguyen Tri Tuan, DH.KHTN Tp.HCM3
Gi
i thi
u
ª
Các thu
t ng
th
ườ
ng dùng:
String searchingPattern matchingString matchingText searching
Autumn 2008Data Structures & Algorithms -String Searching -Nguyen Tri Tuan, DH.KHTN Tp.HCM4
Gi
i thi
u (tt)
ª
 Đố
i sánh chu
ilàgì?
Cho m
t chu
i T vàm
t chu
i P, hãy xác
đị
nh P cóxu
t hi
n trong T hay không ?T
ươ
ng t
nh
ư
l
nh:
strstr(T, P) [trong C++]
Pos(P, T) [trong Pascal]
Pattern (P)
Text (T)
m
n
 
3
Autumn 2008Data Structures & Algorithms -String Searching -Nguyen Tri Tuan, DH.KHTN Tp.HCM5
Gi
i thi
u (tt)
ª
 Đố
i sánh chu
i làm
t trong nh
ng bài toán c
ơ
 b
n vàt
nhn”nh
t c
a ngành Tin H
c
ª
Công d
ng:
Ch
c n
ă
ng search trong các trình so
n th
o v
ă
n b
nWeb browserCác công c
search (vd. Google)Sinh h
c phân t
(tìm ki
ế
m các m
u trong DNA / protein)
Autumn 2008Data Structures & Algorithms -String Searching -Nguyen Tri Tuan, DH.KHTN Tp.HCM6
Gi
i thi
u (tt)
ª
L
ch s
phát tri
n:
Brute Force:
Trong tr
ườ
ng h
p x
u nh
t th
i gian th
c hi
n t
l
v
i m*nTrong nhi
u
ng d
ng th
c t
ế
th
i gian x
lý th
c s
t
ỉ 
l
v
im+nThích h
p v
i h
u h
ế
t các h
máy tính
Trong n
ă
m 1970, S.A.Cook
đ
ã ch
ng minh m
t k
ế
tqu
lý thuy
ế
t giúp suy ra s
t
n t
i c
a m
t thu
t toán
để
gi
i bài toán
đố
i sánh m
u, th
i gian t
l
v
iM+N trong tr
ườ
ng h
p x
u nh
t

Activity (16)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
thinh_854 liked this
loicuoi liked this
boytau liked this
hoaian_uit liked this
Ngoc Anh Tran liked this
nguyenductd91 liked this
Tran Duc Tri liked this
Phuc Dinh Hoang liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->