How many bits/questions does it take to identify the most frequent number in an array?
Statement
Note that "most frequent" here means "any of the most frequent, don't care which".
Example . Consider the Bell partitions
aaa
aab
aba
baa
abc
which subsume all possibilities of a 3 element array A (different letters are different values). You just need one question: Are the last two elements equal? If yes, return the last of the array. If no, return the first.
If logical combinations (like "is there at least one = between the last four elements?") are allowed, I'd expect, of course, questions, where is the corresponding Bell number. The tricky part is that you may return the array number most convenient for your algorithm, and as the example shows, less than the above upper bound will suffice. (Two for , at most five for . Also note that the actual number of IF statements possibly will be higher as two independent questions with four possible answers need three IF, and "five" refers to my actual IF...ELSE IF... construct, but for explicite algorithm details, I pester StackOverflow :-) I'd be happy with a sharper bound at the moment.)
Posed by Hauke Reddmann · co.combinatorics, computational-complexity
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-287774.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/mo-287774.lean
import Mathlib /-! # How many bits/questions does it take to identify the most frequent number in an array? Source: https://mathoverflow.net/questions/287774 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_mo_287774 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_mo_287774