In response to a similar question I asked a few years ago Roger Hui's
response introduced me to the outstanding j essays. Start from the
odometer essay:
http://www.jsoftware.com/jwiki/Essays/Odometer
On 12/11/2013 11:50 AM, [email protected] wrote:
Date: Wed, 11 Dec 2013 16:36:46 +0000
From: Jon Hough<[email protected]>
To:"[email protected]" <[email protected]>
Subject: [Jprogramming] J and Group Theory
Message-ID:<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I saw in the J labs the example for the group Z_4 (cyclic group of order 4).
I am now trying to ape this method to create the group Z_2 x Z_2 (direct
product of cyclic group order 2 with itself).
This is what I have done so far:
a =: 0 0
b =: 0 1
c =: 1 0
d =: 1 1
f =: 2&|@+
This is the group operator, essentially mod 2 addition.
Q: How can I create a,b,c,d more simply? Perhaps with a single verb, instead of
explicitly creating each element?
e.g. a verb or train that returns:
0 0
0 1
1 0
1 1
Thanks for your patience.
Jon
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm