Saturday, 18 December 2010

"Decimal" Fractions in Other Bases

Early in my study of decimal fractions I realized that the ninths were just repeating digits of their numerators. 1/9 = .111...; 5/9 = .5555... etc. I didn't have much to apply it to, but it sort of fascinated me. Somewhere in the sixth grade or so, we were introduced to bases other than ten. Something about Sputnik made American education decide that base two and base five was important. I was fascinated again, but when I became curious about "decimal" fractions in other bases, my teacher advised me that, "We don't cover that." {If you know a good name for the general term of such fractional expansions, please advise.} Thanks to GasStationWithoutPumps, I now know this is called a radix expansion. Radix is from the same base that gives us "root".

Later I began to understand polynomials better, and realized that I could extend base n whole numbers across the "decimal" point as far as I wanted using the idea I would now describe as negative powers (not sure I had a word for it then). Armed with the idea that .1 in base 2, or .1 [2] was 1/2, and .1 in base 5, .1[5] was 1/5 I began trying to construct sets of fractions. Moving the "decimal point" one to the left in base two divided the result by two in the same way that it divided by ten in base ten. With that, I could produce most of the fractions that terminated, .0101[2] was 1/4 plus 1/16 or 5/16, .23[5] was 13/25 (2*5+3)/52.

Then I read about the formula for infinite geometric series with ratios less than one. I think the article was about Archimedes use of the series, but I couldn't understand the center of gravity approach at that time. What I did realize was that I could use the formula to convert any non-terminating decimal fraction to a rational fraction..... King of the World. I would write out strange fractions that had non-repeating prefixes to the repeat. Soon I began to wonder about repeating decimals in other bases and set out to explore. Remembering the repunit expansion for 1/9, I wondered about .1111... in other bases. I was kind of shocked to realize that .11111..[2] was =1. How could that happen? But I had already read about "proofs" that .99999..[10] = 1; and quickly convinced myself that in base n, a repetend of the digit (n-1) would also be one. But somewhere along the way, I realized that .1111...[n] would be 1/n-1. Just as it was equal to 1/9 in base ten, it was 1/4 in base five, or 1/2 in base three.

With all this experience, I still found it very hard to pick a random fraction, say 4/7, and express it in base 3 or base 5 or whatever I wished. Then one day I learned about division. Ok, I had learned long division and short division and mental division tricks, but I didn't really know how division worked. I'm not sure what I was reading, thumbing through books in the public library, and the author showed a shortcut for making "decimal" fractions in base two. What seemed like a magic trick became understanding when I began to extend it to other bases.

To understand, I want to do a simple division in base ten written a little differently than you normally would. For an example I will use 1/8. Set up the operation in four columns



