Related papers: Improved Algorithm for Permutation Testing
We have rediscovered a simple algorithm to compute the mathematical constant \[ \pi=3.14159265\cdots. \] The algorithm had been known for a long time but it might not be recognized as a fast, practical algorithm. The time complexity of it…
We study the problem of finding monotone subsequences in an array from the viewpoint of sublinear algorithms. For fixed $k \in \mathbb{N}$ and $\varepsilon > 0$, we show that the non-adaptive query complexity of finding a length-$k$…
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…
Dokos et. al. studied the distribution of two statistics over permutations $\mathfrak{S}_n$ of $\{1,2,\dots, n\}$ that avoid one or more length three patterns. A permutation $\sigma\in\mathfrak{S}_n$ contains a pattern…
Let $\pi_n$ be a uniformly chosen random permutation on $[n]$. The authors of [2] showed that the expected number of distinct consecutive patterns of all lengths $k\in\{1,2,\ldots,n\}$ in $\pi_n$ was $\frac{n^2}{2}(1-o(1))$ as $n\to\infty$,…
In this paper we study the parameterized complexity of two well-known permutation group problems which are NP-complete. 1. Given a permutation group G=<S>, subgroup of $S_n$, and a parameter $k$, find a permutation $\pi$ in G such that…
We study the formula complexity of the word problem $\mathsf{Word}_{S_n,k} : \{0,1\}^{kn^2} \to \{0,1\}$: given $n$-by-$n$ permutation matrices $M_1,\dots,M_k$, compute the $(1,1)$-entry of the matrix product $M_1\cdots M_k$. An important…
Permutation Pattern Matching (or PPM) is a decision problem whose input is a pair of permutations $\pi$ and $\tau$, represented as sequences of integers, and the task is to determine whether $\tau$ contains a subsequence order-isomorphic to…
We study Ramsey-type problems on sets avoiding sequences whose consecutive differences have a fixed relative order. For a given permutation $\pi \in S_k$, a $\pi$-wave is a sequence $x_1 < \cdots < x_{k+1}$ such that $x_{i+1} - x_i >…
Given a pattern $P$ and a text $T$, both strings over a binary alphabet, the binary jumbled string matching problem consists in telling whether any permutation of $P$ occurs in $T$. The indexed version of this problem, i.e., preprocessing a…
We assume the permutation $\pi$ is given by an $n$-element array in which the $i$-th element denotes the value $\pi(i)$. Constructing its inverse in-place (i.e. using $O(\log{n})$ bits of additional memory) can be achieved in linear time…
Let $(\{1,2,\ldots,n\},d)$ be a metric space. We analyze the expected value and the variance of $\sum_{i=1}^{\lfloor n/2\rfloor}\,d({\boldsymbol{\pi}}(2i-1),{\boldsymbol{\pi}}(2i))$ for a uniformly random permutation ${\boldsymbol{\pi}}$ of…
Let $n$ be a fixed integer with $n\geq 2$. For $i,j\in\mathbb{Z}_n$, define $||i,j||_n$ to be the distance between $i$ and $j$ when the elements of $\mathbb{Z}_n$ are written in a cycle. So $||i,j||_n=\min\{(i-j)\bmod n,(j-i)\bmod n\}$. For…
Let $n$ and $k$ be positive integers with $n>k$. Given a permutation $(\pi_1,\ldots,\pi_n)$ of integers $1,\ldots,n$, we consider $k$-consecutive sums of $\pi$, i.e., $s_i:=\sum_{j=0}^{k-1}\pi_{i+j}$ for $i=1,\ldots,n$, where we let…
We consider the problem of counting the copies of a length-$k$ pattern $\sigma$ in a sequence $f \colon [n] \to \mathbb{R}$, where a copy is a subset of indices $i_1 < \ldots < i_k \in [n]$ such that $f(i_j) < f(i_\ell)$ if and only if…
Given permutations $\sigma \in S_k$ and $\pi \in S_n$ with $k<n$, the \emph{pattern matching} problem is to decide whether $\pi$ matches $\sigma$ as an order-isomorphic subsequence. We give a linear-time algorithm in case both $\pi$ and…
We investigate the avoidability of unary patterns of size of four with morphic permutations. More precisely, we show that, for the positive integers $i,j,k$, the sizes of the alphabets over which a pattern $x \pi ^ {i} (x) \pi^{j}(x)…
We consider the problem of comparison-sorting an $n$-permutation $S$ that avoids some $k$-permutation $\pi$. Chalermsook, Goswami, Kozma, Mehlhorn, and Saranurak prove that when $S$ is sorted by inserting the elements into the GreedyFuture…
Let $\pi_n$ be a uniformly chosen random permutation on $[n]$. Using an analysis of the probability that two overlapping consecutive $k$-permutations are order isomorphic, we show that the expected number of distinct consecutive patterns in…
The $k$-mappability problem has two integers parameters $m$ and $k$. For every subword of size $m$ in a text $S$, we wish to report the number of indices in $S$ in which the word occurs with at most $k$ mismatches. The problem was lately…