Summary: Function Matching
Bar-Ilan University Bar-Ilan University Bar-Ilan University Bar-Ilan University
We present problems in three different application areas: identifying similar code where
global register reallocation and spill code minimization were done (programming languages);
protein threading (computational biology); and searching for color icons under different color
maps (image processing).
We introduce a new search model function matching that enables solving the above
problems. The function matching problem has as its input a text T of length n over alphabet
T and a pattern P = PP · · · P[m] of length m over alphabet P . We seek all text locations
i where the m-length substring that starts at i is equal to f(P)f(P) · · · f(P[m]), for some
function f : P T .
We give a randomized algorithm which solves the function matching problem in time O(n log n)
with probability 1