Article View: comp.lang.python
Article #9Re: Python in "math through programming" curriculum
From: Kirby Urner
Date: Mon, 18 Dec 2000 22:07
Date: Mon, 18 Dec 2000 22:07
123 lines
5874 bytes
5874 bytes
Repost from edu-sig@python.org elist -- one typo/URL fixed.
=============================
List-Archive: <http://www.python.org/pipermail/edu-sig/>
Date: Mon, 18 Dec 2000 01:08:01 -0800
I've upgraded http://www.inetarena.com/~pdx4d/ocn/clubhouse.html
to include some RSA stuff. I think that page is finally
close to done and I plan to give it a rest.[1]
In exploring the web for relevant input, it became clear
to me that I'm venturing in territory typically covered
in college computer science courses.
That doesn't need to change, but I remain persuaded that
by adopting a "computer at your elbow" approach to math
teaching, we could have a lot more segues between K-12
and what's now considered college-level material.
Awhile back, Tim Peters recommended 'Concrete Mathematics'
(Knuth a co-author) as a good example of a "math through
programming" text book. I subsequently bought it, and
had to agree. So how do we "lower a ladder" to middle
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
the topics in a somewhat different way, changing the mix,
reorganizing the hyperlinks. This is a fairly conservative
approach, in other words.[2]
However, I think the result could be a much higher level
of math appreciation for younger students (or for adults
returning for more), plus better segues into computer
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
web authors don't communicate it properly. Fortunately,
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
that m*(2**s) = n-1:
def algP(m,s,b,n):
"""
based on Algorithm P in Donald Knuth's 'Art of
Computer Programming' v.2 pg. 395
"""
result = 0
y = pow(b,m,n)
for j in range(s):
if (y==1 and j==0) or (y==n-1):
result = 1
break
y = pow(y,2,n)
return result
If this spits back a 1, your candidate n passes the test
for base b. The idea is to test a number of random bases
(except I go with low primes in sequence, as per Paul
Emerson's thesis, an OK alternative, yes?) -- the more
bases you test, the higher chance a number still passing
is prime; with the chance of being wrong equal to
(1./4)**(number of tests) -- gets small quickly.
Anyway, the above source is quite a bit more succinct
than before.
[2]
Probably the one thing I include that's controversial is
mention of Bucky Fuller's concentric hierarchy of polyhedra
-- a way of scaling/organizing common polys which brings
out some whole-number relationships and morph-relationships
which geometers haven't traditionally focussed on (even
though they've always been there). I think Fuller's
approach is a pedagogic advance and makes polys more
friendly to younger people (a thesis I've empirically
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
more opportunities to use them later (say in high school)
as objects subjected to transformations (scaling, translation,
rotation), using object-oriented programming techniques.
Lots of intro-to-OOP books use polygons as example objects,
(e.g. triangle as a subclass of polygon), but I'd go with
full-fledged polyhedra instead (e.g. tetrahedron as a
subclass of polyhedron). With polyhedra, your Python can
be about manipulating 3-tuple vectors (x,y,z), not just
planar (x,y) vectors, and the graphics/animations will
be far more interesting. Plus you might want to explore
with quadrays -- another wrinkle/feature in my curriculum
writing: see http://www.teleport.com/~pdx4d/quadrays.html
for more info.
Technical Details
Message-ID:
<2g2t3t06r2agrrjmfnr41eu4lc2u39a8qi@4ax.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!nntp1.onemain.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025ed,6a046a4159e3af32,start X-Google-Attributes: gid1025ed,public X-Google-Thread: f4b63,6a046a4159e3af32,start X-Google-Attributes: gidf4b63,public X-Google-Thread: 10dd18,6a046a4159e3af32,start X-Google-Attributes: gid10dd18,public X-Google-ArrivalTime: 2000-12-18 14:03:21 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!nntp1.onemain.com.POSTED!not-for-mail From: Kirby Urner <urner@alumni.princeton.edu> Newsgroups: comp.lang.python,sci.crypto,bit.listserv.geodesic Subject: Re: Python in "math through programming" curriculum Reply-To: urner@alumni.princeton.edu Message-ID: <2g2t3t06r2agrrjmfnr41eu4lc2u39a8qi@4ax.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 127 Date: Mon, 18 Dec 2000 14:07:12 -0800 NNTP-Posting-Host: 216.26.43.43 X-Complaints-To: abuse@onemain.com X-Trace: nntp1.onemain.com 977176858 216.26.43.43 (Mon, 18 Dec 2000 17:00:58 EST) NNTP-Posting-Date: Mon, 18 Dec 2000 17:00:58 EST