Uniqueness of fit‑width solution

Define a fit‑width/fit‑height “point” to be the coordinates (a,b)(a, b) corresponding to a solution side‑length s.s.

Let (a,b)(a, b) a fit‑width point with minimal a.a. Prove there is no bbb' \ne b such that (a,b)(a, b') is a fit‑width point when r1r \ge 1 and (a,b)(a, b) corresponds to the best solution, meaning that sw>shs_w > s_h for all (ah,bh)(a_h, b_h) fit‑width points.

Here’s a self‑contained problem statement:

Let: r[1,),r \in [1, \infin),
nN\quad n \in \N (for this task N\N does not include 0),
W={(a,b)N2  |  nabarb},\quad W = \Set{ (a, b) \in \N^2 | n \le ab \land a \ge rb },
H={(a,b)N2  |  nabrba},\quad H = \Set{ (a, b) \in \N^2 | n \le ab \land rb \ge a },
(a,b)=arg min(a,b)Wa.\quad (a, b) = \argmin_{(a, b) \in W} a.
Assume bhH:a<rbh.\forall b_h \in H : a < rb_h.
Prove there exists no bbb' \ne b such that (a,b)W.(a, b') \in W.

Three hints are provided in case you get stuck; attempt to solve without them first, then try again, one more hint at a time. Don’t jump to the end directly.

Reveal first hint

Hint 1

Here are graphs for n=8,r=5n = 8, r = 5 and n=23,r=3.9:n = 23, r = 3.9:

Graph A Graph C

How do the fit‑width and fit‑height points compare in each of them?

Reveal second hint

Hint 2

By hint 1 a viable proof path is to show that if such a bb' exists then one can find a point (a,b)(a', b') which is fit‑height.

Try to prove that if bb' exists then specifically (a1,b)(a - 1, b') is fit‑height.

Reveal third hint

Hint 3

Attached are proof attempts from LLMs. They present various useful approaches but have subtle mistakes. Find these mistakes and use the proofs as inspiration for your own!

Proof 1

Courtesy of DeepSeek v4.

Setup

Let the fit‑width solution be (a,b)(a, b) where
b=n/ab = \lceil n/a \rceil and aa is the smallest integer satisfying arb.a \ge r\cdot b.
Its square side is sfw=w/a.s_{\text{fw}} = w/a.

A valid fit‑width solution with the same aa and side length sfws_{\text{fw}} uses the same aa and any row count bb' with

n/aba/r.\begin{gather*} \lceil n/a \rceil \le b' \le \lfloor a/r \rfloor. \end{gather*}

The algorithm picks the minimal b=b.b' = b.

Claim

If sfw>sfhs_{\text{fw}} > s_{\text{fh}} for every fit‑height solution, then there is no b>bb' > b with ba/r.b' \le a/r.
In other words, the feasible interval for bb' collapses to a single value b=a/r=n/a.b = \lfloor a/r \rfloor = \lceil n/a \rceil.

Proof

Assume, for contradiction, that such a bb' exists. Then b+1a/r,b+1 \le \lfloor a/r \rfloor, so

ar(b+1).\begin{gather*} a \ge r(b+1). \tag{1} \end{gather*}

Let k=a/r.k = \lfloor a/r \rfloor. Clearly kb+1.k \ge b+1.

Now examine the fit‑height condition for row count k:k:

n/krk.\begin{gather*} \lceil n/k \rceil \le r k . \end{gather*}

We know nabn \le a b from b=n/a.b = \lceil n/a \rceil. Thus

nkabkabb+1=aab+1.\begin{gather*} \frac{n}{k} \le \frac{a b}{k} \le \frac{a b}{b+1} = a - \frac{a}{b+1}. \end{gather*}

From (1), ab+1r,\displaystyle \frac{a}{b+1} \ge r, so

nkar.\begin{gather*} \frac{n}{k} \le a - r . \end{gather*}

Since rk>ar,r k > a - r, because k=a/r>a/r1,k = \lfloor a/r \rfloor > a/r - 1, we obtain

