Low-latency sliding window algorithms for regular and context-free languages are studied, where latency refers to the worst-case time spent for a single window update or query. For every regular language $L$ it is shown that there exists a constant-latency solution that supports adding and removing symbols independently on both ends of the window (the so-called two-way variable-size model). We prove that this result extends to all visibly pushdown languages. For deterministic 1-counter languages we present a $\mathcal{O}(\log n)$ latency sliding window algorithm for the two-way variable-size model where $n$ refers to the window size. We complement these results with a conditional lower bound: there exists a fixed real-time deterministic context-free language $L$ such that, assuming the OMV (online matrix vector multiplication) conjecture, there is no sliding window algorithm for $L$ with latency $n^{1/2-\epsilon}$ for any $\epsilon>0$, even in the most restricted sliding window model (one-way fixed-size model). The above mentioned results all refer to the unit-cost RAM model with logarithmic word size. For regular languages we also present a refined picture using word sizes $\mathcal{O}(1)$, $\mathcal{O}(\log\log n)$, and $\mathcal{O}(\log n)$.
翻译:研究常规语言和不上下文语言的低长滑动窗口算法。 在这种算法中, 延迟值是指用于单一窗口更新或查询的最坏情况时间 。 对于每种常规语言, 显示存在一个常长解决方案, 支持在窗口两端独立添加和删除符号( 所谓的双向变量大小模式 ) 。 我们证明这个结果延伸到所有显眼的推下语言 。 对于确定性1- 对应语言, 我们为双向变量大小模式的 $\ mathcal{O}( log n) 显示一个最差的情况滑动时间滑动窗口算法, 其中美元是指窗口大小的 $nnnnnnn_ 美元 美元 。 我们用一个条件更小的 N- mal 确定性语言来补充这些结果 。 假设 OMVM (在线矩阵矢量乘数乘数) 直线窗口算法, 任何以 $n_ 1/2\\ eplon} $ ( $\ log n) 任何 美元 的滑动窗口算算算 $, 即使在最有限的滚动的窗口模型的 ncalal- cal ad_ lima_ lig_ lig_ lip lip lip lig_ ligal lip lip lig_ lip lig_ lig_ lig_ lig_ lig_ ligal_ lig_ mode mode lig_ ligy lig lig ligy lig_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ sal_ modal_ sal sal sal sal sal_ modal smal_ modal_ modal smal_ modal_ smal_ smal_ sal_ smal_ sal_ modal_ modal_ smal_ sal_ sal_ smal_ exsal_ smal_