One-dimensional string matching: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Algorithmic Problem Category:Pattern Matching __NOTOC__ ==Input== Two linear sequences, <math>S</math> of length <math>n=|S|</math> and <m...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
[[Category:Checkup]] | |||
[[Category:Algorithmic Problem]] | [[Category:Algorithmic Problem]] | ||
[[Category:Pattern Matching]] | [[Category:Pattern Matching]] |
Revision as of 19:06, 1 October 2014
Input
Two linear sequences, [math]\displaystyle{ S }[/math] of length [math]\displaystyle{ n=|S| }[/math] and [math]\displaystyle{ T }[/math] of length [math]\displaystyle{ m=|T| }[/math].
Output
A sorted sequence [math]\displaystyle{ R }[/math] of integral values from [math]\displaystyle{ \{ 1,...,n\} }[/math] such that [math]\displaystyle{ i \in R }[/math] if, and only if, it is [math]\displaystyle{ i\le n-m+1 }[/math] and [math]\displaystyle{ T[j]=S[i+j-1] }[/math] for all [math]\displaystyle{ j \in \{ 1,...,m \} }[/math].
Objective
N/A
Complexity
Polynomial.