[Edu-sig] More cogitations on group theory...

kirby urner kirby.urner at gmail.com
Sun May 15 06:35:07 CEST 2011


More cogitations on group theory...

You get these fads, gripping at the time, that leave legacy traces.
In New Math, we got imprinted with some Theory of Sets.

Some scoff at that now, say it was just notation:  intersection,
union, subset, element of... taught to grade schoolers.  Parents
were agog.  This was 1960s or so.

A lot of it stayed.  Singapore Math, favored by many conservatives
(e.g. Mathematically Correct with ties to Cal State) still has it.

Converting among bases suffered though, during the Great
Retaliation.  So-called "space age math" was hated and feared
by the peasantry.  NASA was given no interesting missions,
boost phase was outsourced.  Orlando engineering families
went to work for The Mouse instead.

http://www.google.com/search?hl=en&biw=1920&bih=948&gbv=2&tbm=isch&aq=f&aqi=&oq=&q=venn%20intersection%20%22new%20math%22

http://bit.ly/kWlclB  (compressed version of above)

(I scooped up several of mine in the above in this swoop through
Google's data space, might be fun to pick out which ones... **).

In Python, we have the set type, and it's important.  It has to
share the limelight though, and comes off almost as a subspecies
of dict, a dict with keys, but no values.

What a concept.

set tends to come later in the Pythonista's learning career, though
at OST it's still pretty early, definitely in the first unit.  But then
we're pretty steep, with MySQL and GUI programming in unit 2.

Group Theory, like Clifford Algebra, is one of those things a
small cadre thought might be taught to high schoolers, in
some Jetsons-style science fiction future sponsored by Quaker
Oats or one of those Breakfasts of Champions.

I was an ardent member of this cast and to this day know
how to wave the flag when called upon.

Core to the idea of a group is a set of permutations, easily
modeled as a Python dict.  A permutation, or perm for short,
is a complete swap of some finite set (no dupes), such that
the original list maps to a random.shuffle of a mirror.

That's what we implement in permworld.PermDNA, one of
the early bird perm factories in this particular Level 4 curriculum.

>>> ================================ RESTART ================================
>>> import OST
>>> from OST.permworld import PermDNA, PermCell
>>> from OST.permutils import cyclic, anticyclic
>>> p = PermDNA()
>>> thecell = PermCell(p)
>>> antibody = ~thecell
>>> voter = thecell("Eating transcriptionase for breakfast and spitting back collogen")
>>> voter # enciphered ballot
'Elndpscnglpkvgdjndbplkrcfbgcagrleflknclpxckjdnndpscalvecvbzzbsrp'
>>> antibody(voter)  # decryption key per ~ operator, __invert__ in PermCell
'Eating transcriptionase for breakfast and spitting back collogen'

Why go to all this trouble, why not just work with integers
(which form various finite groups in upcoming lessons)?
Answer:  operator overloading.  There's no point overloading
+, *, ** etc. where integers are concerned.  The operators are
already defined.  With perm objects, or PermCells as we
call them (permDNA incepted) you still need to write that
__mul__ operator, and that __div__ which is "multiply by
the multiplicative inverse of."

>>> thecell
PermCell: (('a', 'l', 'z', 'w', 'h', ' ', 'c', 'v', 'q', 'y', 't',
'n', 'p', 'j', 'm', 'i', 'd', 'x', 'o', 'b'), ('e', 'r', 'g', 's',
'k'), ('f',), ('u',))
>>> antibody
PermCell: (('a', 'b', 'o', 'x', 'd', 'i', 'm', 'j', 'p', 'n', 't',
'y', 'q', 'v', 'c', ' ', 'h', 'w', 'z', 'l'), ('e', 'k', 's', 'g',
'r'), ('f',), ('u',))
>>> identity = thecell * antibody
>>> identity
PermCell: (('a',), (' ',), ('c',), ('b',), ('e',), ('d',), ('g',),
('f',), ('i',), ('h',), ('k',), ('j',), ('m',), ('l',), ('o',),
('n',), ('q',), ('p',), ('s',), ('r',), ('u',), ('t',), ('w',),
('v',), ('y',), ('x',), ('z',))
>>> print(OST.permutils.__doc__)

permutils.py  1.1
(gpl) OST / Python 4
http://www.gnu.org/software/gsl/manual/html_node/Permutations-in-cyclic-form.html

is the kind of thing we're thinking.  __div__ has not been
implemented and so would be a student project, just as
__setattr__ and __getarr__ might be defined on a
reworked farmworld.py (free and open source, just
like MIT courseware -- what all of the better schools
are doing it seems, putting their cards on the table).

Sorry for so much technical jargon, but I'm thinking to
attract others with experience in this area.  We've got
cyclic notation going, modeled on the J language and one
of the GNU projects.  The isomorphism of a perm expressed
as a dict, and a perm expressed as a tuple of tuples,
and the algorithms for going both directions, is one of
the pillars of permworld, as you might expect.

Kirby


(sm) ghost ship productions, usa.or.pdx.4d (dba pending)

** http://controlroom.blogspot.com/2007/10/portland-radio.html
(because of surrounding posts I suppose -- the link was to
these pictures from Portland's KBOO radio station).

Another couple:
http://www.grunch.net/synergetics/ncmtmemo.html

More obviously (totally about the New Math):
http://controlroom.blogspot.com/2007/10/recalling-sputnik.html


More information about the Edu-sig mailing list