Problem Solving and Computing (CSC-103 98S)

[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Journal] [Problems] [Computing] [SamR Docs] [Tutorial] [API]

# Resolutions for Problem Set 3

1. Triangles on the chessboard

How many unique triangles can we draw on the chessboard if each corner of every triangle must fall at the corner of a square on the chessboard?

Hmmm ... that's an interesting question. One possibility would be to pick triples of corners and build triangles from them. Can I count all triples of triangles? Sure.

There are 81 different "corners" on the chessboard. Why? I drew a picture and it made sense. I noted that to draw a chessboard on a graph paper with the lower-left corner of the lower-left square bordering the origin, then

• the lower-left square has corners at (0,0), (1,0), (1,1), and (0,1);
• the lower-right square has corners at (7,0), (8,0), (8,1), and (7,1);
• the upper-left square has corners at (0,7), (1,7), (1,8), and (0,8);
• the upper-right square has corners at (7,7), (7,8), (8,7), and (8,8).

Hence, the horizontal points run from 0 to 8 inclusive and the vertical points run from 0 to 8 inclusive. That gives me a 9x9 grid, with 81 points.

Does that help me count triangles?

• I might choose any of those 81 for the first corner of my triangle.
• I might choose any of the remaining 80 for the second corner of my triangle.
• I might choose any of the remaining 79

That gives 81*80*79.

Check. Will all of those triangle be unique? No, this would count separately the triangle [(0,0), (1,1), (1,2)] and the triangle [(1,1), (0,0), (1,2)]. Both triangles are the same. How many such repetitions will I have? Well, there are six variants of every set of three vertices.

That gives 81*80*79/6. Or 85320.

Check. Will all of those be triangles? No, not if the three corners are on a straight line (horizontal, vertical, or diagonal). I'll need to remove those.

How many sets of three points fall on the first line? I can choose eight values for the first point, seven values for the second point, and six values for the third point. That's 8*7*6. Again, I'm counting the same triple in multiple ways, so I'll divide by 6.

Now, this same analysis applies for every row and every column. I'm getting close. There are 16 such rows and columns, yielding 16*8*7*6/6 = 896 "horizontal" and "vertical" triangles.

We're now down to 85320 - 896 = 84451 triangles.

What about the diagonals? There are two diagonals with nine points. Each of these has 9*8*7/6 of the diagonal triangles we want to ignore. That's another 168 we want to ignore. There are four diagonals with eight points. That's another 4*(8*7*6/6) = 224 to ignore. There are four diagonals with seven points. That's 4*(7*6*5/6) or 140 diagonal triangles we want to ignore. There are four diagonals with six points. That's 4*(6*5*4/6) or 80 we want to ignore. There are four diagonals with five points. That's 4*(5*4*3/6) = 40 more to ignore. There are four diagonals with four points. That's 4*(4*3*2/6) = 16 more to ignore. There are four diagonals with three points. That's 4*(3*2*1/6) = 4 more to ignore. The total number of points on normal diagonals is 168 + 224 + 140 + 80 + 40 + 16 + 4 = 672 to ignore.

We're now down to 84451 - 672 = 83779 triangles.

Have we eliminated all the illegal triangles? Unfortunately, no. We haven't gotten ones on "uneven" diagonals, like [(0,0),(1,2),(2,4)].

Frustrated! It's clear that we could continue eliminating illegal triangles from our counting, but it will be time consuming and difficult.

Does anyone have any other ideas?

Reflect. Counting seemed like a good idea to start with, but led to too many special cases. It would be nice to find a way to avoid such special cases.

How many unique triangles can we draw on the chessboard if each corner of every triangle must fall at the corner of a square on the chessboard, one edge of each triangle must be horizontal, and one edge of each triangle must be vertical.

Can we do a similar counting analysis? We pick a point as a "starting" corner. There are 81 possible "starting" corners. The next point we pick will be on the same horizontal line as the starting corner. There are eight such possible points. The final point we pick must be on the same vertical line as the starting corner. There are eight such possible points. This gives us 81*8*8 = 5184 different triangles.

