Skip to main content
QUICK REVIEW

[Paper Review] Succinctness of the Complement and Intersection of Regular Expressions

Wouter Gelade, Frank Neven|Feb 20, 2008
semigroups and automata theoryComputer Science29 references8 citations
TL;DR

This paper establishes tight lower bounds on the succinctness of regular expression complementation and intersection, proving that complementing a regular expression may require a double exponential size increase, and intersecting k regular expressions can incur a double exponential blow-up when k is unbounded. The authors construct explicit families of regular expressions demonstrating these bounds are unavoidable, and show that for one-unambiguous expressions, complementation is polynomial-time computable, while intersection remains exponentially hard.

ABSTRACT

We study the succinctness of the complement and intersection of regular expressions. In particular, we show that when constructing a regular expression defining the complement of a given regular expression, a double exponential size increase cannot be avoided. Similarly, when constructing a regular expression defining the intersection of a fixed and an arbitrary number of regular expressions, an exponential and double exponential size increase, respectively, can in worst-case not be avoided. All mentioned lower bounds improve the existing ones by one exponential and are tight in the sense that the target expression can be constructed in the corresponding time class, i.e., exponential or double exponential time. As a by-product, we generalize a theorem by Ehrenfeucht and Zeiger stating that there is a class of DFAs which are exponentially more succinct than regular expressions, to a fixed four-letter alphabet. When the given regular expressions are one-unambiguous, as for instance required by the XML Schema specification, the complement can be computed in polynomial time whereas the bounds concerning intersection continue to hold. For the subclass of single-occurrence regular expressions, we prove a tight exponential lower bound for intersection.

Motivation & Objective

  • To determine the worst-case size increase when constructing regular expressions for the complement of a given regular expression.
  • To analyze the succinctness of intersecting multiple regular expressions, especially in the case of a fixed versus arbitrary number of expressions.
  • To identify natural subclasses of regular expressions—such as one-unambiguous or single-occurrence expressions—where complementation or intersection can be computed more efficiently.
  • To generalize Ehrenfeucht and Zeiger's result on DFA-to-regular-expression succinctness to a fixed four-letter alphabet.
  • To provide tight complexity bounds that match the time required to construct the resulting expressions, establishing optimality of known algorithms.

Proposed method

  • Construct a family of languages $K_n$ over a four-letter alphabet by encoding the binary representation of the Ehrenfeucht-Zeiger languages $Z_n$, which are accepted by DFAs of size $\mathcal{O}(n^2)$ but require regular expressions of size at least $2^n$.
  • Define two regular expressions $r_n$ and $s_n$ of size $\mathcal{O}(n^2)$ such that their intersection equals $M_n$, a language requiring regular expressions of size at least $2^{n-1}$, thereby proving an exponential lower bound for intersection.
  • Construct $m = 2n+1$ one-unambiguous regular expressions of size $\mathcal{O}(n)$ whose intersection defines $L_{2^n}$, a language requiring regular expressions of size at least $2^{2^n}$, establishing a double exponential lower bound for intersection in this subclass.
  • Use the Glushkov construction to verify that the constructed one-unambiguous expressions yield deterministic finite automata, confirming their structural properties.
  • Prove that the complement of a one-unambiguous regular expression can be computed in polynomial time, while the general complement remains double exponential.
  • Provide time complexity bounds for constructing complement and intersection expressions, showing that the lower bounds are tight and match the time complexity of standard algorithms.

Experimental results

Research questions

  • RQ1What is the minimal size increase when constructing a regular expression for the complement of a given regular expression?
  • RQ2What is the minimal size increase when computing the intersection of k regular expressions, especially when k is fixed or unbounded?
  • RQ3Can the complement operation be computed in polynomial time for any natural subclass of regular expressions, and if so, which?
  • RQ4What is the precise succinctness gap between DFAs and regular expressions over a fixed, small alphabet, such as four letters?
  • RQ5Are there subclasses of regular expressions for which both complement and intersection can be computed in polynomial time?

Key findings

  • The complement of a regular expression may require a double exponential size increase in the worst case, and this bound is tight: no smaller expression can define the complement.
  • The intersection of k regular expressions, when k is unbounded, may require a double exponential size increase, and this bound is also tight.
  • For a fixed number k of regular expressions, the intersection can be computed in exponential time, and this is optimal: an exponential size increase cannot be avoided in the worst case.
  • For one-unambiguous regular expressions, the complement can be computed in polynomial time, but the resulting expression may not remain one-unambiguous.
  • For single-occurrence regular expressions, the intersection operation incurs an exponential size increase, and this bound is tight.
  • There exist families of one-unambiguous regular expressions of size $\mathcal{O}(n)$ whose intersection requires a regular expression of size at least $2^{2^n}$, demonstrating a double exponential blow-up.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.