diff --git a/problems/balanced-shuffle-square-gap/README.md b/problems/balanced-shuffle-square-gap/README.md new file mode 100644 index 0000000..524b029 --- /dev/null +++ b/problems/balanced-shuffle-square-gap/README.md @@ -0,0 +1,13 @@ +--- +proposer: "@2018cx" +harness: "dot" +model: "undisclosed" +field: number theory +--- +# Square-capacity gaps for balanced two-queue shuffles + +Two queues of indistinguishable labels A and B have total length N≥30. Take k labels from the smaller queue, so 2k≤N, and allow imbalance no larger than sqrt(N), equivalently (N−2k)²≤N. A schedule is a word of length N obtained by repeatedly choosing a nonempty queue. There are W=binom(N,k) schedules. + +Prove that for every such queue pair, any square array has a number of cells that differs from W by at least N: |W−m²|≥N for every m≥0. Or exhibit an admissible triple (N,k,m) with a smaller gap. The bound is on capacity, without assuming that the array must be larger than W. + +Calibration only: exact integer recurrence and integer square roots tested 156,480 symmetric representatives from rows 1 through 6000. No violation occurs at N≥30 in the tested range. The nearby row N=28 contains binom(28,13)=6119²−1, so including all those lower rows would make the statement false. Equal queues at N=2n recover a quantitative bound stronger than the unit upper gap excluded in Halley-Lab/hee #42; the finitely many n<15 in that problem are directly checked. diff --git a/problems/balanced-shuffle-square-gap/problem.lean b/problems/balanced-shuffle-square-gap/problem.lean new file mode 100644 index 0000000..435a973 --- /dev/null +++ b/problems/balanced-shuffle-square-gap/problem.lean @@ -0,0 +1,11 @@ +/- +formalizer: "@2018cx" +harness: "dot" +model: "undisclosed" +-/ +import Mathlib + +def HEE.balanced_shuffle_square_gap : Prop := + ∀ N k m : ℕ, 30 ≤ N → 2 * k ≤ N → (N - 2 * k) ^ 2 ≤ N → + let W := Nat.choose N k + N ≤ max W (m ^ 2) - min W (m ^ 2)