Check. Are any of these duplicates (permutations of points)? No, it doesn't seem so. Why not? The second point must be horizontally aligned with the first point and the third point must be vertically aligned with the first point. If we permute the points, we lose this property. (Or at least I think we do.)

Reflect. Well, it does seem that counting works in some cases. This type of counting made it particularly easy.

How many unique triangles can we draw on the chessboard if each corner of every triangle must fall at the corner of a square on the chessboard, one edge of each triangle must be horizontal, one edge of each triangle must be vertical, and the horizontal and vertical edges of each triangle must be of equal length?

Can we count again? Let's see, if we pick a random point, we can then pick a corresponding horizontal and vertical point to make a triangle, ensuring that they're of equal distance. There are 81 starting points. How many different pairs are there? Whoops, it depends on our starting point (or at least it seems to). Stuck!

Okay, let's try an alternate tact. Aha! We know there are 204 "squares" on the chessboard because of a previous exercise. We can make four triangles that meet the criteria given above from each square. Hence there are 4 * 204 or 816 such triangles.

Check. Am I sure that there are four triangles that meet the criteria for each square? Yes, it seems that there are. I need to use three of the four corners and eliminate duplicates, so I can get 4*3*2/6 = 4 different triangles. Are there any triangles that meet the criteria that don't fall within a square? Well, each such triangle has two equal edges that are horizontal and vertical. We can "connect them" appropriately to make a square that must fall on the chessboard. So there are no such triangles.

Reflect. Counting points failed us again. Oh well, it seems that even for seemingly related questions we need to employ different strategies. I found it a little bit difficult to check this final answer, because it seemed so obvious to me. However, I did think more about the problem as I asked myself "what do I need to ask myself about this solution?"

2. Three generations

This is one of those problems that it seems reasonable to solve by creating a number of variables and writing down a series of equations.

• F - my father's current age
• I - my current age
• S - my son's age
• X - my son's age when I'm older

What relationships do we know?