nk<rk.\begin{gather*} \frac{n}{k} < r k . \end{gather*}

Hence n/krk,\lceil n/k \rceil \le r k, i.e., kk satisfies the fit‑height condition.
The fit‑height algorithm will therefore find an optimal row count bfhka/r.b_{\text{fh}} \le k \le a/r.

Then

sfh=hbfhha/r=rha=wa=sfw,\begin{gather*} s_{\text{fh}} = \frac{h}{b_{\text{fh}}} \ge \frac{h}{a/r} = \frac{r h}{a} = \frac{w}{a} = s_{\text{fw}} , \end{gather*}

contradicting the strict optimality of the fit‑width solution.

Therefore, no such bb' can exist when the fit‑width solution is strictly better than all fit‑height solutions. The pair (a,b)(a,b) is the unique grid achieving the maximal square side length.

Proof 2

Courtesy of QED‑Nano, a tiny 4B open‑source model developed exclusively for math proofs.

Proof.

Define for each bNb \in N

f(b)=max{rb,nb}.\begin{gather*} f(b)=\max \Set{\left\lceil rb \right\rceil, \left\lceil \frac{n}{b} \right\rceil}. \end{gather*}

For a pair (a,b)N2(a,b) \in \N^2 we have

(a,b)W    arb and abn.\begin{gather*} (a,b) \in W \iff a \ge rb \text{ and } ab \ge n. \end{gather*}

Because a,ba,b are integers,

arb    arb ⁣,abn    anb.\begin{gather*} a \ge rb \iff a \ge \left\lceil rb \right\rceil\!, \brk[0]{\quad} \brk ab \ge n \iff a \ge \left\lceil \frac{n}{b} \right\rceil. \end{gather*}

Hence (a,b)W(a,b) \in W iff af(b).a \ge f(b).

By definition aw=min(a,b)Wa;a_w=\min_{(a,b) \in W}a; therefore

aw=minbNf(b).\begin{gather*} a_w=\min_{b \in N}f(b). \end{gather*}

Consequently for the fixed aw,a_w,

(aw,b)W    f(b)=aw.\begin{gather*} (a_w,b) \in W \iff f(b)=a_w. \end{gather*}

Thus the set we are interested in is exactly the set of minimizers of f.f.

1. A useful auxiliary integer

Set

b0=n/aw.\begin{gather*} b_0=\left\lceil n/a_w \right\rceil. \end{gather*}

Then b0n/aw,b_0 \ge n/a_w, so awb0n.a_wb_0 \ge n.
Because bwWb_w \in W we have bwn/aw;b_w \ge n/a_w; therefore

b0bw.\begin{equation} \tag{1} b_0 \le b_w. \end{equation}

From awrbwa_w \ge rb_w we obtain bwaw/r,b_w \le a_w/r, hence

bwawr.\begin{equation} \tag{2} b_w \le \left\lfloor \frac{a_w}{r} \right\rfloor. \end{equation}

Together (1)(1) and (2)(2) give

b0awr.\begin{equation} \tag{3} b_0 \le \left\lfloor \frac{a_w}{r} \right\rfloor. \end{equation}

The hypothesis aw<rbha_w < rb_h yields

awrbh1.\begin{equation} \tag{4} \left\lfloor \frac{a_w}{r} \right\rfloor \le b_h−1. \end{equation}

2. Lower bound for b0b_0

We prove that b0bh1.b_0 \ge b_h−1.

Assume, to the contrary, that b0bh2.b_0 \le b_h−2.
Then b0+1bh1<bh.b_0+1 \le b_h−1<b_h.

Because awa_w is the minimum of f,f, we have f(b0)aw.f(b_0) \ge a_w.
Now f(b0)=max{rb0,n/b0}.f(b_0)=\max \Set{\left\lceil rb_0 \right\rceil,\left\lceil n/b_0 \right\rceil}.
Since n/b0aw,n/b_0 \le a_w, we get n/b0aw;\left\lceil n/b_0 \right\rceil \le a_w; therefore the inequality f(b0)awf(b_0) \ge a_w forces

