Exact (n + 1) Comparison Complexity for the N-Repeated Element Problem
arXiv:2601.21202
Abstract
This paper establishes the exact comparison complexity of finding an element repeated times in a -element array containing distinct values, under the equality-comparison model with extra space. We present a simple deterministic algorithm performing exactly comparisons and prove this bound \emph{tight}: any correct algorithm requires at least comparisons in the worst case. The lower bound follows from an adversary argument using graph-theoretic structure. Equality queries build an \emph{inequality graph} ; its complement (potential-equalities) must contain either two disjoint -cliques or one -clique to maintain ambiguity. We show these structures persist through comparisons via a ``pillar matching'' construction, but cannot survive the st. The matching upper bound comes from a ``triangle'' construction that forces every component of to be a clique, so each hosts at most one copy of the repeated element and the single untested element must be the answer. This result provides a concrete, self-contained demonstration of exact lower-bound techniques, bridging toy problems with nontrivial combinatorial reasoning.