计算机科学 > 数据结构与算法
[提交于 2026年11月22日]
标题:Frequency Estimation from the Internal State of the Boyer-Moore Majority Vote Algorithm
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:The Boyer-Moore Majority Vote algorithm identifies a majority candidate in a single pass over a data stream using constant memory O(1) and linear processing time O(n). While the classic algorithm identifies a candidate without directly estimating its frequency, its internal register states retain information about item occurrences during execution. This work investigates a frequency estimator derived directly from these internal counters. We establish the conditions under which the counter state enables exact recovery of the frequency of the majority element and characterize the estimation error when these conditions are not satisfied. In particular, we analyze the effect of stream ordering on the estimator and identify delayed-arrival configurations, such as Majority-Delayed sequences, that can lead to systematic estimation errors. We further derive the error behavior associated with late-arriving majority blocks and empirically evaluate the estimator across multiple stream topologies. The results demonstrate that the internal state of the Boyer-Moore algorithm can provide frequency information without increasing its O(1) space complexity. At the same time, its accuracy depends critically on the ordering of elements in the input stream.
提交历史
来自:Saeed Momeni[v1] 2026年11月22日 星期日 14:08:30 UTC (774 KB)