another "must have" generator
This is just to get junior experimenting with convergence / divergence on the complex plane. c is our variable. Per this Wikipedia article (fine to project in class, why not, though "teacher reading from encyclopedia" shouldn't come off as mechanical): See: http://en.wikipedia.org/wiki/Mandelbrot_set Also: http://www.4dsolutions.net/ocn/fractals.html IDLE 3.0a2
def mandelbrot(c): z = 0 + c while True: yield z z = z ** 2 + c
c1 = mandelbrot(1) next(c1) 1 next(c1) 2 next(c1) 5 next(c1) 26 next(c1) 677 ci = mandelbrot(1j) next(ci) 1j next(ci) (-1+1j) next(ci) -1j next(ci) (-1+1j) next(ci) -1j next(ci) (-1+1j)
Taking inventory of what I have so far in my Python toolkit: Figurate Numbers Pascal's Triangle (triangular and tetrahedral numbers) Fibonacci Numbers (converge to phi, pentagon math) Vectors (VPython -- xyz, spherical coordinates etc.) Prime Numbers (sieves) Prime Numbers (trials by division) Polyhedra (as Python objects: scale, rotate, translate) Polyhedral Numbers (icosahedral, geodesic spheres) Modulo Numbers (override __mul__, __add__) Finite Groups (Python module) Euclid's Algorithm (Guido's gcd) Euclid's Extended Algorithm (needed for inverses) Totient and Totative (gcd based) Fermat's Little Theorem (assert...) Euler's Theorem for Totients (assert...) Mandelbrot Set (chaotic sequences) Miller-Rabin (or Jython probablePrime) RSA.encrypt(m, N) RSA.decrypt(c, N, d=secretkey) ... I've ordered these roughly in sequence of first encounter, assuming numerous loop-backs and repetitions (Saxon a good model -- called spiraling with scaffolding), thinking roughly grades 9-12, though some adults will do this sequence as a refresher or first time exposure to basic numeracy. This is in no way a complete list, just a smattering of dots, curriculum "nodes" as it were. For some of it, I'd expect to switch more into a "music appreciation" mode i.e. we spend too little time explaining why on earth we do so much around polynomials, make them an in-depth vocational exercise without promising anything specific about their job relevance. When was the last time any of you needed to factor a polynomial for work, and couldn't use Mathematica? Time was, if you lived in Pisa and could factor a 3rd or 4th degree polynomial of a specific form, you could attract a patron for a kind of cerebral cockfighting that went on. """ In 1530, Niccolò Tartaglia (1500-1557) received two problems in cubic equations from Zuanne da Coi and announced that he could solve them. He was soon challenged by Fiore, which led to a famous contest between the two. Each contestant had to put up a certain amount of money and to propose a number of problems for his rival to solve. Whoever solved more problems within 30 days would get all the money. Tartaglia received questions in the form x3 + mx = n, for which he had worked out a general method. Fiore received questions in the form x3 + mx2 = n, which proved to be too difficult for him to solve, and Tartaglia won the contest. """ [ http://en.wikipedia.org/wiki/Cubic_equation ] The lack of an historical dimension in modern math teaching is just another symptom of out-of-control overspecialization, what we're seeking to counter with these more integrative approaches. Moving to executable notations is a clear sign of the times, ample evidence that "time marches on", so it makes sense that we're more time-aware, no longer supposing that the grade school math of our grandparents is the math of our children. Since when did time stand still? I've got more ideas for offering refresher numeracy courses to adults at the Math Forum. A lot of the focus will be instructional game playing on LCDs, sometimes with real money involved, definitely working towards credentialing i.e. adding scores to transcripts, which implies access to testing centers. The coffee shop may still be the best place to study, bone up for that job interview. http://www.youtube.com/watch?v=bfgO-LXGpTM Kirby
I've got more ideas for offering refresher numeracy courses to adults at the Math Forum. A lot of the focus will be instructional game playing on LCDs, sometimes with real money involved, definitely working towards credentialing i.e. adding scores to transcripts, which implies access to testing centers. The coffee shop may still be the best place to study, bone up for that job interview.
More context from the Math Forum: http://mathforum.org/kb/thread.jspa?threadID=1887801&tstart=0 -- back to my Coffee Shops Network idea, where you get bright LCDs but not so much of that isolated "study carrel" approach, unless you rent one of the private rooms, like at CubeSpace. I don't want to just focus on outreach to children, when it comes to Pythonic Math. What might we offer to busy adults, in addition to Safari, Showmedo, Python 411, Python.org itself? I wonder if PSF is aware of many "Python commercials" in the pipeline. Ruby seems more aggressive at self promotion. http://www.youtube.com/watch?v=528BCJiRkks What with Monty and scary snakes, we've certainly got a strong base to play from, if wanting to advertise. Kirby
http://www.youtube.com/watch?v=bfgO-LXGpTM
Kirby
On Tue, Jan 20, 2009 at 12:24 AM, kirby urner <kirby.urner@gmail.com> wrote:
For some of it, I'd expect to switch more into a "music appreciation" mode i.e. we spend too little time explaining why on earth we do so much around polynomials, make them an in-depth vocational exercise without promising anything specific about their job relevance. When was the last time any of you needed to factor a polynomial for work, and couldn't use Mathematica?
i definitely agree with you and since i am a young teacher in italy i am struggling to change the wave which suffocate the desire for math in students ... i plan to cook some resource where math is taught in reverse order, i.e. starting from real-young world and only after you show the theory behind since i know many are on the same point of view, please let me know how to get in contact with other teachers working in this direction thank you anyway -- roberto OS: GNU/Linux Debian Kubuntu, Edubuntu
You sound like a brave man roberto. You've come to the right place. :) Kirby On Fri, Jan 23, 2009 at 1:11 PM, roberto <roberto03@gmail.com> wrote:
On Tue, Jan 20, 2009 at 12:24 AM, kirby urner <kirby.urner@gmail.com> wrote:
For some of it, I'd expect to switch more into a "music appreciation" mode i.e. we spend too little time explaining why on earth we do so much around polynomials, make them an in-depth vocational exercise without promising anything specific about their job relevance. When was the last time any of you needed to factor a polynomial for work, and couldn't use Mathematica?
i definitely agree with you and since i am a young teacher in italy i am struggling to change the wave which suffocate the desire for math in students ...
i plan to cook some resource where math is taught in reverse order, i.e. starting from real-young world and only after you show the theory behind
since i know many are on the same point of view, please let me know how to get in contact with other teachers working in this direction
thank you anyway
-- roberto OS: GNU/Linux Debian Kubuntu, Edubuntu _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
kirby urner schrieb:
This is just to get junior experimenting with convergence / divergence on the complex plane. c is our variable.
Per this Wikipedia article (fine to project in class, why not, though "teacher reading from encyclopedia" shouldn't come off as mechanical):
See: http://en.wikipedia.org/wiki/Mandelbrot_set Also: http://www.4dsolutions.net/ocn/fractals.html
IDLE 3.0a2
def mandelbrot(c):
z = 0 + c while True: yield z z = z ** 2 + c
May I again add an interesting thing, this time another indispensable generator, more exactly: three of them: def feigenbaum1(c,x): while True: yield x x = c*x*(1-x) def feigenbaum2(c,x): while True: yield x x = c*x-c*x*x def feigenbaum3(c,x): while True: yield x x = c*(x-x**2) along with this testing/experimenting function: def feigenbaumtest(feigenbaum, iterations=80): f = feigenbaum(3.93, 0.5) for i in range(iterations): res = next(f) return res
feigenbaumtest(feigenbaum1, 4) 0.24761176565334103 feigenbaumtest(feigenbaum2, 4) 0.24761176565334098 feigenbaumtest(feigenbaum3, 4) 0.24761176565334167 feigenbaumtest(feigenbaum1, 40) 0.43518828176766455 feigenbaumtest(feigenbaum2, 40) 0.43518808407096854 feigenbaumtest(feigenbaum3, 40) 0.43518950764209768 feigenbaumtest(feigenbaum1) 0.70329204370098442 feigenbaumtest(feigenbaum2) 0.8147039925205275 feigenbaumtest(feigenbaum3) 0.66573747868397481
Certainly something which demonstrates a (by many) unexpected relation between maths and computer science. Regards, Gregor
Yep, no doubt about it, we have some worthy generators, have only scratched the surface with Ramanujan's so far (fun to have extended precision decimal type for more context, cross-checking pi to a couple hundred digits maybe -- we've got that here too). You can't create vacancies for positions you've not thought of, and this "gnu math teacher" idea, of someone equipped to do both algebra and computer languages at the same time, pre-college, is a vast empty field the way I see it, precious few practitioners. You might say that's because there's no demand, but I see plenty of kids very hungry for this material, going out of their way to find it on-line. I'm just thankful we have the Internet, as those getting hooked up, including the lucky XO set, don't have to slave through a lot of pre-computerite nonsense before getting to the good stuff. Or rather, they maybe get to slave away by day (with traditional black or white boards) and learn by night (when free to use Youtube). I'm not sure how loyal this generation will be though, to those factory-style schools, given their own growing up experience. Maybe it's time to put those behind us? Do they serve a real purpose, other than day care? Some came to that position long ago, but I'm less radical, think we could pipe services like Safari into Winterhaven, our local Hogwarts, and keep those math labs humming. I know many geeks who "do the right thing" and support public schooling, work to update the curriculum, get involved in the democratic process. The temptation is to circle the wagons and do "company schools" like before Oregon became a state. Parents in high tech just don't see the point of making junior a "prisoner of malpractice" for so many years. Town-gown relations break down over such issue, employers flee elsewhere, like to Bangalore. In Portland, we keep working on bridging the gap, via OS Bridge for example (planned for June) i.e. we'd like to keep attracting high tech sector employers and their families, on the basis of our having strong schools (one of our competitive edges, besides skiing and snow boarding, great wine and cheese, beer, coffee...). Kirby On Mon, Jan 26, 2009 at 6:12 PM, Gregor Lingl <gregor.lingl@aon.at> wrote:
kirby urner schrieb:
This is just to get junior experimenting with convergence / divergence on the complex plane. c is our variable.
Per this Wikipedia article (fine to project in class, why not, though "teacher reading from encyclopedia" shouldn't come off as mechanical):
See: http://en.wikipedia.org/wiki/Mandelbrot_set Also: http://www.4dsolutions.net/ocn/fractals.html
IDLE 3.0a2
def mandelbrot(c):
z = 0 + c while True: yield z z = z ** 2 + c
May I again add an interesting thing, this time another indispensable generator, more exactly: three of them:
def feigenbaum1(c,x): while True: yield x x = c*x*(1-x)
def feigenbaum2(c,x): while True: yield x x = c*x-c*x*x
def feigenbaum3(c,x): while True: yield x x = c*(x-x**2)
along with this testing/experimenting function:
def feigenbaumtest(feigenbaum, iterations=80): f = feigenbaum(3.93, 0.5) for i in range(iterations): res = next(f) return res
feigenbaumtest(feigenbaum1, 4) 0.24761176565334103 feigenbaumtest(feigenbaum2, 4) 0.24761176565334098 feigenbaumtest(feigenbaum3, 4) 0.24761176565334167 feigenbaumtest(feigenbaum1, 40) 0.43518828176766455 feigenbaumtest(feigenbaum2, 40) 0.43518808407096854 feigenbaumtest(feigenbaum3, 40) 0.43518950764209768 feigenbaumtest(feigenbaum1) 0.70329204370098442 feigenbaumtest(feigenbaum2) 0.8147039925205275 feigenbaumtest(feigenbaum3) 0.66573747868397481
Certainly something which demonstrates a (by many) unexpected relation between maths and computer science.
Regards, Gregor
participants (3)
-
Gregor Lingl
-
kirby urner
-
roberto