rb0aw.\begin{gather*} \left\lceil rb_0 \right\rceil \ge a_w. \end{gather*}

The last inequality implies rb0>aw1.rb_0>a_w−1. Adding r1r \ge 1 gives

r(b0+1)=rb0+r>aw1+raw.{r(b_0+1)}={rb_0+r}>{a_w−1+r \ge a_w}.

Let k=r(b0+1).k=\left\lfloor r(b_0+1) \right\rfloor. Because r(b0+1)>aw,r(b_0+1)>a_w, the integer aw<r(b0+1)a_w < r(b_0+1) cannot exceed the greatest integer r(b0+1);\le r(b_0+1); hence awk.a_w \le k. Consequently

awr(b0+1).\begin{gather*} a_w \le r(b_0+1). \end{gather*}

Moreover aw(b0+1)=awb0+awn+aw>n,a_w(b_0+1)=a_wb_0+a_w \ge n+a_w>n, so aw(b0+1)n.a_w(b_0+1) \ge n.

Thus (aw,b0+1)(a_w,b_0+1) satisfies both conditions of H;H; i.e. (aw,b0+1)H.(a_w,b_0+1) \in H.
But b0+1bh1<bh,b_0+1 \le b_h−1<b_h, contradicting the definition of bhb_h as the smallest second coordinate occurring in H.H.

Hence our assumption was false, and we must have

b0bh1.\begin{equation} \tag{5} b_0 \ge b_h−1. \end{equation}

3. Determining b0b_0 and bwb_w

From (3)(3) and (4)(4) we obtain b0bh1;b_0 \le b_h−1; together with (5)(5) this yields b0=bh1.b_0=b_h−1. Therefore

naw=bh1.\begin{equation} \tag{6} \left\lceil \frac{n}{a_w} \right\rceil = b_h−1. \end{equation}

Because of (1)(1) and (6)(6) we have bwbh1;b_w \ge b_h−1; together with (2)(2) and (4)(4) we get bwbh1.b_w \le b_h−1. Hence

bw=bh1.\begin{equation} \tag{7} b_w=b_h−1. \end{equation}

Finally (7)(7) and (4)(4) give bh1aw/r,b_h−1 \le \left\lfloor a_w/r \right\rfloor, while (4)(4) itself gives aw/rbh1;\left\lfloor a_w/r \right\rfloor \le b_h−1; thus

awr=bh1.\begin{equation} \tag{8} \left\lfloor \frac{a_w}{r} \right\rfloor = b_h−1. \end{equation}

4. Conclusion

For an integer b we have (aw,b)W(a_w,b) \in W exactly when

nawbawr.\begin{gather*} \left\lceil \frac{n}{a_w} \right\rceil \le b \le \left\lfloor \frac{a_w}{r} \right\rfloor. \end{gather*}

By (6)(6) and (8)(8) the left‑hand side equals the right‑hand side and both equal bh1.b_h−1.
Because of (7) this common value is precisely b_w. Consequently no other integer bbwb \ne b_w can satisfy the inequalities, i.e.

naw=raw=bw.\begin{gather*} \left\lceil \frac{n}{a_w} \right\rceil = \left\lfloor ra_w \right\rfloor = b_w. \end{gather*}

Hence there is no bbwb \ne b_w with (aw,b)W.(a_w,b) \in W.

Proof 3

Another attempt from DeepSeek.

Proof

Assume the fit‑width solution (a,b)(a,b) is strictly optimal, meaning its square side sfw=w/as_{\text{fw}} = w/a is larger than the side of every fit‑height solution.

Why the converse (alternative grids) cannot happen under strict optimality

If a b>bb' > b existed with ba/r,b' \le a/r, then b+1a/r.b+1 \le \lfloor a/r \rfloor. One can show this forces the existence of a fit‑height solution with side w/a,\ge w/a, contradicting strict optimality. In practice, however, the simpler box argument above already forbids the existence of any such bb' when r>1.r>1.

