Puzzles/170141183460469231731687303715884105727

From J Wiki
Jump to navigation Jump to search

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.

1.#0 Sentence must produce 170141183460469231731687303715884105727x. This constraint is absolute. 1. 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. 1. 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. 1. Among sentences that satisfy the preceding contstraints equally, those with the minimum number of characters composing nouns are preferred. a. 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. a. 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. 1. Among sentences that satisfy the preceding constraints equally, those with the smallest number of words are preferred. 1. Among sentences that satisfy the preceding constraints equally, those the smallest number of total characters are preferred. 1. 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:

1. 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. 1. 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

chars

Words Total

chars

Notes Author/Sig
0 <:2^127x 4 4 8 -- Dan Bron <<DateTime(2007-11-05T17:45:51Z)>>
1 #.x:~:i.<:+:*:8 1 8 15 -- Roger Hui <<DateTime(2007-11-06T03:07:51Z)>>
2 #.x:*i.+:*:8 1 7 12 -- Roger Hui <<DateTime(2007-11-06T03:15:38Z)>>
3 #.*i.+:*:8x 1 6 10 see note 3b -- Ewart Shaw <<DateTime(2007-11-06T10:20:45Z)>>
4 (<:@^^:[~]%-:)7x 1 12 16 The idea's there, just has to be a shorter way to express it -- Dan Bron <<DateTime(2007-11-06T13:06:16Z)>>
5 <:@^^:^~2x 1 7 9 Shorter, cuter, obfuscateder <<Anchor(5)>> -- Ewart Shaw <<DateTime(2007-11-08T08:42:43Z)>>

See also