Condensing John Randall's exposition:

rot =: (1&|.)on(1&|."1) NB. rotate rows & cols by 1
flip =: |. on |."1      NB. mirror-image about centre
tr =: |:                NB. transpose
ref =: tr on flip       NB. reflect in counter diagonal

Then

G = rot G  -->  G = rot^:n G   for every n
          -->  each subdiagonal of G consists of a single repeated number
          -->  G = ref G
and so

G = ref G         {G = rot G}
 = tr flip G     {defn of ref}
 = flip tr G     {they are commutative}
 = flip G        {G = tr G}

Thanks /J

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to