A Pythagorean triple is a set of three positive integers which could be the side lengths of a right triangle - popularly known as *a ^{2} + b^{2} = c^{2}*. Some folks remember {3, 4, 5}, {5, 12, 13}, and {8, 15, 17}. Others might know {20, 21, 29}.

It turns out that every natural number greater than two is part of at least one Pythagorean triple! Enter a number between 3 and 999, then press the button to see its triples. The program finds triples for your number as *a* or *b, *not *c*. Check out the "Making Triples" to see how it's done.

Enter your number:

]]>

Here's a riddle from a friend's website - "You have twelve billiard balls. Eleven of them are normal and have exactly the same weight, but one may be a little heavier or lighter than the rest. Unfortunately, you don't know which ball is the bad one, and you don't know whether it's too heavy or too light. In fact, there may not be a bad ball at all. Can you determine which ball, if any, is not normal, with no more than three tests on a balance scale?"

A balance scale has two dishes to hold things. If the things in each dish weigh exactly the same, the scale balances. Otherwise, it shows which side is heavier.

- Do you already know how to solve the problem?
- Does it seem like a problem you've already solved?
- Try out a few ideas, but don't get bogged down. It's a hard problem.

Let's try a simpler problem - "You have five billiard balls, and you know one of them is too heavy. The rest all weigh the same. How many tests with a balance scale do you need to find the odd ball?"

If that's still too hard, try it with only two or three balls.

Try it out.

If you have a balance scale, great! Find four things that weigh the same and one that's heavier. Try five numbered envelopes, four with a penny and one with a quarter. See if you can figure out the heavy one by just using the scale.

If you don't have a scale, get creative. Take five playing cards or numbered pieces of paper. Have a partner pick one of them as the "heavy" without telling you which. You can put the cards you want to test into two piles, and your partner either points to the heavy pile or says "Balance!".

Remember that you don't have to use all the "balls" every time. Weighing two balls against three probably wouldn't help much.

- How many tests do you need? Are you sure that's always enough?
- Can you explain your method so that someone else can do it?
- Can you explain why your method works?
- Could someone do it with fewer tests? Are you sure? Can you explain why a solution with fewer tests is impossible?

If you get stuck try something - try anything. Put one or two balls one each side. You have to start somewhere.

- What would it mean if the scales balanced? Can you think of a second test if the first test balanced?
- What would it mean if the left (or right) side was heavier? What would your next test be?

Compare your solution and your reasons with other people. Did everyone find the same solution? Did you keep track of your ideas with a chart or a diagram?

A "decision tree" would be one way to map your plan. Write down your first test and draw a circle around it. For each test result - left, right, or balanced - draw a line to your next test. From each new test, draw a line to the following test or to your conclusion.

Play with your solution.

- How many tests would you need for six balls? How does your method change? What stays the same?
- What's the greatest number of balls you could test with two tests? Why not more?
- How many balls could you test with three tests? With four tests? Is your plan about the same?
- Is there a pattern to how many balls can be tested? Can you write a rule for how many balls can be tested with "n" tests?
- Could you write a rule for how many tests are needed for "n" balls?

We've learned something about balance scale testing. Let's get a little closer to the hard problem we started with.

Imagine there are only three balls. Two of them weigh the same amount. The other might weigh the same, or it might be a little lighter or heavier. How many tests do you need now?

Compare this to the problems we just solved? With one heavy ball out of five, there are obviously five possible solutions. But each test could only have one of three results - left, right, or balanced.

How many possible answers are there to this new problem? What are they?

Try some of your mathematician tools:

- Experiment. Make up a test. Start somewhere.
- Break it into pieces. Which of the solutions would explain a balanced result? Which would explain the left (or right) side being heavier?
- Organize. Chart or map your method.
- Generalize. How many tests would you need for four or five or "n" balls? Can you write a rule?

Are you ready for the big time?

- How many solutions are there with twelve balls if one of them might be light or heavy, or they could all weigh the same amount?
- Should three tests be enough?
- Can you suggest a possible first test?

One last question: Could you test thirteen balls - one heavy, one light, or all the same - with three tests? Why or why not?

]]>

Stated another way, what's the shortest path you can draw which can't be placed on the map without touching the border?

Interesting features of the problem:

- We have only three solution paths so far - a straight path, a wishbone shape due to Zalgaller, and a zigzag due to Besicovitch (only recently proved).
- For each of these solutions we know a class of forests for which they are optimal. But we haven't determined how many other types of forest might also be solved by these paths.
- For one rectangular forest, two of the paths are optimal.
- There are some forests for which we can show that none of the three known solutions is optimal, but we don't know what the best path would be.

Sound like fun?

- Here's my research paper.
- Or for a quick spin try the web presentation.

A Pythagorean Triple is a set of three integers which would fit as sides of a right triangle. In other words, three numbers a, b, and c such that a^{2} + b^{2} = c^{2}.

The short story goes like this:

