14 research outputs found
Finding and Counting Permutations via CSPs
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 n contains a given pattern of length k.
In this work we give two new algorithms for this well-studied problem, one whose running time is n^{k/4 + o(k)}, and a polynomial-space algorithm whose running time is the better of O(1.6181^n) and O(n^{k/2 + 1}). These results improve the earlier best bounds of n^{0.47k + o(k)} and O(1.79^n) due to Ahal and Rabinovich (2000) resp. Bruner and Lackner (2012) and are the fastest algorithms for the problem when k in Omega(log{n}). We show that both our new algorithms and the previous exponential-time algorithms in the literature can be viewed through the unifying lens of constraint-satisfaction.
Our algorithms can also count, 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 f(k) * n^{o(k/log{k})} would contradict the exponential-time hypothesis (ETH). For some special classes of patterns we obtain improved running times. We further prove that 3-increasing and 3-decreasing permutations can, in some sense, embed arbitrary permutations of almost linear length, which indicates that an algorithm with sub-exponential running time is unlikely, even for patterns from these restricted classes
Optimization with pattern-avoiding input
Permutation pattern-avoidance is a central concept of both enumerative and
extremal combinatorics. In this paper we study the effect of permutation
pattern-avoidance on the complexity of optimization problems.
In the context of the dynamic optimality conjecture (Sleator, Tarjan, STOC
1983), Chalermsook, Goswami, Kozma, Mehlhorn, and Saranurak (FOCS 2015)
conjectured that the amortized access cost of an optimal binary search tree
(BST) is whenever the access sequence avoids some fixed pattern. They
showed a bound of , which was recently improved to
by Chalermsook, Pettie, and Yingchareonthawornchai
(2023); here is the BST size and the inverse-Ackermann
function. In this paper we resolve the conjecture, showing a tight
bound. This indicates a barrier to dynamic optimality: any candidate online BST
(e.g., splay trees or greedy trees) must match this optimum, but current
analysis techniques only give superconstant bounds.
More broadly, we argue that the easiness of pattern-avoiding input is a
general phenomenon, not limited to BSTs or even to data structures. To
illustrate this, we show that when the input avoids an arbitrary, fixed, a
priori unknown pattern, one can efficiently compute a -server solution of
requests from a unit interval, with total cost , in
contrast to the worst-case bound; and a traveling salesman tour
of points from a unit box, of length , in contrast to the
worst-case bound; similar results hold for the euclidean
minimum spanning tree, Steiner tree, and nearest-neighbor graphs.
We show both results to be tight. Our techniques build on the Marcus-Tardos
proof of the Stanley-Wilf conjecture, and on the recently emerging concept of
twin-width; we believe our techniques to be more generally applicable
Fast approximation of search trees on trees with centroid trees
Search trees on trees (STTs) generalize the fundamental binary search tree
(BST) data structure: in STTs the underlying search space is an arbitrary tree,
whereas in BSTs it is a path. An optimal BST of size can be computed for a
given distribution of queries in time [Knuth 1971] and centroid BSTs
provide a nearly-optimal alternative, computable in time [Mehlhorn
1977].
By contrast, optimal STTs are not known to be computable in polynomial time,
and the fastest constant-approximation algorithm runs in time
[Berendsohn, Kozma 2022]. Centroid trees can be defined for STTs analogously to
BSTs, and they have been used in a wide range of algorithmic applications. In
the unweighted case (i.e., for a uniform distribution of queries), a centroid
tree can be computed in time [Brodal et al. 2001; Della Giustina et al.
2019]. These algorithms, however, do not readily extend to the weighted case.
Moreover, no approximation guarantees were previously known for centroid trees
in either the unweighted or weighted cases.
In this paper we revisit centroid trees in a general, weighted setting, and
we settle both the algorithmic complexity of constructing them, and the quality
of their approximation. For constructing a weighted centroid tree, we give an
output-sensitive time algorithm, where is
the height of the resulting centroid tree. If the weights are of polynomial
complexity, the running time is . We show these bounds to be
optimal, in a general decision tree model of computation. For approximation, we
prove that the cost of a centroid tree is at most twice the optimum, and this
guarantee is best possible, both in the weighted and unweighted cases. We also
give tight, fine-grained bounds on the approximation-ratio for bounded-degree
trees and on the approximation-ratio of more general -centroid trees
The Diameter of Caterpillar Associahedra
The caterpillar associahedron is a polytope arising from the
rotation graph of search trees on a caterpillar tree , generalizing the
rotation graph of binary search trees (BSTs) and thus the conventional
associahedron. We show that the diameter of is , where is the number of vertices, is the number of
leaves, and is the entropy of the leaf distribution of .
Our proofs reveal a strong connection between caterpillar associahedra and
searching in BSTs. We prove the lower bound using Wilber's first lower bound
for dynamic BSTs, and the upper bound by reducing the problem to searching in
static BSTs
Recommended from our members
An exact characterization of saturation for permutation matrices
A 0-1 matrix contains a 0-1 matrix pattern if we can obtain from by deleting rows and/or columns and turning arbitrary 1-entries into 0s. The saturation function for a 0-1 matrix pattern indicates the minimum number of 1s in an 0-1 matrix that does not contain , but changing any 0-entry into a 1-entry creates an occurrence of . Fulek and Keszegh recently showed that each pattern has a saturation function either in or in . We fully classify the saturation functions of permutation matrices.Mathematics Subject Classifications: 05D99Keywords: Forbidden submatrices, saturatio