I Want Me More Unit Squares

Denote U ( s ) U(s) as a function of the maximum number of unit squares that can be formed in a rectangular grid with semiperimeter s s where s Z + { 1 } s\in \mathbb Z^+\setminus\{1\} (for example, U ( 6 ) = 9 U(6)=9 ). Find U ( 153 ) U(153) .

Clarification:

  • Unit square is a square with side 1.

This is one part of Quadrilatorics .


The answer is 5852.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Chew-Seong Cheong
Dec 29, 2016

Let the two sides of the grid (rectangle) be a a and b b , then the semiperimeter s = a + b s=a+b and the number of unit squares n = a b n=ab . Without loss of generality, let us assume b a b \ge a and their difference b a = d b-a=d , so that d 0 d \ge 0 . Then, we have:

s = a + b = a + a + d = 2 a + d a = s d 2 b = s + d 2 n = a b = s d 2 × s + d 2 = s 2 d 2 4 = s 2 ( b a ) 2 4 \begin{aligned} s & = a+b = a+a+d = 2a + d\\ \implies a & = \frac {s-d}2 \\ \implies b & = \frac {s+d}2 \\ \implies n & = ab = \frac {s-d}2 \times \frac {s+d}2 = \frac {s^2-d^2}4 = \frac {s^2-(b-a)^2}4 \end{aligned}

This means that for a particular s s the smaller the difference d = b a d =b-a , the largest the n n . For s = 153 s=153 , the smallest d d occurs when b = 57 b=57 and a = 56 a=56 and d = 57 56 = 1 d=57-56=1 , then U ( 153 ) = 15 3 2 1 4 = 5852 U(153) = \dfrac {153^2-1}4 = \boxed{5852} .

Kenneth Tan
Jul 12, 2018

In general, suppose the width of the grid is a a , the height of the grid is b b , and the semiperimeter of the grid is s = a + b s=a+b . Then the number of unit squares in this a × b a\times b grid is a b ab .

We have 2 cases:

Case 1: s s is even.

When s s is even, then one of a a , b b must be greater than or equal to s 2 \frac{s}{2} while the other must be smaller than or equal s 2 \frac{s}{2} (they cannot be both greater than s 2 \frac{s}{2} because a + b a+b would be greater than s s , they cannot be both smaller than s 2 \frac{s}{2} either because a + b a+b would be smaller than s s ). Without loss of generality, let's suppose that a = s 2 + d a=\frac{s}{2}+d , b = s 2 d b=\frac{s}{2}-d ( d < s 2 , d Z + { 0 } ) (d<\frac{s}{2},\,d\in\mathbb{Z^+}\cup\{0\}) . Then a b = ( s 2 + d ) ( s 2 d ) = s 2 4 d 2 s 2 4 \begin{aligned}ab&=\left(\frac{s}{2}+d\right)\left(\frac{s}{2}-d\right) \\ &=\frac{s^2}{4}-d^2 \\ &\leqslant\frac{s^2}{4}\end{aligned}

From this we know that the maximum value of a b ab for even s s is s 2 4 \frac{s^2}{4} , equality can be achieved if and only if d = 0 a = b = s 2 d=0\implies a=b=\frac{s}{2} .

Case 2: s s is odd.

When s s is odd, then one of a a , b b must be greater than or equal to s + 1 2 \frac{s+1}{2} while the other must be smaller than or equal s 1 2 \frac{s-1}{2} (for the same reason, they cannot be both greater than s 2 \frac{s}{2} because a + b a+b would be greater than s s , and they cannot be both smaller than s 2 \frac{s}{2} because a + b a+b would be smaller than s s ). Without loss of generality, let's suppose that a = s + 1 2 + d a=\frac{s+1}{2}+d , b = s 1 2 d b=\frac{s-1}{2}-d ( d < s 1 2 , d Z + { 0 } ) (d<\frac{s-1}{2},\,d\in\mathbb{Z^+}\cup\{0\}) . Then a b = ( s + 1 2 + d ) ( s 1 2 d ) = s 2 1 4 d 2 s 2 1 4 \begin{aligned}ab&=\left(\frac{s+1}{2}+d\right)\left(\frac{s-1}{2}-d\right) \\ &=\frac{s^2-1}{4}-d^2 \\ &\leqslant\frac{s^2-1}{4}\end{aligned}

From this we know that the maximum value of a b ab for odd s s is s 2 1 4 \frac{s^2-1}{4} , equality can be achieved if and only if d = 0 a = s + 1 2 , b = s 1 2 d=0\implies a=\frac{s+1}{2},\,b=\frac{s-1}{2} .

Therefore,

U ( s ) = { s 2 4 , if s is even s 2 1 4 , if s is odd U(s)=\begin{cases}\dfrac{s^2}{4},\quad\text{if }s\text{ is even} \\ \dfrac{s^2-1}{4},\quad\text{if }s\text{ is odd}\end{cases}

Now, evaluating U ( 153 ) U(153) , since 153 153 is odd, we have U ( 153 ) = 15 3 2 1 4 = 5852 U(153)=\frac{153^2-1}{4}=5852 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...