I believe I have an explanation, but I'd like to know what others think,
in particular with regard to randomness.

The source is a bald assertion by Gosper in HAKMEM, which I was reading
for information on continued fraction calculations.   It's an interesting
read.

http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html

Best wishes,

John

Roger Hui wrote:
> Rationals in J are expressed in lowest terms, that is,
> the numerator and denominator are relatively prime.
> Consequently it can not be that both are even,
> and if they were to start with then in their reduced form
> they would contribute to the portion where the denom
> is odd.
>
> The full answer to your question probably can be
> worked out from this.
>
>
>
> ----- Original Message -----
> From: John Randall <[EMAIL PROTECTED]>
> Date: Wednesday, May 7, 2008 9:15
> Subject: [Jchat] Denominators of random rationals
> To: [email protected]
>
>> Random rationals do not have random denominators.
>>
>> NB. denominator of rational
>> denom=:{: @ (2&x:)
>> NB. generate some random rationals
>> f=:_2 %/\ x: @: >: @ ?. @: #~
>> NB. proportion of odd denominators
>> g=:(+/%#) @: (1 = 2 |denom"0)
>>
>>    g 1e6 f 1e4
>> 0.6806
>>
>> About 2/3 of the rationals have odd denominators, and only 1/3 have
>> even denominators.
>>
>> Problem: Why?
>>
>>
>> Best wishes,
>>
>> John
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


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

Reply via email to