Problem
Provide a sentence whose result is 170141183460469231731687303715884105727x.
Constraints
The following constraints are listed in order. That is, sentences which satisfy constraint N equally are selected from by constraint N+1. All sentences must satisfy constraints 0, 1, and 2.
Sentence must produce 170141183460469231731687303715884105727x. This constraint is absolute.
The result must be guaranteed (predicted, fully supported) by the Dictionary. To put it another way, you may not leverage bugs in the implementation (but you may leverage bugs in the documentation). This constraint is absolute.
Assume you're running under $jconsole -jprofile: that is, you may not depend on any sentence having been executed before your own (but see the section "Note on display"). Put another way, do not rely on the names normally defined by the J standard library. This constraint is absolute.
- Among sentences that satisfy the preceding contstraints equally, those with the minimum number of characters composing nouns are preferred.
For the purposes of this puzzle, arguments to the conjunction ` are considered to compose nouns. For example, the sentence +/`%: has five characters total, four of which compose nouns.
You may append a single trailing x to one numeric noun in your sentence, and that character will not count as part of your sentence; it will be treated as if it were not there. That is, it does not count towards the number of characters composing the noun, nor towards the total number of characters in the sentence, nor towards any other constraint.
- Among sentences that satisfy the preceding constraints equally, those with the smallest number of words are preferred.
- Among sentences that satisfy the preceding constraints equally, those the smallest number of total characters are preferred.
Among sentences that satisfy the preceding constraints equally, those with the smallest nouns are preferred. For example, where two solutions which satisfy the other constraints equally, but one mentions only 2 where the other mentions 5, the former is preferred. J has TAO, so arbitrary nouns can be compared; x is less than y iff 0 1 -: /: (<x),<y.
Extra Credit
Extra credit to solutions which:
Convey something meaningful or unique about 170141183460469231731687303715884105727. For example, it is the highest signed 128-bit integer; that has relevance in certain fields of computing, such as IPv6 addresses.
Minimize repetitions of primitives. Given an arbitrarily long string of J verbs and a single digit number, any integral value could be calculated. The simplest example is: +/(],],], ... )1 using the appropriate number of repetitions of ,]. Though such solutions would lose out to versions using fewer verbs, they still evade the spirit of the challenge.
Spoiler Alert!
Solutions
No. |
Sentence |
Noun |
Words |
Total |
Notes |
Author/Sig |
0 |
<:2^127x |
4 |
4 |
8 |
|
-- DanBron 2007-11-05 17:45:51 |
1 |
#.x:~:i.<:+:*:8 |
1 |
8 |
15 |
|
-- RogerHui 2007-11-06 03:07:51 |
2 |
#.x:*i.+:*:8 |
1 |
7 |
12 |
|
-- RogerHui 2007-11-06 03:15:38 |
3 |
#.*i.+:*:8x |
1 |
6 |
10 |
see note 3b |
-- EwartShaw 2007-11-06 10:20:45 |
4 |
(<:@^^:[~]%-:)7x |
1 |
12 |
16 |
The idea's there, just has to be a shorter way to express it |
-- DanBron 2007-11-06 13:06:16 |
5 |
<:@^^:^~2x |
1 |
7 |
9 |
Shorter, cuter, obfuscateder |
-- EwartShaw 2007-11-08 08:42:43 |
See also
Discussion
Constraint 0 is problematic in that the "that is" part is not the same as the preceding sentence ("must produce ..."). 2^127 does not produce the number in all its digits but satisfies the "that is" part. -- RogerHui 2007-11-06 02:24:30
Wrt. constraint 3, how do expressions with conjunction trains like ?(?`) count? -- BJonas 2007-11-07 11:54:41
I attempted to formalize the rules with a J verb that would validate & measure its input sentence, y. However, the generality of constraint 3, in particular, was too much to cover. We'll say that any character which contributed to the execution of a ` shall count as a noun-character. In your example, there are 4 noun characters: '(', ')', and '?' (twice). -- DanBron 2007-11-07 13:32:00
(I admit I can't think of other ways to beat the system and do without any nouns now. Apart from `, there seem to be no builtins that can create a noun with no noun input.) -- BJonas 2007-11-07 12:01:02
Though I can still work on ways to beat it with a single noun character. -- BJonas 2007-11-07 12:07:09
To EwartShaw: Wow. Your solution 5 is sublime. It's it. It's the hidden treasure I was seeking but couldn't find. -- DanBron 2007-11-08 13:38:26
(PS: I'm really, really jealous) -- DanBron 2007-11-08 13:40:16