• My father is five times as old as my son is now (not quite as how it's stated, but the same meaning).
• `F = 5*S`.
• By then my son will be eight years older than I am now.
• `X = I + 8`.
• By then my son will have aged as much as I have (implicit from the problem).
• `X - S = F - I`.
• The combined ages of my father and myself are 100 years.
• `F + I = 100`.

First, we'll combine the second and third equations.

• `S + F - I = I + 8`.

The first and last equations involve F, so we'll write the other values in terms of F.

• `S = F/5`
• `I = 100 - F`

We can now plug those into the hybrid equation, deriving

• `F/5 + F - (100-F) = 8 + (100-F)`

Let's simplify.

• `F/5 + F - 100 + F = 8 + 100 - F`
• `F/5 + F + F + F = 8 + 100 + 100`
• `16/5*F = 208`
• `F = 206 * 5/16`
• `F = 65`

We can now derive the other ages. S = F/65 = 13. I = 100-65 = 35. Certainly a reasonable set of ages.

Check. If we solved all the equations correctly, it shouldn't be necessary to formally verify our answers. However, I'm suspicious.

• My father is five times older than my son. 5*13 = 65. Good.
• When I am as old as my father (in 30 years), my son will be eight years older than I am now. In 30 years, my son will be 43. 43-35 = 8. Yup, he'll be eight years older.
• Our combined ages are 100. 35 + 65 = 100. Yay.

Reflect. This was a word problem, and I'm used to solving word problems by writing down formulae. I didn't find this a particularly thrilling exercise, but it's nice to know that I can get some things right the first time. I also noticed that the phrasing on some parts of the problem were intentionally tricky (e.g., "When I am as old as my father is now, I shall be five times as old as my son is now" could be much more succinctly phrased as "My father is five times as old as my son").

Could I have solved this another way?

Aha! I can guess that all of the ages will be whole numbers because problems like this tend to have whole number solutions (almost no one says that they are "64.35 years old"). That means that my father's age must a multiple of 5. If we're going to have a decent range of ages, he must be at least 60 (which would make me 40) and probably less than 80 (which would make me 20 and my son 16). That gives me only four ages to test: 60, 65, 70, and 75.

• If my father's 60, then I'm 40 and my son is 12. In 20 years, my son will be 32. That's not old enough.
• If my father's 65, then I'm 35 and my son is 13. In thirty years, my son will be 43, which is eight years older than I am now. That seems correct.
• If my father's 70, then I'm 30 and my son is 14. Boy, I was young when I had a kid. In forty years, my son will be 44, which is 14 years older than I am now. Nope.
• If my father's 75, then I'm 25 and my son is 15. Doubtful.

Check. Since I've already checked the 65/35/13 answer, I know it's correct.

Reflect. Although this did not involve formal mathematical techniques, I was able to find a correct answer relatively quickly. I found this a more enjoyable solution because I was able to use other knowledge. However, I worry that this type of solution won't be practical for more general problems, since most real world problems don't have such nice answers.

3. Division by 9

Where do I start? Well, I might start by considering some sample values. Is 9 divisible by 9? Certainly. Do the digits add up to 9? Yes. Are any other one digit numbers divisible by 9? None that I know of.

Which two digit numbers are divisible by 9? 9*2 = 18. 8+1 = 9. 9*3=27. 2+7 = 9. 9*4 = 36. 3+6 = 9. Looking good.

Let's pick a "random" three digit number whose digits sum to 9: 234. 234 = 20*9 + 54. 54 is divisible by 9. Cool. How about 513? Let's see, that's 50*9 + 63. 63 is divisible by 9. Great.

Let's go up to four digits and see what we learn. 7326 has digits that sum to 9. That's 9*800 + 126. That's 800*9 + 10*9 + 36. That's 800*9 + 10*9 + 4*9. So 7326 = 814*9.

Have I learned anything by doing this? Yes, that the claim is true. Does it give me a clue as to how I "prove" this? Not really. Stuck!

Have I seen similar problems? Yes, in the divisibility by eleven problem, I found it useful to "letter" the individual digits. For example, I might represent a one digit number as `A`, a two digit number as `BA`, a three digit number as `CBA` and so on and so forth. Let's work with a four digit number to start with.

`DCBA` = D*(10)^3 + C*(10)^2 + B*(10)^1 + A*(10)^0. Hmmm ... I know that 10 is 9 + 1. So, that's

• D*(9+1)^3 + C*(9+1)^2 + B*(9+1)^1 + A

Does that help? Well, I can try to separate out all the nines, but that looks difficult. Aha! Perhaps I just need to remove one 9 from each term.

• D*(9+1)*10^2 + C*(9+1)*10^1 + B*(9+1) + A.

Does that help? Well I can factor out a 9.

• 9*(D*10^2 + C*10^2 + B*10) + D*10^2 + C*10 + B + A

When is that evenly divisible by 9? When D*10^2 + C*10 + B + A is evenly divisible by 9. But we can use the same analysis!

• D*10^2 + C*10 + B + A
• D*(9+1)*10 + C*(9+1) + B + A
• 9*(D*10 + C) + D*10 + C + B + A

When is that evenly divisible by 9? When D*10 + C + B + A is evenly divisible by 9! Again, we can do something similar.

• D*10 + C + B + A
• D*(9+1) + C + B + A
• D*9 + D + C + B + A

When is that evenly divisible by 9? When D + C + B + A is evenly divisible by 9! But that's what we wanted to prove!. So, DCBA is evenly divisible by 9 when D + C + B + A is evenly divisible by 9.

Check. My analysis seems pretty good. If this were a more advanced course, I might attempt a proof by induction on the number of digits in the number, but that's not necessary here. A casual note that the technique given above works for any size number seems like enough.

Reflect. I'll admit that I feel pretty good about solving this problem. Many years ago, I took number theory and received this question on an exam. I struggled with it then and came up with a solution that I recall as being less good than this one is now.

Check. Have I answered all of the question? No, there's a generalization part to the question. Is this attribute ("sum of the digits divisible by X means number divisible by X") true for any other number? I know from experience that it's true for 3, and it's likely that I'd "prove" it the same way. It's also true for 1, but light of the fact that every number is evenly divisible by 1. It's not true for 2, since 11 isn't divisible by 2. It's not true for 4, since 13 isn't divisible by 4. It's not true for 5, since 14 isn't divisible by 5. It's not true for 6, since 15 isn't divisible by 6. It's not true for 7. It's not true for 8.

So, it's only true for 1, 3, and 9.

Reflect. This is actually a useful fact to know (or at least I pretend that it is). It gives me a clue, up front, when I want to start considering the factors of a big number.

4. Counting faces

My initial temptation was to try to draw the figure. Stuck! I can't draw in "text format". Actually, I also found that I wasn't very good at drawing or thinking about three dimensional figures when trying to draw them two-dimensionally. My notes say "I can't draw." "I can't visualize in two-space." Stuck!

Okay, it's a three-dimensional object, let's try to build it. I sat down and cut out some triangles and started to think about how to put them together. I couldn't find a systematic way to put them together. Stuck!

I suppose that I should think about examples, but perhaps I need to look at the problem from another perspective. Aha! I can simply count appropriate things, just as in the languages student problem. We'll count the number of "triangle corners" that are described in the problem.

There are six vertices that contribute to four triangles each. That gives us 24 corners. There are three vertices that contribute to six triangles each. That gives us 18 corners. That's 42 corners total. Each triangle requires three corners, so we have 14 triangles.

Check. Hmmm ... there's still no figure that I can check. Does my solution make sense? According to my understanding of "contribute" it seems to.

Reflect. I feel as if I'm not very good at checking. Once I get a solution, it seems "obvious" to me and I can't always find something to question/verify. This is clearly a skill that I need to work on. I also find it frustrating that my solution doesn't help me visualize the answer. It strikes me that this would be an interesting solid and I'd like to see that solid.

5. A surprising sphere

Who cares.

6. Changing the base

What's the area? 1/2 * base * height. What's the height? Well, it's the third edge in a 5 * 13 * X right triangle, where 13 is the hypotenuse. In another one of my classes, I determined that the third side must be 12. (It relates to Fermat's last theorem.) So, the area is 60. Pictorially,