- Pick an integer
*n*. - Pick another integer "gap" between 1 and
*n*. Call it*g*. - If
*2g*divides*n*, then you have a Pythagorean triple, namely^{2}+ g^{2} -
- a = n
- b = (n
^{2}- g^{2}) / 2g - c = (n
^{2}+ g^{2}) / 2g

Examples

- If n = 5 and g = 1, you get the triple 5, 12, 13.
- If n = 8 and g = 2, you get the triple 8, 15, 17.

You can verify algebraically that *a ^{2} + b^{2} = c^{2 }*in all cases.

So how does this work?

Somewhere around 8th grade I learned that the sum of the first *n* odd integers is equal to the square of *n*.

- 1 = 1 = 1
^{2} - 1 + 3 = 4 = 2
^{2} - 1 + 3 + 5 = 9 = 3
^{2} - 1 + 3 + 5 + 7 = 16 = 4
^{2} - 1 + 3 + 5 + ... +
*(2n - 1)*=*n*^{2}

Note that *(2n - 1)* is the *n*th odd integer.

So the difference between any two consecutive squares is an odd number, and the difference between any two squares is the sum of consecutive odd numbers

- 5
^{2}- 4^{2}= 25 - 16 = 9 = (2*5 - 1) - 6
^{2}- 5^{2}= 36 - 25 = 11 = (2*6 - 1) *n*^{2}- (n - 1)^{2}= (2n - 1)- 17
^{2}- 15^{2}= 289 - 225 = 64 = 31 + 33 - 29
^{2}- 21^{2}= 841 - 441 = 400 = 93 + 95 + 97 + 99 + 101 + 103 + 105 + 107

We're trying to find three numbers - *a*, *b*, and *c - *such that *a ^{2} + b^{2} = c^{2}*.

Let's pick any number for *a*. If a is an odd number, then *a ^{2 }*is an odd integer and is also the difference between two squares. For example, 3

Pick an odd number. This will be your first number - a. | 3 | 5 | n |

Square it. | 9 | 25 | n^{2} |

Find out where the square comes among the odd numbers - add one and divide by two. This will be your highest number, c. | (9 + 1) / 2 = 5 | (25 + 1) / 2 = 13 | (n^{2} + 1) / 2 |

Subtract one to find the other number, b. | 4 | 12 | [(n^{2} + 1) / 2] - 1 =(n ^{2} - 1) / 2 |

Triple | 3, 4, 5 | 5, 12, 13 |

So we get the formulas:

- a = n
- b = c - 1 = (n
^{2}- 1) / 2 - c = (n
^{2}+ 1) / 2

If *a* is an even number, a^{2} is not odd, but it is the sum of two odd numbers. So a^{2} will be the difference between squares that are two apart.

Pick an even number. This will be our first number - a. |
6 | 8 | n |

Square it. | 36 | 64 | n^{2} |

The two odd numbers that add up to the square will average half the square. | 18 | 32 | (n^{2} / 2) |

Add and subtract one to get the two odd numbers. | 17 + 19 | 31 + 33 | ((n^{2} / 2) - 1) +(n ^{2} / 2) + 1) |

Add one to the higher number and divide by two. This will be the highest number, c. |
(19 + 1) / 2 = 10 | (33 + 1) / 2 = 17 | (((n^{2} / 2) + 1) + 1) / 2 =(n ^{2} + 4) / 4 |

Subtract two to get the third number, b. |
8 | 15 | ((n^{2} + 4) / 4) - 2 =(n ^{2} - 4) / 4 |

Let's try a general case. For the example we'll use 9^{2} = 81 = 25 + 27 + 29. Since 29 is the 15th odd number, our high number will be 15. And since there were three odd numbers the other number for our triple will be three less, i.e. 12. So we get the triple (9, 12, 15).

Pick any positive integer. | 9 | n |

Square it. | 81 | n^{2} |

Guess how many odd numbers will add up to the square. Call it our "gap". | 3 | g |

Divide the square by the gap to find the average value. | 27 | n^{2} / g |

The range - difference between the highest and lowest of the odd numbers - will be two less than twice the gap. | 4 | 2g - 2 |

Half of that will be above the average, so the add half the range to the average to get the highest of the odd numbers. | 27 + 2 = 29 | (n^{2} / g) + (2g - 2) / 2 =(n ^{2} / g) + (g - 1) |

Add one and divide by two to find the highest number in our triple. | (29 + 1) / 2 = 15 | (((n^{2} / g) + (g - 1)) + 1) / 2 =((n ^{2} / g) + g) / 2 =(n ^{2} + g^{2}) / 2g |

Subtract the gap to get the other number for the triple. | 15 - 3 = 12 | ((n^{2} + g^{2}) / 2g) - g =(n ^{2} + g^{2} - 2g^{2}) / 2g =(n ^{2} - g^{2}) / 2g |

So our final result is the formula from the top:

- a = n
- b = (n
^{2}- g^{2}) / 2g - c = (n
^{2}+ g^{2}) / 2g

We can pick any number for *n*, but what should be use for our gap, *g*?

