Frequency Estimation from the Internal State of the Boyer-Moore Majority Vote Algorithm
Abstract
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.
Create a lesson
Related papers
A Polynomial-Time Algorithm for ARRIVAL
Shared title terminologycs.DSChenglin Fan, Jeonseong Kim
Fast Algorithms for Permanents of Permutationally-Dominant Matrices
Shared title terminologycs.DSRyan L. Mann
Improved Exact Algorithms and Parameterized Results for Monopolar Graph Problems
Shared title terminologycs.DSSoumen Mandal, Ashutosh Rai
Algorithms and Complexity of Connectivity Switching in Graphs
Shared title terminologycs.DSChristoph Kern, Alexander Firbas, Manuel Sorge
How to Round Spiky Balls into Submission -- And Faster Algorithms For The Closest Vector Problem
Shared title terminologycs.DSDivesh Aggarwal, Aditya Morolia
Cop-Win Edge Completion: Hardness, Structure, and Parameterized Algorithm
Shared title terminologycs.DSRajat Adak