Topological Sorting with Regular Constraints
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 language or a union of district group monomials. We conjecture that a dichotomy should hold on the complexity of CTS[K] or CSh[K] depending on K, and substantiate this by proving a coarser dichotomy under a different problem phrasing which ensures that tractable languages are closed under common operators.
Topological sorting
shuffle problem
regular language
Mathematics of computing~Graph algorithms
115:1-115:14
Regular Paper
https://arxiv.org/abs/1707.04310
Antoine
Amarilli
Antoine Amarilli
LTCI, Télécom ParisTech, Université Paris-Saclay
Charles
Paperman
Charles Paperman
Université de Lille
10.4230/LIPIcs.ICALP.2018.115
Kunal Agrawal, Jing Li, Kefu Lu, and Benjamin Moseley. Scheduling parallel DAG jobs online to minimize average flow time. In Proc. SODA, 2016.
J. Almeida. Finite Semigroups and Universal Algebra. Series in algebra. World Scientific, 1994.
Antoine Amarilli. Generalization of Dilworth’s theorem for labeled DAGs, 2016. URL: https://cstheory.stackexchange.com/q/37062.
https://cstheory.stackexchange.com/q/37062
Antoine Amarilli, M. Lamine Ba, Daniel Deutch, and Pierre Senellart. https://arxiv.org/abs/1707.07222. In Proc. TIME, 2017.
https://arxiv.org/abs/1707.07222
Antoine Amarilli and Charles Paperman. A dichotomy on constrained topological sorting. CoRR, abs/1707.04310, 2017. URL: http://arxiv.org/abs/1707.04310.
http://arxiv.org/abs/1707.04310
Manuel Bodirsky and Jan Kára. The complexity of temporal constraint satisfaction problems. JACM, 57(2):9, 2010.
Manuel Bodirsky, Barnaby Martin, and Antoine Mottet. Discrete temporal constraint satisfaction problems, 2015. URL: http://arxiv.org/abs/1503.08572.
http://arxiv.org/abs/1503.08572
Sam Buss and Michael Soltys. Unshuffling a square is NP-hard. JCSS, 80(4), 2014.
Robert P. Dilworth. A decomposition theorem for partially ordered sets. Annals of Mathematics, 1950.
Joey Eremondi, Oscar H Ibarra, and Ian McQuillan. https://arxiv.org/abs/1606.01199, 2016. URL: http://arxiv.org/abs/1606.01199.
http://arxiv.org/abs/1606.01199
Tomás Feder and Moshe Y. Vardi. The computational structure of monotone monadic SNP and constraint satisfaction: A study through Datalog and group theory. SIAM J. Comput., 28(1), 1998.
M. R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, 1979.
Michael R. Garey and David S. Johnson. Complexity results for multiprocessor scheduling under resource constraints. SIAM J. Comput, 1975.
M. Holcombe. Algebraic Automata Theory. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1982.
Neil Immerman. Nondeterministic space is closed under complementation. SIAM J. Comput, 17(5), 1988.
David S. Johnson. The NP-completeness column: an ongoing guide. Journal of Algorithms, 5(2), 1984.
John Kececioglu and Dan Gusfield. Reconstructing a history of recombinations from a set of sequences. Discrete Applied Mathematics, 88(1-3), 1998.
Takayuki Kimura. An algebraic system for process structuring and interprocess communication. In Proc. STOC, 1976.
Anthony Mansfield. On the computational complexity of a merge recognition problem. Discrete Applied Mathematics, 5(1), 1983.
Robert McNaughton and Seymour Papert. Counter-Free Automata. MIT Press, 1971.
W. F. Ogden, W. E. Riddle, and W.C. Rounds. Complexity of expressions allowing concurrency. In Proc. POPL, 1978.
Charles Paperman. Semigroup online, 2018. URL: https://www.paperman.name/semigroup/.
https://www.paperman.name/semigroup/
Jean-Éric Pin. Syntactic semigroups. In Handbook of formal languages, Vol. 1, pages 679-746. Springer, Berlin, 1997.
Jean-Éric Pin and Pascal Weil. Polynominal closure and unambiguous product. TCS, 30(4), 1997.
Jean-Éric Pin. Polynomial closure of group languages and open sets of the Hall topology. TCS, 169(2), 1996.
Romeo Rizzi and Stéphane Vialette. On recognizing words that are squares for the shuffle product. TCS, 2017.
M. P. Schützenberger. Sur le produit de concaténation non ambigu. Semigroup forum, 13, 1976/77.
Róbert Szelepcsényi. The method of forced enumeration for nondeterministic automata. Acta Informatica, 26(3), 1988.
Pascal Tesson and Denis Thérien. The computing power of programs over finite monoids. J. Autom. Lang. Comb., 7(2), 2001.
Pascal Tesson and Denis Thérien. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.5612. Semigroups, algorithms, automata and languages, 1, 2002.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.5612
Denis Thérien and Thomas Wilke. Over words, two variables are as powerful as one quantifier alternation. In Proc. STOC, 1998.
Manfred K. Warmuth and David Haussler. On the complexity of iterated shuffle. JCSS, 28(3), 1984.
Antoine Amarilli and Charles Paperman
Creative Commons Attribution 3.0 Unported license
https://creativecommons.org/licenses/by/3.0/legalcode