Skip to main content

2007 AIME II Problem 8

Problem 8 of 15IntermediateAlgebraNumber TheoryProblem-Solving Techniques

A rectangular piece of paper measures 44 units by 55 units. Several lines are drawn parallel to the edges of the paper. A rectangle determined by the intersections of some of these lines is called basic if (i) all four sides of the rectangle are segments of drawn line segments, and (ii) no segments of drawn lines lie inside the rectangle. Given that the total length of all lines drawn is exactly 20072007 units, let NN be the maximum possible number of basic rectangles determined. Find the remainder when NN is divided by 1000.1000.

Your answer

Integer from 0 to 999
Show solution

Solution

Suppose hh of the drawn lines have length 44 and vv have length 5,5, so 4h+5v=2007.4h + 5v = 2007. A basic rectangle is bounded by two adjacent lines in each direction, so the lines determine (h−1)(v−1)(h - 1)(v - 1) basic rectangles. Setting x=h−1x = h - 1 and y=v−1,y = v - 1, we must maximize xyxy subject to 4x+5y=1998.4x + 5y = 1998. As a function of x,x, the product xy=x⋅1998−4x5xy = x \cdot \frac{1998 - 4x}{5} is a downward parabola with vertex at x=9994=249.75.x = \frac{999}{4} = 249.75. For yy to be an integer we need 4x≡1998(mod5),4x \equiv 1998 \pmod 5, i.e. x≡2(mod5).x \equiv 2 \pmod 5. The nearest candidates are x=247x = 247 (giving y=202y = 202 and product 4989449894) and x=252x = 252 (giving y=198y = 198 and product 4989649896). So N=49896,N = 49896, and the remainder upon division by 10001000 is 896.896.
AoPS wiki

Tagged: optimization · quadratic · modular arithmetic

More practice