Since 8 will not divide into 1, we have a fractional answer and we will multiply one by ten and try again (this is actually dividing the number of tenths by eight. This time 8 will go into ten once, with a remainder of two. This is shown in the second line.

The remainder is 2 multiplied by 10 (to get the 20) and we divide by eight again. This continues until we either terminate, or enter a repeating pattern. Here is the final table giving us the expected .125 for an answer.

The question is what is special about ten, and the big answer is ..... nothing. We could divide the fraction in any base by simply using some other multiple in place of the ten in each line. Here is 1/3 in base five.

Notice that the occurrence of the remainder of one means we will repeat the same sequence forever, so our answer is .13131313... [5] = 1/3. We can convince ourselves this is correct by using the geometric series. The first two digits are 1(5)+3=8 and represent 8/25. The next repetition of 13 is 8/252 , and each two digits in the sequence is 1/25 of the previous two. This is a geometric sequence with a first term of 8/25, and a common ratio of 1/25. Using the well known formula for such series gives 8/24 = 1/3..

Ok, one more example of the division method to help you.... this time we pick base three, and let's try to represent 2/5 in that base.

2/5 [3]= .101210121012..... OK, one more quick tip. Most students know that any repeating decimal fraction can be written as a rational by just subtracting one from the denominator of the repetend (say WHAT?) ok.. .4 repeating is 4/9 (four tenths repeating); and .232323... is 23/99. It doesn't matter how long the repeat cycle is, as long as it starts right from the decimal point; .12345 is just 12345/99999..... and you can do that in ANY base...
so a fraction like .1012 in base three can be written as its base three fraction and then apply the same rule. 1012 in base three is 1(27)+0(9) + 1(3)+2(1) so the numerator is 32 in base ten, and the denominator is 34 or 81. The rule for repeating is subtract one from the denominator, so .10121012... is 32/80 = 2/5....

Here are a couple more to help you see the pattern...

.101 repeating in [2] = 5/(23-1)= 5/7
.101 repeating in [3] = 10/(33-1)= 10/26= 5/13
.31 repeating in[4] = (3(4)+1)/(42-1)= 13/15
.31 repeating in[5] = 16/(52-1)= 16/24 = 2/3
.31 repeating in[6] = 19/(62-1)= 19/35

Fun with fractions!!!

Wednesday, 15 December 2010

Viete on Combining Pythagorean Triples

Not able to write much this holiday season, but here is one I really enjoy from a few years ago.. hope it is of interest...

Reading The Analytic Art by Francois Viete, or at least the T R Witmer
translation, and came across an interesting way of combining the legs of any two Pythagorean triples to create two others. Viete calls the two methods synaeresis and diaeresis, which seem to be language terms Viete appropriated. Synaeresis is cramming two vowel sounds together to make one... like the way people in New Orleans say "Nor"leans. I think the official term is diphthong, but check with an English major for confirmation. The actual Greek roots mean “a joining or bringing together" or something similar Diaeresis is stretching one vowel out into two....and you can find your own example...
To illustrate Viete's approach, we can take two simple right triangles, say a 3-4-5 and a 5-12-13 as examples. Viete's method would produce two triangles whose hypotenuses( hypotenii?) were both 5x13 = 65 units. Viete distinguished between the legs calling them base and the perpendicular, so in the 3-4-5 triangle the base is 3 and the perpendicular is 4. It doesn't matter which is called what name, of course except that it reverses the outcomes of the two methods. The Synaeresic method would be to add the products of each base with the perpendicular of the other triangle; 3x12+ 4x5 = 56. This would give one leg of the new triangle. To find the other leg take the difference of the products of the two bases from the two perpendiculars; 4x12 - 3x5 = 33. This completes a triple of 33-56-65.
The second method, simply reverses the signs of conjunction. Subtract the two perpendicular x base products and add the two products of a common part. The crossed terms gives 3x12-4x5 = 16 for one leg, while the products of like parts gives 4x12+3x5=63 for the other, completing a 16-63-65 right triangle.

Friday, 19 November 2010

Repeat of an Isoperimetric Discovery

It's that time of year again, so I want to repeat this to explain some ideas I laid out in Calculus today...

Recently we have been doing maxima/minima applications in calculus. By the time they get her most of them know that when they maximize the area of a rectangle with perimeter constraints, they get a square. In Pre-calc we do some basic problems with 2 adjacent pens, a single pen against a wall or river, and all the similar cases. I have written about the generalizations of some of these here, and here. The problem of two adjacent congruent pens is (or should be) easy for a calculus or precalc student. It turns out that the maximum occurs when the total width is one-fourth the perimeter and the height is one-sixth the perimeter, for a maximum area of one twenty-fourth of the perimeter value (in square units, of course). If you extend that to even more congruent rectangular pens placed end to end it turns out that the width stays the same?

If you extend this, as many teachers do, to a shape like this one, it starts to get interesting to the more observant student. The height is now one-eighth of the total , and the width is one-sixth of the perimeter. Even slow students can figure out that the area of the total turns out to be one forty-eighth of the value of the perimeter. Some will even generalize the area of an array of mxn congruent pens to be the perimeter squared divided by [4(m+1)(n+1))].... but it seems to take forever for some one to finally realize that in all these problems, whether there was one rectangle, or one with one side adjacent to a river or barn, or rows of rectangles... there is one invariant...

Theorem one for rectangular arrays of congruent rectangular pens "The amount of fence going right to left is the same as the amount going up and down." If you want to maximize a rectangular array with five rows of three pens in each row, we will need 24 lines of fence, four going vertically, six going horizontally. Use half the fencing to make the four vertical fences, and the other half to make the other six going horizontally. (Prove..... dear reader) ..

I always thought this fifty-fifty use of fencing was a cute mathematical "teacher trick" but I have recently come to believe there is something deeper at work. I played around recently with this problem but loosened the constraints on the pens to be just equal area rectangles rather than congruent. This offered some nice areas to explore. Which would be better, three congruent pens in a row, or two pens with a third beneath... like so. The three adjacent pens turn out to have a max area when the width was p/4 (where p is the perimeter) and the height was p/8, giving a maximum area of p2/32... and as before, that mean that half the perimeter was used for the vertical sections, and half for the horizontal sections..and for the three non-congruent sections with equal area the width was p/6, and the length was 3P/16, giving a max area of....wait, that's also p2/32. (Ok, I hadn't expected that)... but when I checked the dimensions, it turns out that the horizontal sections use up exactly half the perimeter, and the vertical sections the other half in both cases.... hmmm...

