First attempt: kr=:*&$ $ ,@:>@:,@:(|:"2)@:(<"1)@:(*"0 _) a kr b 2 2 2 3 3 3 2 4 2 3 6 3 2 2 2 3 3 3 5 5 5 7 7 7 5 10 5 7 14 7 5 5 5 7 7 7 -------------------------------------------- On Sun, 10/15/17, Cliff Reiter <[email protected]> wrote:
Subject: [Jprogramming] reminded of an old puzzle To: [email protected] Date: Sunday, October 15, 2017, 12:25 AM The idea is to write a verb which gives the Kronecker product. https://en.wikipedia.org/wiki/Kronecker_product For example: ]a=:2 2$2 3 5 7 2 3 5 7 ]b=:1+4=i.3 3 1 1 1 1 2 1 1 1 1 a kr b 2 2 2 3 3 3 2 4 2 3 6 3 2 2 2 3 3 3 5 5 5 7 7 7 5 10 5 7 14 7 5 5 5 7 7 7 Note each entry in a times b appears as a block in the Kronecker product. This may have been discussed in this forum before, but let's try to rethink the problem. The first time I was challenged with this question was in June of 1999 at a "J in the Math classroom" workshop at Messiah College. My (possibly faulty) recollection was that their were four established Jers there (Ken Iverson, Richard Brown, Donald McIntyre?? and myself). We investigated defining kr. We each had a laptop, sitting in the 4 chairs in the picture: http://webbox.lafayette.edu/~reiterc/j/ke_iverson/wdsc00017.jpg It was revolutionary for the era that we were computing, but we were not in a laboratory. Happy Jing, Cliff ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
