Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Creating a Random Function to Select an Irrational

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102243] Re: [mg102210] Re: [mg102176] Creating a Random Function to Select an Irrational
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 2 Aug 2009 06:01:00 -0400 (EDT)
  • References: <200907310957.FAA19545@smc.vnet.net> <200908010801.EAA07130@smc.vnet.net> <2B9B5B52-EA39-418D-AE5F-269570E18AC0@mimuw.edu.pl>

On 1 Aug 2009, at 20:54, Andrzej Kozlowski wrote:
>
>
> As an example: we could generate irrational numbers approximately  
> uniformly distributed in the interval {0,1} by a formula like this:
>
> Rationalize[RandomReal[{0, 1}], 0] + Sqrt[2]/10^18
>
> the numbers so obtained are certainly irrational and approximately  
> uniformly distributed. Looking at their digits is not likely to  
> reveal any "regularity" but of course we know that they the  
> generated sequence has a "regularity": the difference of any two  
> numbers is always rational.

This was certainly incorrect: one will of course see the regularity if  
one looks at enough digits.

Andrzej



> There are obviously infinitely many ways of generating similar  
> sequences and they are obviously all equally useless.
>
> A more interesting (in my opinion) way to generate a random real  
> number is by specifying its digits as follows:
>
> r[0] = RandomInteger[{0, 1}, 1];
> r[n_] := r[n] = Append[r[n - 1], RandomInteger[{0, 1}]]
>
> This defines a unique real number, almost certainly irrational,  
> whose digits can be computed (in principle) to arbitrary precision,  
> e.g. in this case
>
> N[FromDigits[{r[120], 0}, 2], 100]
> 0.5216581269311984505815006839069293336802568327655056358867877566088653250230499323902844110989462934
>
> In reality this number will be "irrational" only if the random  
> number generator is truly random, otherwise the series of digits may  
> start repeating at some point and the number will turn out to be  
> rational.
>
> Related to the above but more interesting and deeper examples of  
> random irrationals are Chaitin constants (http://mathworld.wolfram.com/ChaitinsConstant.html 
> ).
>
> Andrzej Kozlowski
>
>>
>> (The good and bad news may seem contradictory, but they are not.)
>>
>> So, the only way to get irrational numbers in Mathematica is using  
>> symbols
>> (Pi, E, for instance) and expressions you know are irrational, such  
>> as
>> Sqrt[2]. Your link shows a few other ways. But it's hard to call  
>> creating
>> one of these "random".
>>
>> You could make a long list of irrational numbers and randomly  
>> sample them,
>> perhaps adding several together... but I don't see what you could  
>> prove or
>> accomplish, with such a procedure.
>>
>> Bobby
>>
>> On Fri, 31 Jul 2009 04:57:40 -0500, BenT <brtubb at pdmusic.org> wrote:
>>
>>> Although Mathematica has built-in functiona to obtain random  
>>> integers
>>> and real
>>> numbers, I need to select a random irrational number. At this
>>> webpage,
>>>
>>> http://mathworld.wolfram.com/IrrationalNumber.html
>>>
>>> several definitions are given for known conditions to create
>>> irrational numbers, such as
>>>
>>> Numbers of the form n^(1/m) are irrational unless n is the mth power
>>> of an integer.
>>>
>>> Can anyone define a function to allow a similar capability as  
>>> Random[]
>>> in selecting a "member" from the above defined "set" of values, or  
>>> any
>>> other of the definitions listed on the same webpage?
>>>
>>
>>
>>
>> -- 
>> DrMajorBob at bigfoot.com
>>
>



  • Prev by Date: Re: Hacking Wolfram|Alpha
  • Next by Date: Re: Re: Creating a Random Function to Select an Irrational
  • Previous by thread: Re: Re: Creating a Random Function to Select an Irrational
  • Next by thread: Re: Re: Creating a Random Function to Select an Irrational