More cogitations on group theory...

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

More cogitations on group theory...

kirby urner-4
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
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: More cogitations on group theory...

Mokurai
On Sun, May 15, 2011 at 00:35, kirby urner <[hidden email]> wrote:
> More cogitations on group theory...

The fundamental idea of a group can be introduced to preschoolers. I
am writing and programming lessons on this topic, which I will test on
children, and report to you.

My first example will be a triangle with sides in three colors. How
many ways can you place that in a triangular frame? How many moves are
possible? Can you reverse any move? Do the moves associate? (That is,
is doing A and B, and then C, the same as doing A, and then B and C?)
Well, there you are, all of the group axioms. There is an associative
function with inverses.

Then we look at other symmetries of other shapes, and find that the
positions and the moves match up, and we always get a group, even if
it is the trivial group for a completely asymmetric shape: the group
with only one element.

Then infinite groups, like the symmetries of a circle or sphere.

Then permutations. Every finite group is a subset of a permutation
group. I'll leave matrices for a later grade.

There is a very pleasant book on group theory for non-mathematicians,
which uses Rubik's cube for examples throughout. I have it bookmarked
on Amazon, but I am going to finish this e-mail and go to bed rather
than look it up tonight.

Groupoids, categories, rings (clock time), fields (modular
arithmetic), vector spaces, and algebras require a bit more thought,
but I am sure that they can be done.

Of course, in every case I am talking about extracting and presenting
the fundamental ideas, and leaving proofs, notations, and all but the
simplest calculations for later.

> 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
> _______________________________________________
> Edu-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/edu-sig
>



--
Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.
http://www.earthtreasury.org/
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: More cogitations on group theory...

kirby urner-4
> Groupoids, categories, rings (clock time), fields (modular
> arithmetic), vector spaces, and algebras require a bit more thought,
> but I am sure that they can be done.
>

That's perfect Ed.  Good to hear for another die-hard "group
theory for children" dude, a vanishing breed perhaps.

My intended audience might actually be older people, including
so-called "retirement community" students who have grand kids
and want to have inter-generational topics.  Many learned
BASIC as kids (the Bill Gates generation).

Another group you can massage into a field are integers
multiplying modulo N, except not just any integers, only
N's totatives.  Back to permworld and Guido's exceedingly
simple implementation of Euclid's Algorithm.

>>> def gcd(a,b):
        while b:
                a , b = b, a % b
        return a

>>> gcd(12, 4)
4
>>> gcd(12, 5)
1
>>> totatives12 = [m for m in range(12) if gcd(m, 12) == 1 ]
>>> totatives12
[1, 5, 7, 11]
>>> from random import choice

>>> (choice(totatives12) * choice(totatives12)) % 12
11
>>> (choice(totatives12) * choice(totatives12)) % 12
1
>>> (choice(totatives12) * choice(totatives12)) % 12
5

Asserting closer (group property):

>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)

True
>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)

True
>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)

True

If the target number is prime instead of composite (e.g. 23
instead of 12), then you have field properties, not just group
properties i.e. + is closed as much as * is.

You'll find me ranting on mathfuture how high schools bleep
over any opportunity to introduce "totative" or "totient" in
favor an an exclusive "factor tree" based approach to
gcd.  That made more sense before RSA was in every
web browser.  In a "how things work" curriculum, one
would wish for more computer literacy.

http://groups.google.com/group/mathfuture/msg/11005d0c9dc9eba2
(I've gotten more correspondence from Milo -- he wants to
make sure we all know that Turing at Bletchley Park did
*not* solve the German U-boat 5-rotor puzzle, doesn't like
how much credit Turing gets).

I'd like want to use John Zelle's graphics.py in the module
where we draw some Wolfram checkerboard of black
and orange rectangles ala New Kind of Science (NKS).
We were doing that back in February 2007.

http://mail.python.org/pipermail/edu-sig/2007-February/007736.html

The new version gets Conway's Game of Life from the
same "turtle" (called a "tractor" in farmworld, but the
same idea, transferred to all-ASCII waves of grain).
Even Mandelbrot is rendered in ASCII "tractor art":

http://mybizmo.blogspot.com/2011/05/lesson-planning.html

These are ancient threads as far as edu-sig is concerned.
We've always been trendy around here. :)

> Of course, in every case I am talking about extracting and presenting
> the fundamental ideas, and leaving proofs, notations, and all but the
> simplest calculations for later.
>

Of course.  I've got an older bunch but this isn't a course
about Group Theory, it's a course about learning to
program in the Python computer language, with a backdrop
of standard Computer Science courses (Euclid's Algorithm
chief among them, at least here on edu-sig).

Kirby
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: More cogitations on group theory...

Mokurai
On Sun, May 15, 2011 at 04:12, kirby urner <[hidden email]> wrote:
>> Groupoids, categories, rings (clock time), fields (modular
>> arithmetic), vector spaces, and algebras require a bit more thought,
>> but I am sure that they can be done.

I mentioned a few Lie Groups, but I omitted the name. Toposes,
topologies, tilings, and fractals would be interesting to investigate,
too.

> That's perfect Ed.  Good to hear for another die-hard "group
> theory for children" dude, a vanishing breed perhaps.

It's just a fancy name for symmetry.

MC Frontalot: Why do mirrors reverse left and right, but not up and down?
John Hodgeman: They're just lazy. They could if they felt like it.

Yeah, so what's really going on with mirrors?

MC Frontalot is a nerdcore hiphop artist, and John Hodgeman is the
author of More Information than You Require. He was also the PC in the
Mac ads, and is sometimes on The Daily Show.