Ok, but every kid knows that the area is maximized when the rectangle is closest to a square... so what if we just put three squares arranged as shown below and didn't require that the whole assembly forms a rectangle... I thought that would probably be even more area.. It turns out that it isn't, The equal distribution of left and right still works out, but the total area is only 3p2/100 or about 96% of the other shapes. (ok, I wasn't ready for that)...

So, I decided to move up to five pens... I passed over four absolutely sure that the division into four equal squares in a two by two array would be the most efficient, but five offered several variations, five in a row; two rows of two with a single in the third row, or three in one row and two in another... The five congruent squares in a row gave a max area of p2/48, but the set up with three pens in one row and two in another gave a slightly larger area of 5p2/216 or p2/43.2. The 2,2,1 set up (shown below) gave not quite the same area.. This set up gave a max area of p2/44.8.

From all of this I have a formed a totally unproven conjecture about the maximum area when n equal area rectangular pens are set out in a rectangular boundary with a given amount of fencing.
The Theorem One above for congruent rectangles seems to be a stronger property than I suspected, and is applicable to all equal area pens in a rectangular boundary, And the conjecture is that when the number of pens, n, is between x2-x and x2+x, the maximum area will be found when there are x-rows of pens and all of the pens have either x-1, x, or x+1 pens in the row.

The number of pens in any row will never differ by more than one from any other row. For values of n that are perfect squares or pronic (product of consecutive integers), the number of pens in each row will be the same. When n > x2 there will n-x2 rows that have x+1 pens, and the remaining rows will all have x pens. Similarly, if n is less than x2 there will be x2 - n rows that have x-1 pens and the remaining rows will have x pens each. As an example, if n= 23, then x=5 since 52-5 is less than 23 which is less than 52+5. And for 23 pens there will be five rows with x=five pens in three of them, and x-1=four pens in two of them.

I also have discovered that the theorem about equal lengths of fencing horizontally and vertically seems to be more important as a "rule of thumb" for maximizing than is equal sides. For example if five squares are set out as efficiently as possible (four in a square with one attached to a side), the area will be p2 / 45 with 8/15 of the perimeter going one way(say horizontally) and 7/15 going the other. If we change the squares to rectangles with each having a height of p/16 and a width of p/14 the area is p2/44.8.. an improvement of about 1/2 %....
Even if you go to six pens (where there is no lost perimeter enclosing the odd pen), putting two rows of three squares gave me an area of P2 / (48 1/3) but using the equal division of fencing gives the very slightly improved maximum of p2/48.

I can't explain why, but the equal division of fencing theorem is stronger than I first suspected, and if someone out there can shed more light on it than my feeble exploration, please do.

I haven't had time to expand the formula for the max area of all n when a rectangle is divided into congruent area rectangles, (not too difficult, I think).. but for square or pronic numbers of pens, it seems the max area will always be p2/(4 (x+1)(y+1)) where xy=n. As a limit as n approaches infinity, it seems the max area for rectangles divided into n equal area rectangles approaches

Thursday, 18 November 2010

Plus or Minus Infinity


Came across the problem above at the Math Central web page from Canada. I had written before about the values of iterated roots, but had not considered the case of what happens if they are joined by subtracting instead of adding. It turns out that . The derivation of this can be found in a short paper I wrote here.

By a similar approach we see that making the problem above pretty simple as an aftermath of all this... but I wondered if there was an intuitive approach to justify this without the actual itereation results....nothing jumps out yet....

It also made me wonder about alternating signs... .

Playing around with this I came up with a fourth degree equation to solve, with two positive roots...Yikes, but one of them was a spurious solution created by a second squaring of the equation. When I worked it out for n=2, I got a real surprise.. it led me back to the itereated sequence which started me on this exploration way back when...... it turns out that the iteration of roots of two using alternating signs is deeply related to the iteration of roots of one using addition. I'll leave it to you to explore...

And their difference, if I have calculated correctly, is the iterated square roots of 3 using alternating signs.... Too much to explore,...... more later, but I just figured out in class today (I hope) that the series with alternating signs will equal and produces an integer value when the value of n is = for integer x.