- Obviously
*g*has to be less than*n*, since otherwise our value for*b*would be zero or negative. - Since (n
^{2}+ g^{2}) / 2g = ((n^{2}/ g) + g) / 2, we know n^{2}/ g must be an integer, so*g*must be a factor of n^{2}. - If
*n*is odd, n^{2}will also be odd, so*b*will be odd and*c*will be even, or vice versa. So*g*will have to be odd. Likewise if*n*is even,*g*will also be even.

We'll find all the Pythagorean triples that have 20 as one of the smaller numbers (a or b). Since 20 is even, we'll try all even values for *g* that are less than 20 and factors of 20^{2} = 400. If (n^{2} + g^{2}) / 2g is an integer, we've found a triple.

g | n | (n^{2} + g^{2}) / 2g |
Triple | Reduced Triple |

2 | 20 | 404 / 4 = 101 | 20, 99, 101 | 20, 99, 101 |

4 | 20 | 416 / 8 = 52 | 20, 48, 52 | 5, 12, 13 |

6 | 20 | 6 not a factor of 400 | ||

8 | 20 | 464 / 16 = 29 | 20, 21, 29 | 20, 21, 29 |

10 | 20 | 500 / 20 = 25 | 15, 20, 25 | 3, 4, 5 |

12 | 20 | 12 not a factor of 400 | ||

14 | 20 | 14 not a factor of 400 | ||

16 | 20 | 656 / 32, not an integer | ||

18 | 20 | 18 not a factor of 400 |

The purpose of this exercise is absolutely not to cause everyone to solve the 12-ball problem, or worse, to show everyone the solution. The persistent, perhaps the obsessed, will solve it eventually. The exercise is rather about basic mathematical method, along with some beginning thoughts in combinatorics.

OddBall, a simple Windows program, is available for download. It allows you to select the number of balls (2 to 15), and whether the odd ball is light, heavy, or unknown. You drag balls onto the scale pans, then click the "Test" button to see the results. When you've solved the problem, drag the odd ball to the appropriate box for credit.

- OddBall.exe [44KB] - this is just the executable. If you have other VB6 programs on the system it may run correctly.
- OddBall.CAB [1.3MB] and setup.exe [1.6KB] - the CAB contains all necessary files. Download both pieces and run "setup.exe".

Students must analyze the problem in terms of separate cases. They must decide what results are possible from a given test, then focus and draw conclusions from each individual result in turn. Finally, the conclusions must be brought together to assure that all possibilities are accounted for.

The most important combinatoric result is the multiplicative effect of successive tests. While one test has three possible results (left, balanced, or right), two tests produce nine possible outcomes (left-left, left-balanced, etc.). The sequence, or combination, of tests has meaning. In fact, the balls chosen for the second test may depend on the results of the first.

Note: Although there are nine theoretical outcomes from two tests, students may recognize that four of these combinations will never actually occur.

If students can correctly determine the number of tests for a 100-ball or 1000-ball problem (with one heavy ball), that is much more important than solving the original 12-ball challenge. Likewise, the realization that the 12-ball problem presents 25 possible outcomes and is therefore potentially within reach of three tests is more important than the actual list of tests.

Keeping track of the tests will require some organized record-keeping, especially for problems with more balls. A graphic decision tree is an excellent tool. An alternative would be a decision outline, as sketched below. Only the format is different.

Sample solution to five-ball problem

- Weigh ball #1 (left) against ball #2 (right).

- If the left side is heavier, #1 is the odd ball.
- If the right side is heavier, #2 is the odd ball.
- If they balance, #1 and #2 are both normal. The odd ball must be #3, #4, or #5. I will therefore test #3 (left) against #4 (right).

- If the left side is heavier, #3 is the odd ball.
- If the right side is heaver, #4 is the odd ball.
- If they balance, #3 and #4 are both normal. Since I already know tha #1 and #2 are normal, the odd ball must be #5.

Using a solution appropriately is as important as finding it in the first place. It's in the nature of mathematics to apply solutions to similar problems and try to create more general, and therefore more powerful, rules. The multiplication of cases by successive events goes far beyond billiard balls and balance scales. But a grasp of these problems will allow an application of the rule based on understanding and not superstition.

]]>

- IntegerAddition - uses vectors to visualize addition of positive and negative values.
- NormalDistribution - find probabilities for regions of a normal distribution.
- ThreeCircles - demonstrates drawing three mutually tangent circles centered at the vertices of any triangle.

]]>

The idea is the same for each type of problem - turn the cells green by clicking pairs of cells which are equivalent.

Things to note:

- These pages are "proof-of-concept" attempts, not commercial products. Much could be improved and/or added. Hopefully some will.
- This is expected to render correctly on Firefox, but probably not on other browsers.
- Firefox is supporting "presentation markup". I don't know about "content markup".
- There are some quirks in generating MathML with Javascript, especially when creating "entities".
- Yes, I know I'm generating some ill-formed MathML - fighting Javascript and the browser are my current excuses.

Suggestions of comments? Zap me an email (w e b m a s t e r @ p r a i r i e m a t h . c o m). Input is appreciated, but it's not my day job, so you may not hear back.