> My intended audience might actually be older people, including
> so-called "retirement community" students who have grand kids
> and want to have inter-generational topics.  Many learned
> BASIC as kids (the Bill Gates generation).
>
> Another group you can massage into a field are integers
> multiplying modulo N, except not just any integers, only
> N's totatives.  Back to permworld and Guido's exceedingly
> simple implementation of Euclid's Algorithm.
>
>>>> def gcd(a,b):
>        while b:
>                a , b = b, a % b
>        return a
>
>>>> gcd(12, 4)
> 4
>>>> gcd(12, 5)
> 1
>>>> totatives12 = [m for m in range(12) if gcd(m, 12) == 1 ]
>>>> totatives12
> [1, 5, 7, 11]
>>>> from random import choice
>
>>>> (choice(totatives12) * choice(totatives12)) % 12
> 11
>>>> (choice(totatives12) * choice(totatives12)) % 12
> 1
>>>> (choice(totatives12) * choice(totatives12)) % 12
> 5
>
> Asserting closer (group property):
>
>>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)
>
> True
>>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)
>
> True
>>>> if (choice(totatives12) * choice(totatives12)) % 12 in totatives12: print (True)
>
> True
>
> If the target number is prime instead of composite (e.g. 23
> instead of 12), then you have field properties, not just group
> properties i.e. + is closed as much as * is.
>
> You'll find me ranting on mathfuture how high schools bleep
> over any opportunity to introduce "totative" or "totient" in
> favor an an exclusive "factor tree" based approach to
> gcd.  That made more sense before RSA was in every
> web browser.  In a "how things work" curriculum, one
> would wish for more computer literacy.
>
> http://groups.google.com/group/mathfuture/msg/11005d0c9dc9eba2
> (I've gotten more correspondence from Milo -- he wants to
> make sure we all know that Turing at Bletchley Park did
> *not* solve the German U-boat 5-rotor puzzle, doesn't like
> how much credit Turing gets).
>
> I'd like want to use John Zelle's graphics.py in the module
> where we draw some Wolfram checkerboard of black
> and orange rectangles ala New Kind of Science (NKS).
> We were doing that back in February 2007.
>
> http://mail.python.org/pipermail/edu-sig/2007-February/007736.html
>
> The new version gets Conway's Game of Life from the
> same "turtle" (called a "tractor" in farmworld, but the
> same idea, transferred to all-ASCII waves of grain).
> Even Mandelbrot is rendered in ASCII "tractor art":
>
> http://mybizmo.blogspot.com/2011/05/lesson-planning.html
>
> These are ancient threads as far as edu-sig is concerned.
> We've always been trendy around here. :)
>
>> Of course, in every case I am talking about extracting and presenting
>> the fundamental ideas, and leaving proofs, notations, and all but the
>> simplest calculations for later.
>>
>
> Of course.  I've got an older bunch but this isn't a course
> about Group Theory, it's a course about learning to
> program in the Python computer language, with a backdrop
> of standard Computer Science courses (Euclid's Algorithm
> chief among them, at least here on edu-sig).
>
> Kirby
> _______________________________________________
> Edu-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/edu-sig
>



--
Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.
http://www.earthtreasury.org/
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: More cogitations on group theory...

Kirby Urner-6
On Sun, May 15, 2011 at 9:13 AM, Edward Cherlin <[hidden email]> wrote:
On Sun, May 15, 2011 at 04:12, kirby urner <[hidden email]> wrote:
>> Groupoids, categories, rings (clock time), fields (modular
>> arithmetic), vector spaces, and algebras require a bit more thought,
>> but I am sure that they can be done.

I mentioned a few Lie Groups, but I omitted the name. Toposes,
topologies, tilings, and fractals would be interesting to investigate,
too.


Yes, it's nice to have this back office lingo to go with the work, 
like a garnish.  In our case, the group theory is a kind of banter,
a chance to say CAIN (closure associativity inverse neutral) 
and wink at someone, because you both went to that same
summer of code or whatever barcamp.

I've noticed the MBA types are tracked away from sounding
too much like computer scientists, which is where this 
curriculum is refreshing.  Most of our students are already
employed (an educated guess) and are using some of their
free time to invest in new skills.  This is the demographic
with the best access.  Nursing homes, penitentiaries, and
high schools, tend to lag, though I could see those numbers 
picking up in more liberal countries like Sweden. But then 
who speaks Swedish in California... distance education 
gets confusing.

One of my latest live gigs was a room full of PhDs in Baltimore.
No one there needed any more "academic credit" and yet they
all wanted to learn Python.  They weren't from the same 
specialties always (quite a few were in instrumentation for
Hubble type spacecraft).  Putting a group theory spin on it, 
having a few polyhedrons (literally, in my carry-on) helped 
lighten the atmosphere as I was clearly not going to talk down
to them, nor bore them with too many examples about money
(a common mistake of business class teachers, when 
confronted with a science-minded audience (hence names
like PermCell and PermDNA)).
 
> That's perfect Ed.  Good to hear for another die-hard "group
> theory for children" dude, a vanishing breed perhaps.

It's just a fancy name for symmetry.

MC Frontalot: Why do mirrors reverse left and right, but not up and down?
John Hodgeman: They're just lazy. They could if they felt like it.

Yeah, so what's really going on with mirrors?

MC Frontalot is a nerdcore hiphop artist, and John Hodgeman is the
author of More Information than You Require. He was also the PC in the
Mac ads, and is sometimes on The Daily Show.


Sounds like I'll find lots of Youtubes of this guy.  We've already 
discussed "demented".  I'd let PeeWee Herman teach Python if 
he wanted, though I think some of his talking furniture items 
might be better at it.

Kirby


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