Topological Sorting under Regular Constraints
Antoine Amarilli, Charles Paperman

TL;DR
This paper investigates the complexity of constrained topological sorting problems with regular language constraints, identifying tractable cases and establishing NP-hardness for others, with implications for scheduling and program verification.
Contribution
It characterizes the complexity of CTS[K] and CSh[K] problems for various language classes, introducing new techniques and conjecturing a dichotomy based on language properties.
Findings
CTS[K] is tractable for unions of monomials.
CTS[K] is NP-hard for K = (ab)^*.
CSh[K] is tractable for group languages.
Abstract
We introduce the constrained topological sorting problem (CTS): given a regular language K and a directed acyclic graph G with labeled vertices, determine if G has a topological sort that forms a word in K. This natural problem applies to several settings, e.g., scheduling with costs or verifying concurrent programs. We consider the problem CTS[K] where the target language K is fixed, and study its complexity depending on K. We show that CTS[K] is tractable when K falls in several language families, e.g., unions of monomials, which can be used for pattern matching. However, we show that CTS[K] is NP-hard for K = (ab)^* and introduce a shuffle reduction technique to show hardness for more languages. We also study the special case of the constrained shuffle problem (CSh), where the input graph is a disjoint union of strings, and show that CSh[K] is additionally tractable when K is a group…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
