Permutation patterns in streams

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autore principale: Berendsohn, Benjamin Aram
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909694612733952
author Berendsohn, Benjamin Aram
author_facet Berendsohn, Benjamin Aram
contents Permutation patterns and pattern avoidance are central, well-studied concepts in combinatorics and computer science. Given two permutations $τ$ and $π$, the pattern matching problem (PPM) asks whether $τ$ contains $π$. This problem arises in various contexts in computer science and statistics and has been studied extensively in exact-, parameterized-, approximate-, property-testing- and other formulations. In this paper, we study pattern matching in a streaming setting, when the input $τ$ is revealed sequentially, one element at a time. There is extensive work on the space complexity of various statistics in streams of integers. The novelty of our setting is that the input stream is a permutation, which allows inferring some information about future inputs. Our algorithms crucially take advantage of this fact, while existing lower bound techniques become difficult to apply. We show that the complexity of the problem changes dramatically depending on the pattern $π$. The space requirement is: $Θ(k\log{n})$ for the monotone patterns $π= 12\dots k$, or $π= k\dots21$, $O(\sqrt{n\log{n}})$ for $π\in \{312,132\}$, $O(\sqrt{n} \log n)$ for $π\in \{231,213\}$, and $\widetildeΘ_π(n)$ for all other $π$. If $τ$ is an arbitrary sequence of integers (not necessary a permutation), we show that the complexity is $\widetildeΘ_π(n)$ in all except the first (monotone) cases.
format Preprint
id arxiv_https___arxiv_org_abs_2507_11291
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Permutation patterns in streams
Berendsohn, Benjamin Aram
Data Structures and Algorithms
Permutation patterns and pattern avoidance are central, well-studied concepts in combinatorics and computer science. Given two permutations $τ$ and $π$, the pattern matching problem (PPM) asks whether $τ$ contains $π$. This problem arises in various contexts in computer science and statistics and has been studied extensively in exact-, parameterized-, approximate-, property-testing- and other formulations. In this paper, we study pattern matching in a streaming setting, when the input $τ$ is revealed sequentially, one element at a time. There is extensive work on the space complexity of various statistics in streams of integers. The novelty of our setting is that the input stream is a permutation, which allows inferring some information about future inputs. Our algorithms crucially take advantage of this fact, while existing lower bound techniques become difficult to apply. We show that the complexity of the problem changes dramatically depending on the pattern $π$. The space requirement is: $Θ(k\log{n})$ for the monotone patterns $π= 12\dots k$, or $π= k\dots21$, $O(\sqrt{n\log{n}})$ for $π\in \{312,132\}$, $O(\sqrt{n} \log n)$ for $π\in \{231,213\}$, and $\widetildeΘ_π(n)$ for all other $π$. If $τ$ is an arbitrary sequence of integers (not necessary a permutation), we show that the complexity is $\widetildeΘ_π(n)$ in all except the first (monotone) cases.
title Permutation patterns in streams
topic Data Structures and Algorithms
url https://arxiv.org/abs/2507.11291