On Tue, 11 Jul 2006, John Randall wrote:
John,
Thank you very much for answering my questions and
so clearly. My excuse for not getting the obvious results
for h{hh and hh{h is that by chance I had a typo for hh and
thus could not see the desired result. Hopefully if I had
not made that error I might have been able to realize some
of the other results you showed. But...
+ Brian:
+
+ Here are a couple of ways of finding the inverse of a permutation.
+ This is the inverse in a group-theoretic sense, where the group
+ multiplication is (non-commutative) composition of permutations. If
+ the permutations are expressed in direct form, composition is { .
+
+ h=:1 2 0 3
+ hh=:2 0 1 3
+ h { hh
+ 0 1 2 3
+ hh { h
+ 0 1 2 3
+
[snip]
+
+ However, you can do this in one:
+
+ /: h
+ 2 0 1 3
+
I did not anticipate the simple result above (/: h)
and am very pleased to have you point it out. And finding
the inverse by reversing each cycle (below) is also new to
me. Also ...
+ Alternatively, you can find the inverse by reversing each cycle when
+ the permutation is expressed in disjoint cycle form.
+
+ Convert h to cycle form,
+
+ +-----+-+
+ |2 0 1|3|
+ +-----+-+
+
+ reverse each cycle,
+
+ +-----+-+
+ |1 0 2|3|
+ +-----+-+
+
+ convert back to direct form
+
+ 2 0 1 3
+
+ This corresponds to
+
+ pinv3=:|.&.>&.C.
+ pinv3 h
+ 2 0 1 3
+
+ Obviously this method is most useful when you start and finish with
+ the permutation in cycle form, and you find the inverse with |.&.> .
+
The relation of { and } below is especially clear
and reinforces the pattern I originally realized.
+ Finally, { and } and (kind of) inverses with respect to permutations,
+ but this is really the result of the inverse permutation being given
+ by /: . This is what I was getting at:
+
+ f=:3 : 'y { i.#y' NB. identity
+ f h
+ 1 2 0 3
+
+ g=:3 : '(i.#y) y } y' NB. inverse: only shape of RHA to } matters
+ g h
+ 2 0 1 3
+
+ Best wishes,
+
+ John
+
So, thank you, again.
(B=)
Brian Schott
Atlanta, GA, USA
schott DOT bee are eye eh en AT gee em ae eye el DOT com
http://schott.selfip.net/~brian/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm