Denote U ( s ) as a function of the maximum number of unit squares that can be formed in a rectangular grid with semiperimeter s where s ∈ Z + ∖ { 1 } (for example, U ( 6 ) = 9 ). Find U ( 1 5 3 ) .
Clarification:
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.
In general, suppose the width of the grid is a , the height of the grid is b , and the semiperimeter of the grid is s = a + b . Then the number of unit squares in this a × b grid is a b .
We have 2 cases:
Case 1: s is even.
When s is even, then one of a , b must be greater than or equal to 2 s while the other must be smaller than or equal 2 s (they cannot be both greater than 2 s because a + b would be greater than s , they cannot be both smaller than 2 s either because a + b would be smaller than s ). Without loss of generality, let's suppose that a = 2 s + d , b = 2 s − d ( d < 2 s , d ∈ Z + ∪ { 0 } ) . Then a b = ( 2 s + d ) ( 2 s − d ) = 4 s 2 − d 2 ⩽ 4 s 2
From this we know that the maximum value of a b for even s is 4 s 2 , equality can be achieved if and only if d = 0 ⟹ a = b = 2 s .
Case 2: s is odd.
When s is odd, then one of a , b must be greater than or equal to 2 s + 1 while the other must be smaller than or equal 2 s − 1 (for the same reason, they cannot be both greater than 2 s because a + b would be greater than s , and they cannot be both smaller than 2 s because a + b would be smaller than s ). Without loss of generality, let's suppose that a = 2 s + 1 + d , b = 2 s − 1 − d ( d < 2 s − 1 , d ∈ Z + ∪ { 0 } ) . Then a b = ( 2 s + 1 + d ) ( 2 s − 1 − d ) = 4 s 2 − 1 − d 2 ⩽ 4 s 2 − 1
From this we know that the maximum value of a b for odd s is 4 s 2 − 1 , equality can be achieved if and only if d = 0 ⟹ a = 2 s + 1 , b = 2 s − 1 .
Therefore,
U ( s ) = ⎩ ⎪ ⎨ ⎪ ⎧ 4 s 2 , if s is even 4 s 2 − 1 , if s is odd
Now, evaluating U ( 1 5 3 ) , since 1 5 3 is odd, we have U ( 1 5 3 ) = 4 1 5 3 2 − 1 = 5 8 5 2 .
Problem Loading...
Note Loading...
Set Loading...
Let the two sides of the grid (rectangle) be a and b , then the semiperimeter s = a + b and the number of unit squares n = a b . Without loss of generality, let us assume b ≥ a and their difference b − a = d , so that d ≥ 0 . Then, we have:
s ⟹ a ⟹ b ⟹ n = a + b = a + a + d = 2 a + d = 2 s − d = 2 s + d = a b = 2 s − d × 2 s + d = 4 s 2 − d 2 = 4 s 2 − ( b − a ) 2
This means that for a particular s the smaller the difference d = b − a , the largest the n . For s = 1 5 3 , the smallest d occurs when b = 5 7 and a = 5 6 and d = 5 7 − 5 6 = 1 , then U ( 1 5 3 ) = 4 1 5 3 2 − 1 = 5 8 5 2 .