Finding and Counting Permutations via CSPs release_owcrk6hapbcvjp3nv5ydv7jsrm

by Benjamin Aram Berendsohn, László Kozma, Dániel Marx

Published in Algorithmica by Springer Science and Business Media LLC.

2021   Volume 83, p2552-2577

Abstract

<jats:title>Abstract</jats:title>Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this area is deciding whether a given permutation of length <jats:italic>n</jats:italic> contains a given pattern of length <jats:italic>k</jats:italic>. In this work we give two new algorithms for this well-studied problem, one whose running time is <jats:inline-formula><jats:alternatives><jats:tex-math>$$n^{k/4 + o(k)}$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msup> <mml:mi>n</mml:mi> <mml:mrow> <mml:mi>k</mml:mi> <mml:mo>/</mml:mo> <mml:mn>4</mml:mn> <mml:mo>+</mml:mo> <mml:mi>o</mml:mi> <mml:mo>(</mml:mo> <mml:mi>k</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:msup> </mml:math></jats:alternatives></jats:inline-formula>, and a polynomial-space algorithm whose running time is the better of <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(1.6181^n)$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mn>1</mml:mn> <mml:mo>.</mml:mo> <mml:msup> <mml:mn>6181</mml:mn> <mml:mi>n</mml:mi> </mml:msup> <mml:mo>)</mml:mo> </mml:mrow> </mml:math></jats:alternatives></jats:inline-formula> and <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(n^{k/2 + 1})$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:msup> <mml:mi>n</mml:mi> <mml:mrow> <mml:mi>k</mml:mi> <mml:mo>/</mml:mo> <mml:mn>2</mml:mn> <mml:mo>+</mml:mo> <mml:mn>1</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:mrow> </mml:math></jats:alternatives></jats:inline-formula>. These results improve the earlier best bounds of <jats:inline-formula><jats:alternatives><jats:tex-math>$$n^{0.47k + o(k)}$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msup> <mml:mi>n</mml:mi> <mml:mrow> <mml:mn>0.47</mml:mn> <mml:mi>k</mml:mi> <mml:mo>+</mml:mo> <mml:mi>o</mml:mi> <mml:mo>(</mml:mo> <mml:mi>k</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:msup> </mml:math></jats:alternatives></jats:inline-formula> and <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(1.79^n)$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mn>1</mml:mn> <mml:mo>.</mml:mo> <mml:msup> <mml:mn>79</mml:mn> <mml:mi>n</mml:mi> </mml:msup> <mml:mo>)</mml:mo> </mml:mrow> </mml:math></jats:alternatives></jats:inline-formula> due to Ahal and Rabinovich (2000) resp. Bruner and Lackner (2012) and are the fastest algorithms for the problem when <jats:inline-formula><jats:alternatives><jats:tex-math>$$k \in \varOmega (\log {n})$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>k</mml:mi> <mml:mo>∈</mml:mo> <mml:mi>Ω</mml:mi> <mml:mo>(</mml:mo> <mml:mo>log</mml:mo> <mml:mi>n</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:math></jats:alternatives></jats:inline-formula>. We show that both our new algorithms and the previous exponential-time algorithms in the literature can be viewed through the unifying lens of <jats:italic>constraint-satisfaction</jats:italic>. Our algorithms can also <jats:italic>count</jats:italic>, within the same running time, the number of occurrences of a pattern. We show that this result is close to optimal: solving the counting problem in time <jats:inline-formula><jats:alternatives><jats:tex-math>$$f(k) \cdot n^{o(k/\log {k})}$$</jats:tex-math><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>f</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>k</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mo>·</mml:mo> <mml:msup> <mml:mi>n</mml:mi> <mml:mrow> <mml:mi>o</mml:mi> <mml:mo>(</mml:mo> <mml:mi>k</mml:mi> <mml:mo>/</mml:mo> <mml:mo>log</mml:mo> <mml:mi>k</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:msup> </mml:mrow> </mml:math></jats:alternatives></jats:inline-formula> would contradict the <jats:italic>exponential-time hypothesis</jats:italic> (ETH). For some special classes of patterns we obtain improved running times. We further prove that 3-<jats:italic>increasing</jats:italic> (4321-avoiding) and 3-<jats:italic>decreasing</jats:italic> (1234-avoiding) permutations can, in some sense, <jats:italic>embed</jats:italic> arbitrary permutations of almost linear length, which indicates that a sub-exponential running time is unlikely with the current techniques, even for patterns from these restricted classes.
In application/xml+jats format

Archived Files and Locations

application/pdf  1.8 MB
file_ox56gytivffo5fd2u7q7lrt2fy
link.springer.com (publisher)
web.archive.org (webarchive)
Read Archived PDF
Preserved and Accessible
Type  article-journal
Stage   published
Date   2021-03-01
Language   en ?
Container Metadata
Not in DOAJ
In Keepers Registry
ISSN-L:  0178-4617
Work Entity
access all versions, variants, and formats of this works (eg, pre-prints)
Catalog Record
Revision: 5a0478f2-e05e-4daf-b0e0-b5221b118f92
API URL: JSON