Table of Contents
Fetching ...

Directed Regular and Context-Free Languages

Moses Ganardi, Irmak Saglam, Georg Zetzsche

TL;DR

This work investigates the directedness of languages, defined via the existence of a common scattered superword for any pair of words, and links it to the structure of downward closures and ideals. It introduces a weighting framework to identify maximal candidate ideals and obtains tight complexity bounds: directedness for NFAs lies in $\mathsf{AC}^1$ (with $NL$-completeness for fixed alphabets), while directedness for CFGs is $\mathsf{PSPACE}$-complete (even for binary alphabets). The results yield efficient algorithms for downward-closure equivalence when inputs are directed, and reveal a sharp complexity drop from general cases to directed ones; counting maximal ideals in the downward-closure decomposition is $\#\mathrm{P}$-complete. The techniques combine semiring-based matrix powering, dynamic programming, and constructions of SLP-compressed infinite complement ideals, with implications for verification, CSPs, and the analysis of well-structured transition systems.

Abstract

We study the problem of deciding whether a given language is directed. A language $L$ is \emph{directed} if every pair of words in $L$ have a common (scattered) superword in $L$. Deciding directedness is a fundamental problem in connection with ideal decompositions of downward closed sets. Another motivation is that deciding whether two \emph{directed} context-free languages have the same downward closures can be decided in polynomial time, whereas for general context-free languages, this problem is known to be coNEXP-complete. We show that the directedness problem for regular languages, given as NFAs, belongs to $AC^1$, and thus polynomial time. Moreover, it is NL-complete for fixed alphabet sizes. Furthermore, we show that for context-free languages, the directedness problem is PSPACE-complete.

Directed Regular and Context-Free Languages

TL;DR

This work investigates the directedness of languages, defined via the existence of a common scattered superword for any pair of words, and links it to the structure of downward closures and ideals. It introduces a weighting framework to identify maximal candidate ideals and obtains tight complexity bounds: directedness for NFAs lies in (with -completeness for fixed alphabets), while directedness for CFGs is -complete (even for binary alphabets). The results yield efficient algorithms for downward-closure equivalence when inputs are directed, and reveal a sharp complexity drop from general cases to directed ones; counting maximal ideals in the downward-closure decomposition is -complete. The techniques combine semiring-based matrix powering, dynamic programming, and constructions of SLP-compressed infinite complement ideals, with implications for verification, CSPs, and the analysis of well-structured transition systems.

Abstract

We study the problem of deciding whether a given language is directed. A language is \emph{directed} if every pair of words in have a common (scattered) superword in . Deciding directedness is a fundamental problem in connection with ideal decompositions of downward closed sets. Another motivation is that deciding whether two \emph{directed} context-free languages have the same downward closures can be decided in polynomial time, whereas for general context-free languages, this problem is known to be coNEXP-complete. We show that the directedness problem for regular languages, given as NFAs, belongs to , and thus polynomial time. Moreover, it is NL-complete for fixed alphabet sizes. Furthermore, we show that for context-free languages, the directedness problem is PSPACE-complete.
Paper Structure (9 sections, 6 theorems)

This paper contains 9 sections, 6 theorems.

Key Result

Theorem 1

Given an NFA, one can decide in $\AC^1$ whether its language is directed.

Theorems & Definitions (6)

  • Theorem 1
  • Theorem 2
  • Theorem 3
  • Theorem 4
  • Theorem 5
  • Theorem 6