1 Introduction to CS201


What this course is about: learning enough Python to make your explorations of algebra concepts more enjoyable and self-informative.


Getting Started


Some brief remarks about getting going in Python


How to Think Like a Computer Scientist

The Python version of Allen Downey's open source book, with Jeff Elkner.


Introducing Sequences

A first look at sequences as a stepping stone into various algebra topics.


On-Line Encyclopedia of Integer Sequences

Enter the beginning terms of your sequence and see if there's a corresponding sequence in the database.


Pythonic Mathematics

I wrote this PDF for Europython 2005, held in Gothenberg, Sweden.  This PDF summarizes a lot of my thinking at the time, and likely reflects a lot of my thinking to this day.  I also have an accompanying PowerPoint version (shared with my audience in Sweden).


This course needs DVD clips


I think a lot of this material would be much more accessible if we had an easy way to pull up relevant short clips, such as we find on Sesame Street about the letter A or number 5, except about other topics (the ones studied here). The emergence of video.google.com is an exciting development in this regard.


Classroom Infrastructure

A posting to the Math Forum about new technology I'd like to see in the classroom.


2Prime and Composite Numbers


Let's review what we know about the positive integers: they break down into roughly two sets: the prime and the composite. The numbers 1 and 0 don't really belong to either group.


Basic Operations in Python

In this curriculum segment, we investigate primitive numeric operations, plus we import some functions from the math module. 


Euclid's Algorithm for the GCD

Euclid's algorithm is one of the oldest on record.  We don't think Euclid invented it, any more than we suppose Plato first discovered the five Platonic solids.  However, Euclid, like Plato, helped ensure this valuable method remained available to subsequent scholars.


Functions and Looping

Here we look at control structures within the body of a Python function.  We also take a look at how to set default arguments.


Generators and Pascal's Triangle

The concept of a generator is not unique to Python -- I believe it was inspired by a feature in Icon, another language, just like list comprehension syntax was inspired by Haskell.  A generator is like a looping function with state, i.e. it remembers local variables from one cycle to the next.


Dot Notation

Common to many object oriented languages is dot notation, a way of using the period to gain access to an object's properties and methods.


3Triangular and Square Numbers


Let's write Python functions to return the Nth term in the Triangular and Square number sequences.


Tetrahedral and Cubic Numbers

Now let's use Python to generate these polyhedral number sequences.


Cuboctahedral and Icosahedral Numbers

Finally, let's explore this important number sequence, and where it takes us in molecular biology, crystallography, chemistry, and architecture.


Python and Mathematics (PyCon 2004)

Note: I was unable to actually present this paper owing to sudden news of family illness. I was in DC for a symposium on Buckminster Fuller, on a panel with E.J. Applewhite and others.  Then I helped Blaine D'Amico with a science workshop for kids (we built at octet truss out of toothpicks).  After that, I flew home.


Microarchitecture of the Virus

The icosahedral numbers thread turns into the geodesic spheres thread, leading to microbiology (virology), architecture (Tacoma Dome etc.), and chemistry (buckyballs, nanotubes).


Prototyping Shelters


This is a sidebar on pioneering work in the world of shelter design. Fuller called them "environment controls" in an effort to counter our prejudicial imaginations, which a very biased towards a particular concept of "home". Perhaps these prototypes are for vacation or resort villages, or for disaster relief.


4Types of Object

Now that we've learned about controlling flow using functions, it's time to package our functions, as methods, into objects.  Objects maintain state and allow us to organize our thinking using metaphors that remind us of our real world experience, of objects with properties (e.g. color) and behavior (e.g. wags tail).


Playing with Robots

Ideally, this curriculum segment will benefit from marketplace innovations in the "programmable robot pet" genre.  This course would especially benefit if the control language were Python.


5The Rational Number Type

Let's develop a Rat class (or name it something else if you're afraid of rats).



The Polynomial Type

Polynomials have degree and coefficients.  In this module we develop a compact way of expressing polynomial objects, such that we may multiply them together.  Dividing one polynomial by another is not guaranteed to give you a new polynomial however.  Polynomials form a Ring (see future module).


Vector Type

We're going through these in fairly quick progression.  This is a preview course.  We go back and dissect and embellish in more detail in follow-up courses.  This is all about whetting the appetite and providing overview.


A Quick Dive into Fractals

When two complex numbers multiply, the Argand Diagram shows a rotation and magnitude effect.  An iterative approach (start with any complex number on the plane and keep plugging back in) will give a divergent or convergent result, with the rate of divergence driving a color wheel mapping.


Fractals with Python and PIL

PIL is Python's Imaging Library.  Using PIL, we're able to control the individual pixels on a canvas object, allowing us to publish the visual representation of a fractal, once we've chosen a color scheme.


Python Code for a Vector Class

No need to reinvent the wheel.  Start with working code, tweak to taste.


Python Code for Talking to POV-Ray

Python is a good glue language.  What does that mean?  In this module, we translate "vector talk" (is in coords.py) into "scene description language," the native language of POV-Ray.  Replace "html" with "py" in the URL for a plaintext version.


A Shapes class

This may be more source code than you want or need.  Many will call my approach idiosyncratic, in that I make use of quadrays, a type of simplicial coordinate system, plus calibrate my volumes to match those of the concentric hierarchy in synergetics.  These are somewhat esoteric features that only a few teachers will probably care for, at least initially.


6Modulo Number Type

This class allows us to set a class variable (new concept in this context), namely the Modulus N for all the objects.  These objects, basically integers, will then perform arithmetic operations modulo N.


GCD and Relative Primality

If two integers have no factors in common other than one, we say their relatively prime, or coprime.  Some people call them "strangers."  They have no common denomintor.  Our GCD function will therefore tell us about the relative primehood of any two integers.


Euler's Totient Concept

The totient of a positive integer N is the number of smaller positive integers that are relatively prime to N.  For example, the numbers less than 12 with 1 as the only common factor are: 1, 5, 7, 11.  Therefore, the totient of 12 is 4.


7Properties of a Group

A review of Group Theory concepts covered so far.


Vegetable Group Soup

This demo uses vegetables in place of integers in Z(6).  The supplementary reading is somewhat technical for early algebra students, but the demo itself should prove fairly digestible.


Properties of a Ring

The algebraic structure known as a Ring introduces and second operation, in relationship to the first.  We have full group properties for the first operation, but not the second.


Properties of a Field

Fields have two operations, both with full group properities, plus the distributive relationship between them.


8Polyhedra and Symmetry Groups

Polyhedra may be categorized according to what kinds of rotational symmetry they support and their various axes.  For example, the icosahedron is 5-fold symmetric around its vertex-to-opposite-vertex axes:  if you rotate it 1/5th of a complete rotation around such an axis (72 degrees), it ends up looking unchanged.


Symmetry: A Unifying Concept

by Istvan and Magdolna Hargittai


9Fermat's Little Theorem

Fermat's Little Theorem defines a condition that's always true for prime numbers, but is also true for some composites.  By tweaking the condition, we're albe to filter out almost all composites, but not all of them.


Euler's Theorem


Euler's Theorem is actually more general than Fermat's Little Theorem, i.e. once we prove Euler's is true, we get Fermat's as a consequence.


Crypto 101


A short introduction to the history of cryptography, with special attention to the symmetric secret key system versus the public key system. This is how we pay them back for slogging through some of those number theory segments: RSA will be somewhat comprehensible.


10Topical Review and Class Party

This might be some multi-media blow-out, where we recap a lot of content visually, with allusions to future possibilities, but let the students have fun, let off steam, stage a dance, invite a band, whatever.


You are logged in as Kirby Urner ( Logout)

_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to