```    /|\
13 / | \ 13
/  |12\
/   |   \
---------
5   5
```

Can I get another triangle of the same height? Yes, by "rotating" the two subtriangles so that the base is of size 24 and the height is 5.

```|\
| \
|12\ 13
|   \
|----  5
|   /
|12/
| /
|/
```

Check. Is the area of this second triangle 60? 5*24/2 = 60. Is it a triangle? It certainly seems to be.

Reflect. I was helped in this problem by my recollection of "stupid math facts". In particular, at some point in my life I memorized at least two right triangles with integer size side lengths (3,4,5 and 5,12,13). The appearance of 13 and 5 helped remind me of the third. In order to get the 5 in there, I had to split the triangle in half, which led me to think about redrawing it another way. Again, I'd like to work on a more formal check.

7. Indirect directions

In every case, the animal seems to walk two miles in order to get one mile East. As the "distance before turning" gets shorted and shorter, the path the animal takes gets closer and closer to a straight line. Yet the distance is always two, even though the length of the straight line is one.

Check. This doesn't seem to make sense. But Mr. Imig says it's the case, and he seems to know :-)

Reflect. Like Zeno's paradox, this is confusing with no good underlying intuition.

[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Journal] [Problems] [Computing] [SamR Docs] [Tutorial] [API]

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.