The number in question, 2147483648, is a power of 2 and so can be readily solved by hand. Raul and Andrew have already shown two solutions. It's not too hard to show that there are no other ones.
----- Original Message ----- From: Dan Bron <[email protected]> Date: Friday, July 24, 2009 16:37 Subject: Re: [Jprogramming] 2147483648 To: Programming forum <[email protected]> > Eugene wrote: > > there is an answer. > > It would be an interesting exercise to build a J verb that > produced all the > possible J constants up to a given length. > > Another approach would be to generate all possible strings up to > a given > length, containing J only constant characters, and then reduce > these to > valid J constants. But this approach doesn't really scale > well. > > For example, reading DoJ parts I & Constants, it seems like this > is the > valid universe of J constant characters: > > jcc > =. '_.',DIGITS,LCALPHA > > and to test for even a modest, 1 character improvement to Raul's > solution: > #jcc > 38 > (#jcc)^7x > 114415582592 > > would involve ~115 billion possibilities. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
