
































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.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。