Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions problems/balanced-shuffle-square-gap/README.md
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 11 additions & 0 deletions problems/balanced-shuffle-square-gap/problem.lean
Original file line number Diff line number Diff line change
@@ -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)