English

Heuristic Algorithm for Generalized Function Matching

Data Structures and Algorithms 2019-08-06 v1

Abstract

The problem of generalized function matching can be defined as follows: given a pattern p=p1pmp=p_1 \cdots p_m and a text t=t1tnt=t_1 \cdots t_n, find a mapping f:ΣpΣtf:\Sigma_p\rightarrow\Sigma_t^{*} and all text locations ii such that f(p1)f(p2)f(pm)=titjf(p_1) f(p_2) \cdots f(p_m) = t_i \cdots t_j, a substring of tt. By modifying the restrictions of the matching function ff, one can obtain different matching problems, many of which have important applications. When f:ΣpΣtf:\Sigma_p\rightarrow\Sigma_t we are faced with problems found in the well-established field of combinatorial pattern matching. If the single character constraint is lifted and f:ΣpΣtf:\Sigma_p\rightarrow\Sigma_t^{*}, we obtain generalized function matching as introduced by Amir and Nor (JDA 2007). If we further constrain ff to be injective, then we arrive at generalized parametrized matching as defined by Clifford et al. (SPIRE 2009). There are a number of important applications for pattern matching in computational biology, text editors and data compression, to name a few. Therefore, many efficient algorithms have been developed for a wide variety of specific problems including finding tandem repeats in DNA sequences, optimizing embedded systems by reusing code etc. In this work we present a heuristic algorithm illustrating a practical approach to tackling a variant of generalized function matching where f:ΣpΣt+f:\Sigma_p\rightarrow\Sigma_t^{+} and demonstrate its performance on human-produced text as well as random strings.

Keywords

Cite

@article{arxiv.1908.01562,
  title  = {Heuristic Algorithm for Generalized Function Matching},
  author = {Radu Stefan Mincu},
  journal= {arXiv preprint arXiv:1908.01562},
  year   = {2019}
}

Comments

The paper was accepted for publication in the proceedings of KES 2019 23rd International Conference on Knowledge-Based and Intelligent Information & Engineering Systems