research

Disjoint pattern matching and implication in strings

Abstract

We deal with the problem of whether a set of string patterns implies the presence of a fixed pattern. While checking whether a set of patterns occurs in a string is solvable in polynomial time, this implication problem is well-known to be intractable. Here we consider a version of the problem when patterns in the set are required to be disjoint. We show that for such a version of the problem the situation is reversed: checking whether a set of patterns occurs in a string is NP-complete, but the implication problem is solvable in polynomial time. 1 Introduction and the main result The problem we consider in this note was motivated by answering queries in incompletely specified XML documents. Suppose that L is a set of letters, or labels, assumed to be countably infinite, and that is a special symbol (wildcard) not in L. By L we denote L∪ {}. A pattern is a finite string over L. If a string s over L matches a pattern π, we write s | = π. More precisely, if s = a0...an−1 an

    Similar works