Reveal solution

My proof

Assume towards a contradiction there exists bbb' \ne b such that (a,b)(a, b') is a fit‑width point. Without loss of generality, we can further assume b<b.b < b'. Using the definition of a fit‑width point and the minimality of aa we can write aa in terms of bb':

nabarb    anbarb    a=max{nb,rb}{n \le ab' \land a \ge rb'} \implies {a \ge \left\lceil \frac{n}{b'} \right\rceil} \land {a \ge \left\lceil rb' \right\rceil} \implies a = \max \Set{ \left\lceil \frac{n}{b'} \right\rceil, \left\lceil rb' \right\rceil }

Suppose that a=nb.a = \left\lceil \frac{n}{b'} \right\rceil. Since we have nabn \le ab by definition, and assumed b<bb < b' and r1r \ge 1:

a1<nb    b(a1)<ab    (bb)a<b    a<rb{a - 1 < \frac{n}{b'}} \implies {b'(a - 1) < ab} \implies {(b' - b)a < b'} \implies {a < rb'}

But arba \ge rb' so we’ve reached a contradiction. Therefore, together with the first result:

anb    nb<rb=a    nbrb{a \ne \left\lceil \frac{n}{b'} \right\rceil} \implies {\left\lceil \frac{n}{b'} \right\rceil < \left\lceil rb' \right\rceil = a} \implies {\left\lceil \frac{n}{b'} \right\rceil \le \left\lfloor rb' \right\rfloor}

Choose any integer a[nb,rb]a' \in \left[\left\lceil \frac{n}{b'} \right\rceil, \left\lfloor rb' \right\rfloor\right]: the point (a,b)(a', b') is by definition fit‑height (real example in second graph from Hint 1). But then, since for this one fit‑height point sh=hbs_h = \frac{h}{b'}:

arb    swsh\begin{align*} a \ge rb' \implies s_w \le s_h \end{align*}

In conclusion, bbb' \ne b contradicts sw>sh,s_w > s_h, thus bb' can’t exist and (a,b)(a, b) is unique.

Thoughts on the LLMs’ performance

Using the prompt in a fresh conversation:

let r in [1, inf).
let n natural non‑zero.
let W = { (a,b) in N² | n <= ab and a >= rb }.
let H = { (a,b) in N² | n <= ab and rb >= a }.
let (a_w, b_w) = \argmin_{(a,b) in W} a.
let (a_h, b_h) = \argmin_{(a,b) in H} b.
assume a_w < rb_h.
prove that there exists no other b ≠ b_w such that (a_w, b) is in W.

All current frontier models managed to prove the statement correctly (don’t click on links if you didn’t solve yet):

DeepSeek’s two failed proofs are part of a much greater conversation and used a more ambiguous prompt. It had a lot more context: the algorithm’s code, its complexity analysis, the graph representation, the terminology. This seems to have hurt its performance.

The prompt itself was built such that QED‑Nano managed to output a response. If any ambiguities were present it would “overthink” them and wouldn’t make meaningful progress beyond continuously reanalyzing the problem statement. Running QED‑Nano with smaller context (8k is all I could run locally), resulted in it forgetting about the initial problem and proving unrelated statements (e.g. that there are a,b,cNa, b, c \in \N such that a3+b3=c3,a^3 + b^3 = c^3, lol). I paid vast.ai 5$ to run it using the biggest supported context, which required ~46GB of VRAM.

That being said, QED‑Nano did prove the statement with a very minor push in a second prompt. The approach is equivalent to DeepSeek’s, with even more verbose writing. The cause for verbosity is not redundancy but derivations of intermediary results through alternative more inefficient methods.

I’ve also tried ChatGPT 5.5 Thinking Mini with the same prompt. After a failed proof which didn’t use the aw<rbha_w < rb_h assumption and some subsequent corrective prompts, it concluded that:

As it stands, I cannot honestly provide a correct proof because the crucial implication needed for the contradiction is not derivable from the assumptions you gave.

Such hubris!

>