### How many squares? - September 1995

Next project || Previous project || Contents || All projects

If you connect (0,0) to (5,3) with a line segment, it goes through seven unit squares. If you connect (0,0) to (p,q) where p and q are positive whole numbers, how many squares do you go through? Experiment, look for patterns, and summarize your findings.

[My thanks to Henri Picciotto (hot@SOE.Berkeley.Edu) for contributing this problem.]

Annie says:

Here is the winner of the Project of the Month for September. First, however, a few general comments about the Project of the Month and what we're looking for in an answer.

This month's winner was relatively easy to select - only one person submitted an correct general solution that included any explanation at all! When you're submitting a solution to the Project of the Month, remember that a lot of other students are going to submit correct responses, and what will make your solution stand out is your explanation. I received a couple of responses that included the general form of the answer, but they included no explanation at all! Not even examples. Even if you're the only person getting the general case, if you don't have an explanation, you aren't going to win around here.

When dealing with a problem like this, it is important to test all the different cases. Here, since we're dealing with numbers, and pairs of numbers, this means numbers that are different, numbers that are the same, and numbers that are multiples of each other. Otherwise you don't cover all of the cases.

This is like when you're dealing with triangles, to make sure something is always true you must test acute, scalene, isosceles, equilateral, and obtuse triangles and make sure it always holds.

In a problem such as this one, when you find a "rule" and exceptions (i.e. when p=q something else happens), see if you can find a new "rule" to fit both the original and the exception. A lot of people found answers that worked in all cases, but they had two or three equations to cover all the cases, instead of one general equation. See if you can figure out how to make one equation that covers all the rest of them.

So here is the winning solution this month. September's Winner is Kent Cheung, a student at Nathan Hale High School in Seattle. A few specific comments follow.

From: be301@scn.org Subject: POM September

Kent Cheung Nathan Hale High School, Seattle, Washington

Question:

```# squares crossed:         1     3     5     7     9     11     13...
---------------------------------------------------------------------
possible endpoints:      (1,1) (1,3) (1,5) (1,7) (1,9 ) (1,11) (1,13)
(3,5) (3,7 ) (3,9?) (3,11)
(5,7 ) (5,9 )

# squares crossed:         2     4     6     8     10    12   ...
-----------------------------------------------------------------
possible endpoints:      (1,2) (1,4) (1,6) (1,8) (1,10) (1,12)
(2,3) (2,5) (2,7) (2,9 ) (3,10)
(3,4) (4,5) (3,8 ) (4,9 )
(4,7 ) (5,8 )
(5,6 ) (6,7 )
```
The above seem to suggest that for any endpoints with coordinates (p,q), the line connecting this point and the origin will cross (p + q - f) number of square units, where f = the greatest common factor of p and q.

For example, a line connecting the origin and the enpoint with coordinates (3,9) would cross (3+9)-3 , or 9, square units.

*****************************************************

COMMENTS: Kent shows a number of examples that gives an idea of how he explored the problem. He also provides an example at the end using the formula he found. I would like to see a little bit more about how he reached that conclusion based on the data he generated, and also I'd like to see more examples where the numbers are the same or are multiples of each other. I imagine he explored those, but it would be good to see some evidence of that.

- Annie