Paraphrasing, Raul indicated that I sent a desperately unclear message.
I apologize.
 
> Date: Sun, 9 Jan 2011 09:01:15 -0500
> From: Raul Miller <[email protected]>
> Subject: Re: [Jchat] contest
> To: Chat forum <[email protected]>
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Sun, Jan 9, 2011 at 8:40 AM, David Ward Lambert
> <[email protected]> wrote:
> > The shortest j solution to solve a contest problem "How many radians per
> > hour does a minute hand travel?"
> 
> Wouldn't this be:
>   2p1

Surely so!  I'm not aware of another language where multiples of pi are
just a number.  In other languages pi is a reserved word, or arctangent
function, or macro definitions.  This question appears in the first 5
problems of the contest.

> ?
> 
> I do not see what this has to do with prime numbers,
> and none of the links in your original message
> lead me to anything that explains that issue.
> 
A different question at the next difficulty level instructs the
competitors to transcribe pseudo-code and then sum the algorithm's
output for the 10 million integers starting from 10^12 or so.  The
algorithm returns 0 for composite numbers, thus needs a prime filter.
It next requests the length of the repeating sequence in base 10 of the
number's reciprocal.  This is likely to be uncomputable in contest time
since the length can be as long as <:p (as in 1r7 but not 1r11).  There
are further manipulations with the length and sequence before the
algorithm returns a value.  Without proof I (correctly) guessed that the
solution is

   |-/_1 p: bounds

However, this produced a limit error in j7 beta.  The Wolfram alpha
website provides enough resources for the computations.  I have
experienced computations timing out at WA and this PrimePi request
appears to be at the edge of the time allowed.  j might have a policy to
not implement primitives that run a hundred million opcodes per atom,
otherwise it appears that some algorithm exists to extend the limit of
_1&p: .

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to