Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSW-KMP알고리즘
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
이가영
June 25, 2020
65
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSW-KMP알고리즘
이가영
June 25, 2020
More Decks by 이가영
See All by 이가영
[CSW]세마포어와 뮤텍스의 차이
gayo
0
16
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
WENDY [Excerpt]
tessaabrams
14
40k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
30 Presentation Tips
portentint
PRO
1
430
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
How to Talk to Developers About Accessibility
jct
2
580
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Transcript
ޙৌ Ѩ࢝ ঌҊ્ܻ KMP ঌҊ્ܻ Knuth, Marris, Partt
ޙৌ Ѩ࢝ ޙઁ?
A B C D E F “ABC” ࠄޙ ਵ۰ח ಁఢ
A B C D E F A B C ࠄޙ
ਵ۰ח ಁఢ “ABC”
A B C D E F A B C ࠄޙ
ਵ۰ח ಁఢ “ABC”
A B C D E F A B C ࠄޙ
ਵ۰ח ಁఢ “ABC”
None
ޙৌ Ѩ࢝ ঌҊ્ܻ KMP ঌҊ્ܻ Knuth, Marris, Partt
None
فࢎ৬ ࢎ Banana فࢎ(prefix) ࢎ(suffix) B Ba Ban Bana Banan
Banana a na ana nana anana Banana 6ѐ 6ѐ
pi ߓৌ • pi[i]ח য ޙৌ 0~i ө ࠗ࠙ ޙৌ
ীࢲ prefix == suffix о ؼ ࣻ ח ࠗ࠙ ޙৌ ীࢲ о ӟ Ѫ ӡ
i ࠗ࠙ ޙৌ pi[i] 0 A 0 1 AB 0
2 ABA 1 3 ABAA 1 4 ABAAB 2 5 ABAABA 3 6 ABAABAB 2 ޙৌ : “ABAABAB”
ݒடغח ӡ݃ فࢎ৬ ࢎо э ࠗ࠙ ޙৌਸ ইࢲ Ӓ
ӡ о ӟ ӡܳ ҳೞݶ য٣ࢲࠗఠ ఐ࢝ೡ ೡ ࣻ .
None
࠺Үೡ ٸ, ੌ೮؍ ࠗ࠙ޙৌ ࠁܳ ਊೞৈ ࠛਃೠ ࠺Ү ,
যରೖ ౣܾѦ ইח ࠗ࠙ Ѥցڪযߡܻח ਗܻ
KMP ঌҊ્ܻ ࣽࢲ
1. ࠺Үೡ ࢚җ ਵ۰ח ಁఢਸ ك.
2. ੌࠗо ੌೞ ঋਸ ҃, ࠛੌೠ ࠗ࠙ਸ ઁ৻ೠ ࠗ࠙ਸ ח.
3. ࠛੌೠ ࠗ࠙ਸ ઁ৻ೠ ө ੌೞח ಁఢীࢲ ୭ ӡ ҃҅ܳ
ח. ҃҅ীࢲ فࢎ, ࢎܳ ঈೠ. ABACABA
4. ਵ۰ח ಁఢਸ ࢎ दৌө ز
Ѿۿ
ઑӘۄب ੌ ೮ח ࠁী ݾೞҊ ܻ ܻ ೧ك pi ߓৌਸ
ਊ೧ࢲ ݆ р दبܳ Ѥց ڬ ࣻ ѱ ೣ.
दрࠂبо ബਯਵ۽ ~