The Permutation Pattern Matching problem asks, given two permutations $\sigma$ on $n$ elements and $\pi$, whether $\sigma$ admits a subsequence with the same relative order as $\pi$ (or, in the counting version, how many such subsequences are there). This natural problem was shown by Bose, Buss and Lubiw [IPL 1998] to be NP-complete, and hence we should seek exact exponential time solutions. The asymptotically fastest such solution up to date, by Berendsohn, Kozma and Marx [IPEC 2019], works in $\mathcal{O}(1.6181^n)$ time. We design a simple and faster $\mathcal{O}(1.415^{n})$ time algorithm for both the detection and the counting version. We also prove that this is optimal among a certain natural class of algorithms.
翻译:变异模式匹配问题询问, 给出两个调值 $\ gma$ $n 元元和 $pi$, $\ gma$ 是否接受一个相对顺序与$\ pi$( 或者在计算版本中, 有多少次序列存在 ) 相同的子序列。 这个自然问题由 Bose, Buss 和 Lubiw [ IPL 1998] 显示为 NP- 完成, 因此我们应该寻找精确的指数时间解决方案 。 由 Berendsohn, Kozma 和 Marx [IPEC 2019] 著, 以 $\ mathcal{O} ( 1.6181 ⁇ n) 时间为单位, 使用一个类似顺序的子序列 。 我们为检测和计数版本设计了一个简单快捷的 $\ mathcal{ O} ( 1. 1.415 ⁇ n} 时间算法 。 我们还证明, 在某个自然的算法类别中这是最佳的 。