On Fri, Sep 28, 2012 at 11:36 AM, Paul Tanner <email@example.com> wrote:
> > But when I said that we teach fraction addition/subtraction using the > LCD such that the algorithm is too long and complicated and clunky to > be written elegantly and concisely as a single equation, this single > equation above is not the single equation I had in mind. In fact, this > equation above is only part of this long and complicated and clunky > algorithm. That is, on the right side we are not yet at an expression > that is a single noncomplex fraction. > >
Yes, you make a good point, plus you've already jumped ahead to a point where m, the LCM, is already a bird in the hand. How did you get it in the first place? I gave LCM(a,b) = (a*b)/GCD(a,b) with Euclid's Method for GCD. You didn't give an algorithm, so the conceit of doing it "all in one line" involves not explaining your techniques before and after.
When it comes to reducing this outcome: [(m/b)a]/m + [(m/d)c]/m] or in my executing notation Q( ((m/b)*a)/m + (m/d)*c, m), my solution is to reduce to lowest terms using GCD at the outset, i.e. when a new Q is born. This is shown in the __init__ method of my Q class (actually named Rat for Rational in this code: http://4dsolutions.net/ocn/python/rationals.py ).
So that takes care of "before" and "after" the actual addition (where p and/or q may be negative i.e. are members of Z, not just N).
> When I'm talking about being able to write the algorithm elegantly and > concisely as a single equation, I mean such that the left side is >
The algorithm minus any attention to getting the LCM, which should be doable with no prime factorization of either term.
<< SKIPPING AHEAD >>
> Side note 2: I say this last part because part of the reason that we > teach fraction addition/subtraction with the LCD is because it is an > anticipation of rational function addition/subtraction. > >
Assuming students have just played some games wherein CAIN rules obtain (closure, associative, inverse, neutral), e.g. alphanumeric games with permutations, discussed below , this would be a good time to revisit "subtraction as adding the additive inverse" along with "division as multiplying by the multiplicative inverse". With fractions, it's easy to show that for + and for * (addition and multiplication), there's an inverse for every Q such the -Q + Q = 0 (+ identity) and Q * 1/Q = 1 (* identity) where Q != 0 (0 has no multiplicative inverse).
When a student sees Q(3,5) / Q(11,19), the notion of multiplying by Q(19, 11) should be almost spontaneous. If you check the docstrings for __sub__ and __div__ (might be __truediv__ in another version), you'll see these group theory concerns are uppermost.
We also introduce totients and totatives using the same GCD function, as I've been discussing for the last decade or so.
>>> def totatives(n): return [x for x in range(1, n) if gcd(x, n) == 1]
>>> def totient(n): return len(totatives(n))
These very simple functions then help us explore the Galois Fields (don't need to call them that on first take) defined by totatives of N, adding and multiplying modulo N. This is a step on your path to RSA, but branches to many other topics as well. This is not difficult material and clearly should come early in Algebra.
Again, if you're a parent with pitchfork and want to make sure your neighborhood school is doing right by current standards (real standards, not the softie standards used by weak-minded North Americans), make sure these topics are part of Algebra.
If there's no computer language taught at all, consider joining the geek revolution. No, you don't have to home school. Just find other parents in your area, and start networking, making plans. Supplementation may take place at a local corporate campus. Ask if Intel provides anything useful. If in Portland, check Calagator.