|
Boost : |
Subject: Re: [boost] [random][rational] Is there any standard way to generate a random rationals?
From: MJanes (max.jns_at_[hidden])
Date: 2015-03-10 04:18:57
Il giorno giovedì 5 marzo 2015 22:39:54 UTC+1, Damian Vicino ha scritto:
>
> I was thinking the same approach.
> But it is necessary to study how the selection affects the distribution.
>
I don't think there exists such a thing as a "uniformly distributed
rational" in some bounded interval; IOW, there's no way of defining a
probability measure ( aka a totally additive bounded measure over a sigma
algebra of subsets ) over a bounded interval of rationals uniformly with
respect to the measure of the corresponding real interval ( indeed, note
that the set of rationals in [0,1] has Lebesgue measure zero, that is, the
probability that a unfirom real in [0,1] is rational is zero ). It's
somewhat like asking for a *uniformly* distributed integer over
[0,1,2...,+inf).
Of course, this does not mean there isn't a probability distribution of
rationals satisfying some special *uniformness* criteria that fits your
needs, but not in any *standard* way ....
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk