Auwvax.343 net.lang.apl utzoo!decvax!harpo!uwvax!greg Mon Apr 26 11:04:12 1982 example of self-replicating expression Jeff Shallit sent me several back issues of APL News, a publication of APL Press, Box 27, Swarthmore, PA 19081, (215) 328-9771 in response to my request for an article on self-replicating APL expressions. This is a fascinating, insightful newsletter on APL, and I highly recommend it. A self-replicating expression is a character vector which includes no alphabetics and which when typed in returns itself. Formally, a vector C is self-replicating if ^/ ( C = execute C ), ~ C epsilon 'ABC...XYZ_delta_underscore A...underscore delta' yields one. (I use underbar to indicate that one symbol is ending and another is starting.) The shortest example they give is the following: 22_rho_1_transpose_11_rho_'_'_'22_rho_1_transpose_11_rho_'_'_' If you write the above expression on your blackboard using apl characters, you will notice that it is 22 characters long, and can be viewed either as a character vector with some manipulations prepended or as a vector of 11 characters that is followed by a repitition of itself. - Greg Johnson UW - Madison ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.