[Jprogramming] Cartesian Product

Brian Schott schott.brian at gmail.com
Sat Feb 24 21:39:45 HKT 2007


Kip,

	Do you mean this?

   {;:'ht ao gtw'
+---+---+---+
|hag|hat|haw|
+---+---+---+
|hog|hot|how|
+---+---+---+

+---+---+---+
|tag|tat|taw|
+---+---+---+
|tog|tot|tow|
+---+---+---+

On Sat, 24 Feb 2007, Kip Murray wrote:

+ It is an easy puzzle to produce CP1 below.
+
+ The dictionary entry for Catalog ({) offers
+
+    CP=: {@(,&<)
+    0 1 CP 2 3 4
+ +---+---+---+
+ |0 2|0 3|0 4|
+ +---+---+---+
+ |1 2|1 3|1 4|
+ +---+---+---+
+
+ But a better Cartesian product could do this:
+
+    'ht' CP1 'ao' CP1 'gtw'
+ +---+---+---+
+ |hag|hat|haw|
+ +---+---+---+
+ |hog|hot|how|
+ +---+---+---+
+
+ +---+---+---+
+ |tag|tat|taw|
+ +---+---+---+
+ |tog|tot|tow|
+ +---+---+---+
+
+
+ Kip Murray
+ Math, UofHouston
+
+ cmurray at uh.edu
+ http://www.math.uh.edu/~km
+ ----------------------------------------------------------------------
+ For information about J forums see http://www.jsoftware.com/forums.htm
+

(B=) <----------my "sig"

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/


More information about the Programming mailing list