Elsevier

Theoretical Computer Science

Volume 412, Issue 50, 25 November 2011, Pages 6959-6981
Theoretical Computer Science

Verifying and enumerating parameterized border arrays

https://doi.org/10.1016/j.tcs.2011.09.008Get rights and content
Under an Elsevier user license
open archive

Abstract

The parameterized pattern matching problem is to check if there exists a renaming bijection on the alphabet with which a given pattern can be transformed into a substring of a given text. A parameterized border array (p-border array) is a parameterized version of a standard border array, and we can efficiently solve the parameterized pattern matching problem using p-border arrays.

In this paper, we present a linear time algorithm to verify if a given integer array is a valid p-border array for a binary alphabet. We also show a linear time algorithm to compute all binary parameterized strings sharing a given p-border array. In addition, we give an algorithm which computes all p-border arrays of length at most n, where n is a given threshold. This algorithm runs in O(B2n) time, where B2n is the number of all p-border arrays of length n for a binary parameter alphabet.

The problems with a larger alphabet are much more difficult. Still, we present an O(n1.5)–time O(n)–space algorithm to verify if a given integer array of length n is a valid p-border array for an unbounded alphabet. The best previously known solution to this task takes time proportional to the n-th Bell number 1ek=0knk!, and hence our algorithm is much more efficient. Also, we show that it is possible to enumerate all p-border arrays of length at most n for an unbounded alphabet in O(Bnn2.5) time, where Bn denotes the number of p-border arrays of length n.

Keywords

String matching
Parameterized pattern matching
Reverse engineering
Enumeration algorithms

Cited by (0)