Professional Documents
Culture Documents
FALLSEM2023-24 CSE2012 ETH VL2023240103657 2023-09-21 Reference-Material-I
FALLSEM2023-24 CSE2012 ETH VL2023240103657 2023-09-21 Reference-Material-I
T = a1…an over ∑.
P = b1…bm over ∑.
Pattern matching is a_i….a_{i+m-1} = P
In other words, a_{i+1}….a_{i+m} = P
|∑| = d, ∑= {0,1,…,d-1}.
Consider a subarray of T
A single arithmetic operation cannot be considered as a unit/constant time operation if we are dealing
with a very larger no. They even might not be representable in constant time.
Then,