FWIW - When I had posted up:
"Disney Learning" is the voice over. Not much else said. I am not dogmatically anti-corporate. Then why do I consider that a very scary 15 seconds?
I had no idea of the Squeak/Disney connection - in fact had no idea of Squeak - which I just came upon in a round-about away via Stephens site to: http://segfault.org/story.phtml?id=391ae457-08fa7b40 Looked quickly at the Squeak world. It seems in fact to be taken quite seriously in academic and educational circles. Am I in Chinatown, or what? ART
Am I in Chinatown, or what?
ART
Squeak is big, no question, although I thought CinCom's SmallTalk more professional (I guess that's not the point). A lot of the Squeak stuff is hype/vaporware at this time, but that's not necessarily bad. You gotta dream and those in the prophetic arts tend to bank on theirs becoming self-fulfilling. I'm not advocating that any one language try to establish itself is "the" one and only. Evolutionary patterns would suggest such approaches waste energy, at the expense of lost ground against competitors (while you're busy establishing hegemony, the less vocal are quickly undermining your claims behind the scenes). Python is a wonderful language and will provide a real boost to those who invest in it -- because it's good "mind food". But that doesn't for a moment mean that other languages are any less advantaging, to those who commit to their study. For me, it comes back to paradigms, and whether you language has a clean and clear one. I think Python does, in its namespace/dictionary approach to OOP. Scheme and SmallTalk do as well -- the thinking behind them is of a high order (plus I've always been a fan of APL). Kirby
Here's an interesting function that returns the nth root of P. Usage:
halley(2,2) # 2nd root of 2 1.41421356237 2.0**0.5 # check 1.41421356237
halley(7,3) # 3rd root of 7 1.91293118277 7.0**(1./3.) # check 1.91293118277
halley(1000,4) # 4th root of 1000 (duh) 10.0
Maybe the math module is even using something similar (or C internally)? Kirby # thanks to Domingo Gómez Morín # http://www.etheron.net/usuarios/dgomez/Roots.htm def halley(P,n,d=10,x=1.0): # P -- find nth root of this number # n -- whole number root # d -- level of depth for recursion (default 10) # x -- initial value of x (default 1) if d>1: newx = ((n+1.0)*P*x + (n-1)*(x**(n+1)))/((n-1)*P + (n+1)*x**n) return halley(P,n,d-1,newx) else: return x Return-Path: <siegel@eico.com> Delivered-To: edu-sig@python.org Received: from mail.eico.com (unknown [216.216.41.149]) by dinsdale.python.org (Postfix) with SMTP id A4C461CD1F for <edu-sig@python.org>; Fri, 12 May 2000 19:12:00 -0400 (EDT) Received: from siegel ([209.109.224.69]) by mail.eico.com (Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) with SMTP id 852568DD.007E3246; Fri, 12 May 2000 18:58:24 -0400 From: "Arthur Siegel" <siegel@eico.com> To: "Jeffrey Elkner" <jelkner@yorktown.arlington.k12.va.us>, "PythonEd" <edu-sig@python.org> Date: Fri, 12 May 2000 19:07:54 -0400 Message-ID: <NDBBIAEANKEFIFOFMJHPAEKHCBAA.siegel@eico.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <BCD0C7B9B8B650B6852568DD0069B8B1.0069B9C0852568DD@eico.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Subject: [Edu-sig] Unsubscribe Sender: edu-sig-admin@python.org Errors-To: edu-sig-admin@python.org X-BeenThere: edu-sig@python.org X-Mailman-Version: 2.0beta3 Precedence: bulk List-Id: Python in education <edu-sig.python.org> I was going to wait until Monday, but now prefer to face the week-end with a clearer head. I had written -
Fair enough?
I certainly thought so. But I will take silence as a no in this case. So I guess I've seen this through to the end. I am proud of at least that. Guido: Please remove the EDU-SIG link to PyGeo. It's busted anyway David Ascher: Thanks for listening. To Starship: Please consider my February something (my e-mail archives don't go back far enough to pinpoint) request for a crew account, delivered according to instructions, in good order with receipt acknowledged - withdrawn. To Stephen: I'll settle for the consolation prize. $300, I believe. You have the address. To Kirby: Love to hear Urner on the Transcendentalists. Will be checking your site.
From the same web page source, this one converges faster than Halley's looks like.
def if1(P,n,d=10,x=1.0): if d>1: newx = (((2.0*n-1)*P*x**n + P**2) / ((x**(2*n-1))+(2*n-1)*P*x**(n-1))) return if1(P,n,d-1,newx) else: return x For computing the nth root of P, as in
if1(500,2) # 2nd root of 500 22.360679775 500 ** 0.5 22.360679775
Kirby
From the same web page source, this one converges faster than Halley's looks like.
... except if1() seems to spiral out of control for P > 100 or so. Hmmmmm... Halley's more stable. Maybe I'm doing something wrong. I think it's SmallTalk that does integer fractions, i.e. allows calcs with numerators and denominators staying separate. Does Scheme do this too? I forget just now (I practiced with it for awhile, but am still focussed on a math curriculum with Python the main computer language). Anyway, I wrote a Fraction class that sort of does this (computes with fractions) -- maybe I'm reinventing a wheel or two here. Fraction in action:
from roots import Fraction a = Fraction(1,6) # i.e. 1/6 b = Fraction(2,3) # i.e. 2/3 c = a+b # add fractions c.str() '5L/6L' c = a-b # subtract fractions c.str() '-3L/6L' c.simplify() c.str() '-1L/2L' c=(a*b).str() # multiply factions (divide OK too) c.str() '2L/18L' c.simplify() c.str() '1L/9L'
I used my primes.py module for its gcd and lcm functions (greatest common divisor, lowest common multiple). One could make 'simplify' more "built-in" upon initialization (making a separate call unnecessary), but I'm still working through Domingo Gómez Morín's web page and didn't want to simplify automatically. Using my Fraction class and one of Domingo's algorithms, I was able to get some impressive long integer fractions for 3rd root of 2, 3rd root of 10: 3rd root of 2 is approx = 65379522 --------- 51891761 3rd root of 10 is approx = 91969780593702397138462508494860 --------------------------------- 42688590663356403236303435376201 Kirby
When I return on June 1 from traveling in Italy, I am arranging to provide some algebra tutoring over the summer at the high school I attended over 40 years ago in Tacoma, Washington. I hadn't lived in the Northwest from shortly after high school until last September, and now I want to do something with and for the kids in my old school. I am not a teacher, but a contact of mine in the school is very anxious to have successful alumni be available as tutors and mentors at a school in what has essentially become the inner-city high school. I am looking forward to tutoring some kids in algebra. I want to see what they are up against and also what would have them be interested in having some mastery in this area. Presently, the only exposure I have to that is my 10-year-old grand nephew, who I see, already ending the 5th grade, becoming so poorly practiced at early arithmetic skills that new topics (e.g., ratios) are becoming increasingly inaccessible to him. I have mentioned CP4E to my contact, but we haven't discussed it much. There are others in the school to talk to about computers, math education, and so on. I would like to do that, and if I could support a CP4E project in the school, I want to do that. It will take a lot for me to give up what I already know about computing to be able to relate to what these kids may require to get over any obstacles they have. I don't have any ideas about this beyond what I have just said. I will learn more when I meet people at the school. I also wanted to consult with this newsgroup and see what thoughts there already are about using CP4E approaches in schools where mathematics may be more something to survive than to master and exploit. I am sure I will find some kids who are keen on computers. I am just thinking out loud and also looking for your thinking. Regards, -- Dennis AIIM DMware Technical Coordinator I am traveling until June 1, 2000, and am best reached via E-mail. Dennis E. Hamilton ---------------------------- InfoNuovo mailto:infonuovo@email.com http://www.infonuovo.com
I don't have any ideas about this beyond what I have just said. I will learn more when I meet people at the school. I also wanted to consult with this newsgroup and see what thoughts there already are about using CP4E approaches in schools where mathematics may be more something to survive than to master and exploit. I am sure I will find some kids who are keen on computers. I am just thinking out loud and also looking for your thinking.
Regards,
-- Dennis
I commend you for your willingness to consider this undertaking. If I were in your shoes, a first thing I'd want to assess is the hardware/infrastructure picture. Ideally, an instructor has a way to project what's on her computer to a big screen in front. Few schools are so equipped. What's fun about Python is having access to an interactive command line. Seeing something up front, and then doing it yourself, is what's best. But if there's just one or two computers in the class, and kids take turns running their favorite CDs, then it's a very different picture. Re Python itself, it'd have to be via the IDLE interface I think. That's the only friendly-enough environment. I'd do a lot of interactive one-liners, to give kids a sense of the "I type, computer replies" environment. Maybe just the concept of "average":
(3+2+1+4+6)/5.0 3.2
... get into all that calculator stuff.
3*3*3 27 3**3 27
Then simple programs:
def add1(n): return n+1
add1(10) 11
Pretty soon, you're ready to talk about other syntax, like
for i in [1,2,3]: print i
1 2 3 And then you're ready for functions, which are ordered pairs of (domain, range) values (now we're really starting to do some math)!
domain = [1,2,3,4,5] def f(x): return x**2
range = map(f,domain) range [1, 4, 9, 16, 25]
That's enough for one day (heh). Kirby
More ideas: Function consists of (domain,range) pairs, usually with some rule taking every domain input to its range output (but a rule is not really required). You never have the same domain value paired with two different range values in a function, although you may in a relation. Quiz: Which if the following is not a function? (a) [(a,b),(d,b),(e,c)] (b) [(1,2),(2,4),(3,9)] (c) [(1,a),(2,a),(1,b)] (d) [(0,0),(0,0),(2,0)] Answer: c (because (1,a) and (1,b) point the same domain value to different range values. Notice how the above question uses lists of tuples. Functions are a subclass of Relation.
domain = [1,2,3,4,5] def f(x): return x**2 # raise input to 2nd power
range = map(f,domain) range [1, 4, 9, 16, 25] def g(x): return x + 1 # another function, add 1 to input
g(f(10)) # show f(g(x)) is not same as... 101 f(g(10)) # g(f(x)) -- composition of functions 121
domain = ['RE','DEA','HEA','FE'] # inputs needn't be numbers def addD(arg): return arg + 'D' # here's the "add 'D'" function
range = map(addD,domain) range ['RED', 'DEAD', 'HEAD', 'FED']
Let's have a program that accepts a rule, a domain, and returns the (domain, range) pairs. We'll call it makepairs.
def makepairs(rule,domain): outlist = [] for x in domain: outlist.append((x,rule(x))) return outlist
def f(x): return x**2
makepairs(f,[1,2,3,4,5]) [(1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]
makepairs(addD,['RE','DEA','HEA','FE']) [('RE', 'RED'), ('DEA', 'DEAD'), ('HEA', 'HEAD'), ('FE', 'FED')]
Notice how we're passing a rule as a parameter. You can define any number of rules, and makepairs will do the same thing with all of them: apply it to each domain element and append the resulting (domain,range) tuple to a list. Note that the rule might just be a random number, with the domain having no roll in the computation. Introduct the Python 'choice' function in the random module. It simply picks randomly from a list. Lets run it 10 times against ice cream flavors (could be 31):
flavors = [['chocolate','vanilla','strawberry'] for i in range(10): choice(flavors)
'chocolate' 'vanilla' 'strawberry' 'strawberry' 'chocolate' 'chocolate' 'chocolate' 'vanilla' 'chocolate' 'chocolate' Make a rule based on choice, and make (input,output) pairs:
def pickone(x): return choice(range(x))
makepairs(pickone, [5,5,5,5,5]) [(5, 2), (5, 2), (5, 2), (5, 0), (5, 3)] makepairs(pickone, [5,5,5,5,5]) [(5, 3), (5, 0), (5, 4), (5, 0), (5, 3)] makepairs(pickone, [5,5,5,5,5]) [(5, 3), (5, 0), (5, 0), (5, 0), (5, 0)]
We're definitely getting relations here, not functions. Introduce the concept of "inverse function". If f(domain)->range and g(range)->domain, then f and g are inverses. Example:
def f(x): return 3.0*x + 2
def g(x): return (x-2)/3.0
f(3) # f takes you to 11 11.0 g(11) # g brings you back 3.0 f(234309) # f(domain)->range 702929.0 g(702929) # g(range)->domain 234309.0
Notice that a function that takes two domain values to the same range value, will not have an inverse function, only an inverse relation. Functions with inverse functions are known as one-to-one, meaning every domain value maps to a unique range value. Quiz: Which if the following is a 1-to-1 function? (a) [(a,b),(d,b),(e,c)] (b) [(1,2),(2,4),(3,9)] (c) [(1,a),(2,a),(1,b)] (d) [(0,0),(0,0),(2,0)] Answer: b What is the inverse function? Answer: [(2,1),(4,2),(9,3)] Let's write a utility to switch pairs, called makeinverse:
def makeinverse(inlist): outlist = [] for pair in inlist: newpair = (pair[1],pair[0]) outlist.append(newpair) return outlist
function = makepairs(addD,['RE','DEA','HEA','FE']) function [('RE', 'RED'), ('DEA', 'DEAD'), ('HEA', 'HEAD'), ('FE', 'FED')] makeinverse(function) [('RED', 'RE'), ('DEAD', 'DEA'), ('HEAD', 'HEA'), ('FED', 'FE')]
And so on, on and on... Notice how we keep reusing the same rules and domains, over and over, gradually building up concepts, of domain, range, rule, function, relation, composition of functions, inverse function -- all core concepts in mathematics, and all easily implemented and sharable interactively in a Python-enabled environment. Kirby
On Fri, 12 May 2000 23:58:05 -0700 I wrote:
Anyway, I wrote a Fraction class that sort of does this (computes with fractions) -- maybe I'm reinventing a wheel or two here.
Here's the code. Sorta rough. Also, depends on primes.py, which is zipped inside of python101.zip and linked from my math-thru-programming essay at: http://www.inetarena.com/~pdx4d/ocn/numeracy2.html I'll probably just end up sticking the Fraction class inside of primes.py eventually, as one more example application of its methods (gcd and lcm, which depend on getfactor which depends on isprime). The class has its limitations i.e. even though it deals with long integers, my getfactor method relies on prime factorizations, and this gets impractical using the brute force "trial by division" algorithm I'm using (I feature some other prime tests, such as Euler's and Fermat's, but they all have loop holes). Could be this Fraction idea is already in some module, but I haven't seen it yet, nor in the books I've looked at. As I recall, SmallTalk has native integer fractions. Scheme too? Given my "math through programming" focus, having the capability to do basic ops with long integer fractions might come in handy. Part of the idea is kids are learning Python as part of their basic math instruction. So they'll be able to see/read/comprehend the technique for dividing one fraction by another as: def __div__(self,n): # divide self by another fraction f = self.mkfract(n) recip = Fraction(f.denom,f.numer) return self.__mul__(recip) In other words, whereas a pre-Python conventional text might say "multiply by the reciprocal", here we see the __mul__ method being invoked, after creating Fraction recip with denom and numer reversed. One of the things traditionalists scream about when reading reformist math texts is that "dividing fractions" seems to be given short shrift. So these folks should be happy to see that I'm bringing it back -- albiet in a different notation (self-executing). ========================= roots.py ================= import primes class Fraction: numerator = 1L denominator = 1L def mkfract(self,n): # this method is to allow ops that mix Fractions # with non-decimal numbers e.g. 25 * (3/7) if type(n).__name__ in ['int','float','long int']: return Fraction(n) else: return n def __init__(self,num=1L,den=1L): self.numer = long(num) self.denom = long(den) self.simplify() def __mul__(self,n): f = self.mkfract(n) return Fraction(self.numer*f.numer, self.denom*f.denom) def __div__(self,n): # divide self by another fraction f = self.mkfract(n) recip = Fraction(f.denom,f.numer) return self.__mul__(recip) def simplify(self): # reduce numerator/denominator to lowest terms divisor = primes.gcd(abs(self.numer),abs(self.denom)) if divisor > 1: self.numer = self.numer/divisor self.denom = self.denom/divisor def __add__(self,n): # add self to another fraction f = self.mkfract(n) common = primes.lcm(self.denom,f.denom) sum = self.numer * common/self.denom sum = sum + f.numer * common/f.denom return Fraction(sum,common) def __sub__(self,n): # subtract another fraction from self return self.__add__(-n) def __neg__(self): # negate self return Fraction(-self.numer,self.denom) __rmul__ = __mul__ def str(self): return str(self.numer)+"/"+str(self.denom) def list(self): return [self.numer,self.denom] def float(self): return (self.numer*1.0)/(self.denom*1.0) Fraction in action (this version auto-simplifies): Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam IDLE 0.5 -- press F1 for help
from roots import Fraction a = Fraction(2,3) b = Fraction(3,2) c = a+b c.str() # str() is for seeing as string, nnn/ddd format '13L/6L' c.float() # ...or you can output the decimal equivalent with float() 2.16666666667 c=a-b c.str() '-5L/6L' a = Fraction(300,10) a.str() # note autosimplification, i.e. 300/10 is now 30/1 '30L/1L' (a*b).str() '45L/1L' d=25*b # integer x Fraction OK d.str() '75L/2L'
Kirby PS: thanks to Stan Heckman for catching this typo: Fri May 12 22:28:33 2000
halley(1000,4) # 4th root of 1000 (duh) 10.0
Shoulda been
halley(10000,4) # 4th root of 1000 (duh) 10.0
(double duh)
Kirby Urner wrote:
On Fri, 12 May 2000 23:58:05 -0700 I wrote:
Anyway, I wrote a Fraction class that sort of does this (computes with fractions) -- maybe I'm reinventing a wheel or two....
Just to mention two such modules : surd.py (1995) and yarn.py (1996) found at Vaults of Parnassus http://www.vex.net/parnassus/ in the Maths resources.
At 10:21 PM 05/17/2000 +0200, Marc Keller wrote:
Kirby Urner wrote:
On Fri, 12 May 2000 23:58:05 -0700 I wrote:
Anyway, I wrote a Fraction class that sort of does this (computes with fractions) -- maybe I'm reinventing a wheel or two....
Just to mention two such modules : surd.py (1995) and yarn.py (1996) found at Vaults of Parnassus http://www.vex.net/parnassus/ in the Maths resources.
Yep, I was reinventing a wheel. Not surprised. yarn.py looks good. gcd() is especially fine: def gcd(a, b): """Return GCD of two numbers. Duh! """ while b: a, b = b, a % b return a (That's Lanny's duh, not mine). Kirby
Yep, I was reinventing a wheel. Not surprised.
yarn.py looks good. gcd() is especially fine:
def gcd(a, b): """Return GCD of two numbers. Duh! """ while b: a, b = b, a % b return a
(That's Lanny's duh, not mine).
Kirby
The above algorithm isn't original with Lanny however. Euclid wrote it up in Book 7, Propositions 1 and 2 of Elements, but Knuth thinks it goes even further back. Maybe Lanny wrote "Duh!" because this is one of the oldest algorithms on record, and would be recognized by just about anyone with training in computer science and numerical methods. Ergo, every K-12er should know it too, as per my evolving math-through-programming approach to CP4E (numeracy + computer literacy). Today was my birthday, and as a present to myself, I finally bought a copy of 'The Art of Computer Programming' by Donald E. Knuth, 3rd Edition, 1998, Addison Wesley -- a classic work in the field. I couldn't afford all 3 volumes though, just got volume 2. The gcd() stuff is in section 4.5.2. Kirby
After looking at the doc string for the function gcd:
def gcd(a, b): """Return GCD of two numbers. Duh! """
Kirby Urner wrote:
Maybe Lanny wrote "Duh!" because this is one of the oldest algorithms on record, and would be recognized by just about anyone with training in computer science and numerical methods.
Umm - surely the "Duh" is because the doc string is rather meaningless? (on the lines of "well, I believe in writing doc strings, but heh, you already *knew* this was called "gcd" - what did you *think* it did?" - that is, recognising the function *name* rather than the algorithm...) (and assuming the doc string is aimed at someone querying what the function is for through an IDE of some sort, rather than at the person reading the code) Tibs -- Tony J Ibbs (Tibs) http://www.tibsnjoan.demon.co.uk/ Give a pedant an inch and they'll take 25.4mm (once they've established you're talking a post-1959 inch, of course) My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)
(on the lines of "well, I believe in writing doc strings, but heh, you already *knew* this was called "gcd" - what did you *think* it did?" - that is, recognising the function *name* rather than the algorithm...)
Yeah, that's a good explanation. I don't think the algorithm itself merits a "duh", even though it's simple to code. Still working on a paragraph to make it more intuitively obvious. My earlier edition of primes.py relied on having prime factorizations of a,b in order to get their gcd. Given prime factorizations are difficult to come by, my gcd method was inherently inefficient, though still useful from a pedagogical point of view (for students learning about primes, the concepts vs. the need for efficiency in computing). I've kept my old approach as the method 'incommon', but substituted Euclid's gcd() as per this thread -- already had an lcm() based on gcd(). Kirby
The Euclidian GCD algorithm is also the very first algorithm introduced in Volume 1. It is used for the initial discussion of what constitutes an algorithm, the conditions that an algorithm satisfies, and so on. (In the 3d edition of volume 1, Fermat's last theorem is indeed downgraded from difficulty [M50]. I can't remember if that leaves any [M50] problems in the book!) At some point, I would recommend section 1 of Volume 1 because it also establishes the mathematical concepts needed for the series of books, including basic number theory and other topics that are applied to great advantage in volume 2 and beyond. This might fit your interests perfectly. There is also a book on concrete mathematics that Knuth and a couple of his buddies put together, but the material in Volume 1 strikes me (no mathematician) as pretty challenging and interesting already. Meanwhile, happy birthday! For a long time, ACP vol.2 was one of the most dog-eared and referenced books in my personal library. -- Dennis -----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Kirby Urner Sent: Wednesday, 17 May 2000 18:26 To: edu-sig@python.org Subject: Re: [Edu-sig] Long Integer Fractions
Yep, I was reinventing a wheel. Not surprised.
yarn.py looks good. gcd() is especially fine:
def gcd(a, b): """Return GCD of two numbers. Duh! """ while b: a, b = b, a % b return a
(That's Lanny's duh, not mine).
Kirby
The above algorithm isn't original with Lanny however. Euclid wrote it up in Book 7, Propositions 1 and 2 of Elements, but Knuth thinks it goes even further back. Maybe Lanny wrote "Duh!" because this is one of the oldest algorithms on record, and would be recognized by just about anyone with training in computer science and numerical methods. Ergo, every K-12er should know it too, as per my evolving math-through-programming approach to CP4E (numeracy + computer literacy). Today was my birthday, and as a present to myself, I finally bought a copy of 'The Art of Computer Programming' by Donald E. Knuth, 3rd Edition, 1998, Addison Wesley -- a classic work in the field. I couldn't afford all 3 volumes though, just got volume 2. The gcd() stuff is in section 4.5.2. Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://www.python.org/mailman/listinfo/edu-sig
At 07:52 PM 05/18/2000 -0700, Dennis E. Hamilton wrote:
The Euclidian GCD algorithm is also the very first algorithm introduced in Volume 1. It is used for the initial discussion of what constitutes an algorithm, the conditions that an algorithm satisfies, and so on. (In the 3d edition of volume 1, Fermat's last theorem is indeed downgraded from difficulty [M50]. I can't remember if that leaves any [M50] problems in the book!)
Yeah, I've been noticing the references to Euclid's Algorithm in Volume 1. I think I'd like to own Volume 1 eventually as well, eventually. Volume 3 too.
Meanwhile, happy birthday! For a long time, ACP vol.2 was one of the most dog-eared and referenced books in my personal library.
-- Dennis
Thanks. Knuth's volumes are obviously a gold mine. I've looked at them before, but never owned or studied them in a lot of depth. I think a lot of what's in Knuth can/should be translated into to math-through-programming approach simply because now we have simpler languages (e.g. Python) and don't have to think in terms of the assembler-style MIX language he's using (important for computer science, but again, I'm looking through the eyes of a garden variety math teacher/student). Back when cars were new/rare, you had a lot of "professional drivers" around, many of them into racing, but also driving for others (i.e. as chauffers -- still requires a special license). And of course we _still_ have lots of pro drivers in the picture, but we also just have a lot of people who just drive cars (without being pros or anything). When people ask me what it is I do, I don't say "I'm a driver" (even though that's part of what I do). By analogy, I think CP4E means a lot more people programming computers, but not thinking of themselves as "professional programmers" (in the sense of being "software engineers"). It's not even the same thing as being an "amateur" exactly. I'm not an "amateur gourmet chef" just because I know how to follow a recipe. It's just a basic skill, and I'm as good at preparing food as I need to be at this time in my life. Just because I can change a light bulb doesn't make me an "amateur electrician" either. I type, but don't think of myself as a "professional typist". Likewise, we'll have a lot more people who feel competent to type some of their own code into a computer, maybe mixed with code by others, run it, debug it, and get results, without really thinking of themselves as "amateur software engineers" -- no, they're just able to program some, just like they can drive, scramble eggs, change a light bulb, put up a web page. No big deal. Part of what every kid learns. And there will also be those who study the art of computer programming in more depth, aspire to be pros. In sum, I don't think CP4E necessarily means "teaching more kids to become programmers" in the sense of "professional programmers" (although I expect that'd be a side-benefit). I think it means looking at programming as just one of those things people may do from time to time, like gardening. Sociologically speaking, I think this is happening with or without any funded initiatives such as CP4E. What we're seeing is a lot of retirees with computing skills, acquired in their professional lives, and now hanging out with their grandchildren. The kids see older folks enjoy "puttering around on their computers" much as they used to see older folks "puttering in their gardens". They get the idea that computer programming is something you do for fun, along with playing electronic games. It's a recreational activity. And part of the fun is teaching programming skills to younger people, watching them learn. In this way, an art or science percolates outward and into popular culture. A next generation grows up without the bias that you need some special qualifications or training to engage in activity X. No, you just needed to have a parent or grandparent who was into it, and had the time to show you the ropes. We've seen this pattern repeated throughout time. Kirby
[Dennis E. Hamilton]
... At some point, I would recommend section 1 of Volume 1 because it also establishes the mathematical concepts needed for the series of books, including basic number theory and other topics that are applied to great advantage in volume 2 and beyond. This might fit your interests perfectly.
There is also a book on concrete mathematics that Knuth and a couple of his buddies put together, but the material in Volume 1 strikes me (no mathematician) as pretty challenging and interesting already.
"Concrete Mathematics", by Graham, Knuth and Patashnik. A *much* better choice than Knuth Vol 1: CM was written because Vol 1 proved too telegraphic and intense for most students to master. CM pays much more attention to motivation, skips the highly esoteric results, and fills in some of the many gaps in Vol 1. Even so, the subject matter is difficult at points and the book makes no apologies for that, or for its refusal to "dummy it down". Most of it remains college-level material. somebody-should-teach-uncle-don-how-to-use-a-computer<wink>-ly y'rs - tim
Dennis E. Hamilton mentioned Knuth's work on concrete mathematics, and Tim Peters enlarged:
"Concrete Mathematics", by Graham, Knuth and Patashnik. A *much* better choice than Knuth Vol 1: CM was written because Vol 1 proved too telegraphic and intense for most students to master. CM pays much more attention to motivation, skips the highly esoteric results, and fills in some of the many gaps in Vol 1.
I bought it some while back, and its on my list of "projects for when I have lots of time" [1] - it definitely looks like something an ordinary person might have a chance with, whereas Knuth's "master tomes" are definitely not[2] - I've always found them irritating because they often address a problem domain I'm interested in, but I want an *answer*, not some Mixin code I have to back-translate into a real language (with the potential errors inherent in such a process), and then worry about not having understood the maths that went with it - and anyway the actual answer I want (in all such books) is often the result of one of the excercises. Humph (wanders off grumbling to himself). There is a serious point buried at the end there, though. The "useful" books we're sometimes referred to for algorithms, etc., are too often academically inclined - that is, they're aimed at education courses, rather than at people seeking immediate gratification(!). With infinite leisure time, that's no problem, but if you're trying to find an answer because you need to use it, finding that the book leads almost all the way and leaves the rest to be solved in an excercise is, shall we say, frustrating. Not the author's fault if a book doesn't match one's expectations, of course, but an irritation nonetheless. Is that last of relevance to the SIG? I feel somehow it should be (oddities of maths curricula won't start to be of great direct interest to me until our older son starts school later this year, and even then the system in the US is only likely to be of marginal interest...) Ah - I knew there was something I actually wanted to say that WAS of relevance: Please, whatever country you're from (I'll include mine as well!) can you remember that year NAMES for students don't mean anything outside your country? Things like "first grade" or "freshman", or even terms like "high school" or "college", don't mean anything outwith the national context. Saying what AGE you're talking about is a lot more useful (although even then it's not necessarily too much help - my son will start formal school at age 4, but I believe in Germany it wouldn't be until age 7, so talking about requirements for a 5 year old might be odd). Tibs [1] This is currently scheduled to be in about 18 years time, I think, given the children's ages (I'm an optimist!) along with learning to do kumihimo (braid) weaving, getting round to making a fairing for the recumbent trike, and all those esoteric Python things I never have time for. Hopefully more mundane projects like updating our web pages, finishing the mxTextTools meta language, writing a parser using it for the BikeCode, finalising the Joan Aiken bibliography, etc., will happen rather sooner. Hah. [2] The TeX book, on the other hand, is fun! (hmm - "The TeX book" is ambiguous - thinking about it, I mean both the book about TeX, and also the printed version of the tangled source code (or whatever the term is)) -- Tony J Ibbs (Tibs) http://www.tibsnjoan.demon.co.uk/ "Bounce with the bunny, strut with the duck Spin with the chickens now - CLUCK CLUCK CLUCK!" Sandra Boynton, Barnyard Dance! My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)
Please, whatever country you're from (I'll include mine as well!) can you remember that year NAMES for students don't mean anything outside your country? Things like "first grade" or "freshman", or even terms like "high school" or "college", don't mean anything outwith the national context. Saying what AGE you're talking about is a lot more useful (although even then it's not necessarily too much help - my son will start formal school at age 4, but I believe in Germany it wouldn't be until age 7, so talking about requirements for a 5 year old might be odd).
Tibs
Good point. I remember how mystified I was going from 2nd grade into the 1st form at the Junior English School (Rome, Italy). Given I don't think we're talking very many school systems here, it might be easier to just learn the differences, and internally translate from jargon to jargon. Here's the US system: P Preschool K Kindergarden Grade Age (average) 1 6 2 7 3 8 Elementary School 4 9 5 10 6 11 7 12 Middle School (or Junior High) 8 13 9 14 Freshman 10 15 Sophomore High School 11 16 Junior 12 17 Senior 13 18 Freshman 14 19 Sophomore College 15 20 Junior 16 21 Senior Some variations exist. Your mileage may vary. Kirby
Tim Peters wrote (in part):
Even so, the subject matter is difficult at points and the book makes no apologies for that, or for its refusal to "dummy it down". Most of it remains college-level material.
somebody-should-teach-uncle-don-how-to-use-a-computer<wink>-ly y'rs - tim
OK, sounds like "Concrete Mathematics" (CM) is my next investment (along with more RAM for my wife -- she's got some RAM-hog bookkeeping software that's really bogging down). No doubt CM is college level, but the point of a well- designed curriculum is to "lower a ladder" consisting of "grades" or "rungs", such that by the time you get to the tough stuff, it's within reach, i.e. you're well prepared for it. The metaphors of "steepness" ("stepness") apply: learning curve, on-ramp, higher learning. These days, it seems to me that the conventional math curriculum is too slanted _away_ from engineering. Is it a class thing? Seems a lot of effete aristo-bluebloods who can't abide getting their hands dirty in anything like "machinery" (ooo, dirty) must have concocted the current cafeteria plan: "like, would you like some more calculus with your pre-calculus?" I have nothing (much) against calculus, but not if we divorce it from discrete math so completely that we can't do some delta-x alongside our dx, some SIGMA alongside or Riemann sums. Why not some simple Python in grade 11 (age 16): def mkderiv(domain,f,h): # function derivative builder (discrete) pairs = [] for x in domain: # for each member of domain... rvalue = (f(x+h)-f(x-h))/(2*h) pairs.append((x,rvalue)) # append tuple return pairs I'd like to open doors to OOP, cryptology (links between RSA and prime numbers), spatial geometry (rotation matrices, vector ops), number theory (Fermat's "little theorem") even spherical trig, sooner rather than later. Not in some elective AP rivulet, but in the main stream. Spending a whole year doing AP calculus, all that chain rule stuff, integrating by parts, seems way too much nuts and bolts specialization -- like, let's wait and see if you're really going to _use_ the calculus on the job (and _how_ will you use it?) and stop using this one neck of the woods as your "killing field" wherein to sort out "those with potential" from "those we feed pablum" in the math-sciences. That's a cruel design, plus seems increasingly unable to justify itself (the cost is way too high, given the "turn off" factor). Personally, I'm for letting the kids victimized by this obsolete system having their revenge (no, I'm not speaking from personal bitterness, I did fine in AP calc and taught it for two years at the HS level). thinking-it's-time-to-swing-the-wrecking-ball-ly yrs Kirby
OK, sounds like "Concrete Mathematics" (CM) is my next investment
Bought this book yesterday.[1] Looks good -- like Tim says, not as "intense and telegraphic" as 'The Art of Computer Programming', but with Knuth an author, bringing the same expertise. This is a text book for an actual course at Stanford. My initial reaction on reading these books is pleasurable, given how much it positively reinforces what I'd come up with in the 'Numeracy + Computer Literacy' series.[2] I'd sort of intuitively gravitated to Pascal's Triangle as a conceptual nexus, a "grand central station", and that's what these books do too, in the same context of talking about series. Knuth's Volume 1 even shows the tetrahedral packing of spheres (exploded view), a geometric interpretation of one of the Pascal columns. What's different about my Oregon Curriculum Network approach is that I develop this geometric connection more intensively, making use of Buckminster Fuller's concentric hierarchy as defined by 26 data points, plus a jitterbugging thereof -- which points I have the option to express in whole number coordinates, given the newfangled quadrays apparatus.[3][4] In going with polyheda as paradigm objects (in the OOP sense), I'm bringing in Computer Game Programming 101 (e.g. rotation matrices, even quaternions -- the 'Tomb Raider' engine is quaternion-based) which is more obviously relevant to a lot of kids -- as is spatial geometry in general (after all, we live in it). Also, whereas CM is earmarked as grad schooler or upper level, I'm pretty clear we have the option to alter the mix in the lower grades (pre-college) as we follow the CP4E thread where it most naturally leads (including into the math classroom). We already touch on a lot of these same topics at these earlier levels, but don't elaborate much (e.g. mention primes, but not Fermat's "little theorem" or the link to RSA encryption) because everything is geared towards an intensive calculus experience, for which you need precalc. Again, I have nothing against teaching calculus (was a calculus teacher myself for two years), and CM is full of Riemann sums, right along with the SIGMAs. And I didn't mean to say we should bleep over the chain rule or integration by parts, merely that it should be an option to NOT spend a _whole year_ doing calculus at the pre-college level AND to nevertheless be considered a top performing math student. In other words, if you want to be a "star" in math, you might do something more along the lines of CM (and my essay, ahem), and less along the lines of today's conventional AP calc course. These kinds of "remixings" happen all the time. Math ed is like music -- you go through phases, things come into vogue. I'm not saying we should get suckered by the latest fads (a lot of what the traditionalists are fighting as "fuzzy math" seems pretty faddish to me), but on the other hand, we need to be aware that long term trends alter the landscape in math, as in every other discipline. Change happens. My view is that pre-college math is out of synch with what kids could most use and benefit from. Calculus is over-stressed. Fluency with calculus ideas should be developed with an eye towards looking at other topics (a proof of relevance), with more intensive drilling in this subject saved for those most likely to need it professionally. Too much other good stuff is falling by the wayside in the rush to cram calculus into the final year of pre- college. We need a more accelerated path (i.e. a "first pass" tour of duty) through that material that doesn't get so bogged down in the nitty gritty and leave too many students turned off math for life. In making more room for other topics, we'll have the opportunity to phase in computer languages, Python included (it has a lot going for it, as do some of the others). Text books are too slow to match these needs. My approach is going to be based in cyberspace as the primary source medium, not text books. Some of our materials will be more like "finished goods", for teachers who want those (e.g. PDF handouts). But I'm primarily interested in ideas, with teachers customizing content to fit their local needs and students. A lot of this will be private sector and commercial, with curriculum supplies being sold via the same websites. Also working the DVD jukebox angle. Kirby 4D Solutions PS: I see Knuth has his own ideas about calculus reform, which I'm curious to read. Just have to find a way to get TeX files deciphered in Windows (or BeOS). [1] Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics (2nd Edition), Addison-Wesley, 1994. [2] http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python [3] http://www.inetarena.com/~pdx4d/ocn/oop7.html [4] http://www.teleport.com/~pdx4d/quadrays.html
PS: I see Knuth has his own ideas about calculus reform, which I'm curious to read. Just have to find a way to get TeX files deciphered in Windows (or BeOS).
OK, I got the TeX thing figured out, and read/printed Knuth's ocalc.tex from http://www-cs-faculty.stanford.edu/~knuth/preprints.html (under miscellaneous). He's advocating earlier introduction of O-notation, a way of writing a quantity that isn't too specific (just right for some purposes). He wants to introduce the derivative in conjunction with O-notation (which CM introduces, as well as Volume 1 of TAOCP). For TeX on Win98, I'm using Christian Schenk's freeware, downloadable from http://www.miktex.de/ -- seems to work well. Kirby
From: Kirby Urner <urner@alumni.Princeton.EDU> To: koblitz@math.washington.edu, pdx4d@teleport.com Newsgroups: alt.education Subject: Math Through Programming Date: Sat, 27 May 2000 14:10:41 -0700 Reply-To: urner@alumni.Princeton.EDU Greetings sir -- I was just reading your "The Case Against Computers in K-13 Math Education (Kindergarten through Calculus)" at http://www.math.washington.edu/~koblitz/mi.html and wanted to respond. I would agree that the trade-offs may make computers an unwise investment, if that means axing music or art. Plus I'd agree with your point that computer science isn't the same thing as sitting down to use a computer. I haven't read Pea and Kurland's research, which you cite, and maybe their findings would deter me from the kind of curriculum writing I've been doing, the agenda I've been pressing. I don't know yet. I'm advocating a math-through-programming approach, wherein students have access to an interactive command line and learn to code algorithms. I go further, and suggest that the computer science notion of "objects" is worth porting over into mathematics more generally, including in K-12. A lot depends on pedagogy of course. You may see me as trying to resurrect an already failed approach, but I'm seeing enough successes to feel encouraged. Anyway, given you've obviously put a lot of thought into this topic, I wouldn't mind exchanging views. Here's a link to my post of earlier today at the Glenn Commission discussion area: http://webx.ed.gov/cgi-bin/WebX?14@^2321@.ee6b2ea/8 Kirby
participants (6)
-
Arthur Siegel -
Dennis E. Hamilton -
Kirby Urner -
Marc Keller -
Tim Peters -
Tony J Ibbs (Tibs)