[Edu-sig] Reinventing the wheel...

Kirby Urner urner@alumni.Princeton.EDU
Mon, 18 Dec 2000 01:08:01 -0800


I've upgraded http://www.inetarena.com/~pdx4d/clubhouse.html=20
to include some RSA stuff.  I think that page is finally=20
close to done and I plan to give it a rest.[1]

In exploring the web for relevant input, it became clear=20
to me that I'm venturing in territory typically covered=20
in college computer science courses. =20

That doesn't need to change, but I remain persuaded that=20
by adopting a "computer at your elbow" approach to math=20
teaching, we could have a lot more segues between K-12=20
and what's now considered college-level material.

Awhile back, Tim Peters recommended 'Concrete Mathematics'=20
(Knuth a co-author) as a good example of a "math through
programming" text book.  I subsequently bought it, and=20
had to agree.  So how do we "lower a ladder" to middle=20
and high schoolers starting from there?  I think Python
is part of the answer.

In sum, none of the content I'm covering in my curriculum
writing is really new.  All that I'm doing is wiring up=20
the topics in a somewhat different way, changing the mix,
reorganizing the hyperlinks. This is a fairly conservative
approach, in other words.[2] =20

However, I think the result could be a much higher level=20
of math appreciation for younger students (or for adults=20
returning for more), plus better segues into computer=20
science, for those wishing to go that route.

>"We have to reinvent the wheel every once in a while,
>not because we need a lot of wheels; but because
>we need a lot of inventors."  - Bruce Joyce
>
>I've always loved that quote (and the book in which I found it,
>for that matter ;-)  so I greatly appreciated these comments
>by Kirby.
>
>jeff

That's a great quote jeff, hadn't seen it before.  Thanks
for posting it.

Kirby

Notes:

[1]

The Miller-Rabin stuff was confusing because I think some=20
web authors don't communicate it properly.  Fortunately,=20
Knuth includes it in 'The Art of Programming' vol 2 (took
me awhile to realize that) and his Algorithm P on pg. 395
seems pretty clear -- helped me streamline the gist of the
test:

Given candidate prime n, random base b < n, and m,s such=20
that m*(2**s) =3D n-1:

  def algP(m,s,b,n):
      """
      based on Algorithm P in Donald Knuth's 'Art of
      Computer Programming' v.2 pg. 395=20
      """
      result =3D 0
      y =3D pow(b,m,n)
      for j in range(s):
         if (y=3D=3D1 and j=3D=3D0) or (y=3D=3Dn-1):
            result =3D 1
            break
         y =3D pow(y,2,n)
      return result

If this spits back a 1, your candidate n passes the test=20
for base b.  The idea is to test a number of random bases=20
(except I go with low primes in sequence, as per Paul=20
Emerson's thesis, an OK alternative, yes?) -- the more=20
bases you test, the higher chance a number still passing=20
is prime; with the chance of being wrong equal to=20
(1./4)**(number of tests) -- gets small quickly.

Anyway, the above source is quite a bit more succinct=20
than before.

[2] =20

Probably the one thing I include that's controversial is=20
mention of Bucky Fuller's concentric hierarchy of polyhedra
-- a way of scaling/organizing common polys which brings=20
out some whole-number relationships and morph-relationships
which geometers haven't traditionally focussed on (even=20
though they've always been there).  I think Fuller's=20
approach is a pedagogic advance and makes polys more=20
friendly to younger people (a thesis I've empirically=20
tested in the field, with good results).  Plus it phases
in sphere packing in tandem with the polys, and that's
highly useful as well.  (Note:  Alexander Graham Bell was
also obsessed with the tetrahedron, not just Bucky).

With more polyhedra earlier in the curriculum, we have=20
more opportunities to use them later (say in high school)
as objects subjected to transformations (scaling, translation,
rotation), using object-oriented programming techniques.=20
Lots of intro-to-OOP books use polygons as example objects,
(e.g. triangle as a subclass of polygon), but I'd go with=20
full-fledged polyhedra instead (e.g. tetrahedron as a=20
subclass of polyhedron).  With polyhedra, your Python can=20
be about manipulating 3-tuple vectors (x,y,z), not just=20
planar (x,y) vectors, and the graphics/animations will=20
be far more interesting.  Plus you might want to explore=20
with quadrays -- another wrinkle/feature in my curriculum=20
writing: see http://www.teleport.com/~pdx4d/quadrays.html=20
for more info.