Next Article in Journal
Simulation and Analysis of Line 1 of Mexico City’s Metrobus: Evaluating System Performance through Passenger Satisfaction
Previous Article in Journal
Existence of Solutions of Impulsive Partial Hyperbolic Differential Inclusion of Fractional Order
Previous Article in Special Issue
A Novel Algebraic System in Quantum Field Theory
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Taking Rational Numbers at Random

by
Nicola Cufaro Petroni
Department of Mathematics and TIRES, University of Bari, INFN Sezione di Bari, via E. Orabona 4, 70125 Bari, Italy
The author, Nicola Cufaro Petroni, died in the last week of June 2023. The paper had been seen by four reviewers who expressed interest for publication, and asked for some improvements. The author did not have the possibility of writing a new version. Giovanni M. Cicuta agreed to follow up with the publication process. The paper is unchanged (except for editorial reasons) and a new Section 8 was added.
AppliedMath 2023, 3(3), 648-663; https://doi.org/10.3390/appliedmath3030034
Submission received: 18 April 2023 / Revised: 1 August 2023 / Accepted: 11 August 2023 / Published: 1 September 2023
(This article belongs to the Special Issue Applications of Number Theory to the Sciences and Mathematics)

Abstract

:
In this article, some prescriptions to define a distribution on the set Q 0 of all rational numbers in [ 0 , 1 ] are outlined. We explored a few properties of these distributions and the possibility of making these rational numbers asymptotically equiprobable in a suitable sense. In particular, it will be shown that in the said limit—albeit no absolutely continuous uniform distribution can be properly defined in Q 0 —the probability allotted to every single q Q 0 asymptotically vanishes, while that of the subset of Q 0 falling in an interval [ a , b ] Q 0 goes to b a . We finally present some hints to complete sequencing without repeating the numbers in Q 0 as a prerequisite to laying down more distributions on it.

1. Introduction

What could the locution taking at random possibly mean? In its most general sense, this would indicate that the drawing of an outcome ω out of a set Ω is made according to any arbitrary (but legitimate) probability measure assigned on the subsets of Ω , and then that the usual precepts of the probability theory are followed by the result that different probabilities are normally allotted to distinct subsets of Ω . Traditionally, however, the meaning of the said locution is more circumscribed and stands rather for assuming that there is no reason to think that there are preferred outcomes ω Ω , these instead being supposed to be equally likely. This is the meaning that we are interested in within this paper, or—if this notion is not exactly applicable—an asymptotic version of it in some acceptable limiting sense.
It is well known that for the sets of real numbers, this kind of randomness is enforced either by sheer equiprobability (on the finite sets) or by distribution uniformity (on the bounded, Lebesgue measurable, uncountable sets). On the other hand, infinite, countable sets and unbounded, uncountable sets are both excluded from these egalitarian probability attributions because their elements can be made neither equiprobable (with a non-vanishing probability, in the countable case), nor uniformly distributed (with a non-vanishing probability density, in the uncountable case). On these occasions, it is therefore advisable to start with some proper (neither equiprobable, nor uniform) probability distribution, and then to inquire if and how this can be made ever closer—in a suitable, approximate sense —either to an equiprobable distributionor to an uniform one. We will then, respectively, speak of asymptotic equiprobability and asymptotic uniformity.
The focus of the present inquiry, as will be elucidated in Section 2, are the rational numbers that—even in a bounded interval—constitute an infinite, countable set, with a few relevant, additional peculiarities due to them also being dense everywhere among the real numbers. In Section 3, we provide a procedure to attribute non-vanishing probabilities to every rational number q = n / m in the interval [ 0 , 1 ] . Section 4 is instead devoted to the aftermath of supposing conditionally equiprobable numerators n, and then Section 5 shows under which hypotheses our distributions can give rise to an asymptotic equiprobability of the rationals in [ 0 , 1 ] such that—without pretending to have an absolutely continuous (ac) uniform distribution on Q 0 —the probability allotted to a single q Q 0 vanishes in the limit, while that of the infinite subset of rationals falling in an interval [ a , b ] Q 0 goes to b a . Several examples of denominator distributions are explained in Section 6, giving rise to a few closed formulas. Finally, in Section 7, some concluding remarks are added, offering a glimpse into the open problem of sequencing all the rational numbers in Q 0 .

2. Probability on Rational Numbers

Rational numbers Q are famously countable, and hence they can be put in a sequence. Since they are a dense subset of the real numbers, every rational number is a cluster point, and thus no sequence encompassing all of them can ever converge, not to say be monotone. In any case, their countability certainly allows the allotment of discrete distributions with non-vanishing probabilities to every rational number; since they are infinite, however, they can never be exactly equiprobable. We will outline in the forthcoming sections a simple procedure to obtain distributions on all the rationals in [ 0 , 1 ] , a set that we will shortly denote as Q 0 = Q [ 0 , 1 ] , and we will investigate if and how they can be considered asymptotically equiprobable. We will refrain, for the time being, from extending these considerations to the whole of Q only because in our opinion, this would not add particular insight into the discussion at the present stage of the inquiry.
It is, however, advisable to remember right away that the distribution of a rv (random variable) Q taking values in Q 0 must anyhow be of a discrete type, allotting (possibly non-vanishing) probabilities to the individual rational numbers q Q 0 : conceivable continuous set functions—namely with continuous, albeit perhaps not absolutely continuous, cdf (cumulative distribution function)—would turn out not to be countably additive, and would hence not qualify as measures, not to say as probability distributions. Every continuous cdf for Q would indeed entail that, at the same time, P Q = q = 0 , q Q 0 , and P Q Q 0 = 1 , while Q 0 is apparently the countable union of the disjoint, negligible sets { q } , which is in plain conflict with the countable additivity. This in particular also rules out, for the numbers in Q 0 , the possibility of being in some sense uniformly distributed (an imaginable surrogate of equiprobability suggested by the cited density of the rationals) for the numbers in Q 0 . This property would, in fact, require a cdf of the uniform type for Q:
F Q ( x ) = P Q x = 0 x < 0 x 0 x < 1 1 1 x
which is apparently continuous, and would hence attribute probability 0 to every single q, but probability 1 to Q 0 .
We would like to stress, moreover, that the problem focused on in the present paper is not how to realistically produce rational numbers that are possibly equiprobable at random; this would be performed trivially, for instance, just by taking random, uniformly distributed real numbers and then truncating them to a prefixed number n of decimal digits, as always conducted in practice in every computer simulation of random numbers in [ 0 , 1 ] . It is indeed apparent that in so doing, we would shrink Q 0 to a finite set of rational numbers (they would be exactly 10 n + 1 ) that could always be made exactly equiprobable, failing on the other hand to allot a non-vanishing probability to the remaining, overwhelmingly more numerous elements of Q 0 . The aim of our inquiry is instead to find a sensible way to attribute (non-vanishing and possibly not too different from each other) probabilities to every rational number in Q 0 . Their practical simulation is not considered our main purpose here, but just as an eventual side effect of this allocation.
Remark that one could be lured to think that a way around the previous snag could consist of again drawing again uniformly distributed real numbers, yet truncating the decimal digits to some random number N taking arbitrary, finite but unbounded integer values. Even in this way, however, not every rational number would have a chance to be produced; the said procedure would indeed a priori exclude all the (infinitely many) rational numbers with an infinite, periodic decimal representation, for instance, 1 / 3 , 2 / 3 , and so on. In light of this preliminary scrutiny, the best way to tackle the task of laying down a probability on Q 0 seems then to be to exploit the fractional representation q = n / m of every rational number by attributing some suitable joint distribution to its numerators and denominators, considered here as rvs with integer values.

3. Distributions on Q 0

Using the well-known diagram used to show how rational numbers are countable, we will explore two dependent rvs, M and N, with integer values
m = 1 , 2 , n = 0 , 1 , 2 , , m
acting, respectively, as denominator and numerator of the random rational number Q = N / M [ 0 , 1 ] . Therefore, Q will have the values q = n / m arrayed in a triangular scheme as in Table 1.
However, this method causes every rational number q to appear infinitely many times because of the existence of reducible fractions. For example, using the usual notation for repeating decimals, we have
0.5 = 1 / 2 = 2 / 4 = 3 / 6 = 0 . 3 ¯ = 1 / 3 = 2 / 6 = 0.75 = 3 / 4 = 6 / 8 =
to avoid repetitions, the rational numbers in [ 0 , 1 ] should be listed with blanks as in Table 2. However, this table is not suitable for assigning probabilities directly to its elements, as there is no simple way to give them a sequential index (for example, which one is the 1000th element?). This is because the numbers ν m of different rationals in each row with the same irreducible denominator m form a rather irregular sequence, as we will briefly explain in Section 7. Therefore, it is better to use the complete Table 1 and introduce a joint distribution of N and M first.
P M = m m = 1 , 2 , P N = n M = m n = 0 , 1 , 2 , , m P N = n , M = m = P N = n M = m P M = m
For a rational number q, we adopt the notation
q n / m
to indicate that n / m is the irreducible representation of q, namely that n and m are co-primes. For instance, in the previous examples:
0.5 1 / 2 0 . 3 ¯ 1 / 3 0.75 3 / 4
To account for the repeated entries in Table 1, we will allot the probability (the notation used in this paper follows the usual one of probability textbooks.) to every rational q n / m [ 0 , 1 ] .
P Q = q = = 1 P N = n , M = m = = 1 P N = n M = m P M = m
This apparently also defines the cdf of Q as (here, of course, x R )
F Q ( x ) = P Q x = P N M x = m = 1 P N m x M = m P M = m = m = 1 F N ( m x | M = m ) P M = m
and the probability of Q falling in ( a , b ] , for 0 a < b 1 real numbers, as:
P a < Q b = F Q ( b ) F Q ( a ) = m = 1 F N ( m b | M = m ) F N ( m a | M = m ) P M = m
Notice that the conditional cdf of N can also be given as
F N ( x | M = m ) = P N x M = m = n = 0 m P N = n M = m ϑ ( x n ) = n = 0 x P N = n M = m
where
ϑ ( x ) = 1 x 0 0 x < 0
is the Heaviside function, while for every real number x, the symbol x denotes the floor of x, namely the greatest integer less than or equal to x. Therefore, Equations (2) and (3) can be written in the following form:
F Q ( x ) = m = 1 P M = m n = 0 m x P N = n M = m
P a < Q b = m = 1 P M = m ( 1 δ m a , m b ) n = m a + 1 m b P N = n M = m
where the Kronecker delta considers the circumstance that when m b = m a , the expression becomes vanishing, resulting in m b m a + 1 . Additionally, we possess expressions for both the expectations and the characteristic function:
E Q = E N / M = E 1 M E N | M = m = 1 P M = m m E N | M = m
E Q 2 = m = 1 P M = m m 2 E N 2 M = m
φ Q ( u ) = E e i u N / M = m = 1 P M = m n = 0 m e i u n / m P N = n M = m = m = 1 P M = m φ N u / m M = m
where we have also introduced the shorthand notation
φ N u M = m = E e i u N M = m = n = 0 m e i u n P N = n M = m
The specific joint distributions of variables N and M can be chosen in several ways and we survey a few particular cases in the next sections.

4. Equiprobable Numerators

Firstly, we suppose that for a given denominator m 1 , the m + 1 possible values of the numerator n = 0 , 1 , , m are equiprobable in the sense that
P N = n M = m = 1 m + 1 n = 0 , 1 , , m
We then have (see [1] 0 . 121 )
E N | M = m = n = 0 m n m + 1 = 1 m + 1 m ( m + 1 ) 2 = m 2 E N 2 M = m = n = 0 m n 2 m + 1 = 1 m + 1 m ( m + 1 ) ( 2 m + 1 ) 6 = m ( 2 m + 1 ) 6
and hence, from (7) and (8),
E Q = m = 1 P M = m m m 2 = 1 2 m = 1 P M = m = 1 2 E Q 2 = m = 1 P M = m m 2 E N 2 | M = m = m = 1 2 m + 1 6 m P M = m = 1 3 m = 1 P M = m + 1 6 m = 1 P M = m m = 1 3 + 1 6 E 1 M V Q = E Q 2 E Q 2 = 1 12 + 1 6 E 1 M
As for the distribution, with n , m co-primes and 0 n m , from (1), we have
P Q = q = = 1 P M = m m + 1 q n / m
which is independent of n and relies solely on the value of the irreducible denominator m. Furthermore, the characteristic Function (9) reads
φ N u M = m = 1 m + 1 n = 0 m e i u n φ Q ( u ) = m = 1 P M = m m + 1 n = 0 m e i u n / m
while for the cdf (5), we have, from (4),
F N m x M = m = 1 m + 1 n = 0 m ϑ m x n = 0 x < 0 m x + 1 m + 1 0 x < 1 1 1 x F Q ( x ) = m = 1 P M = m m + 1 n = 0 m ϑ m x n = 0 x < 0 m 1 P M = m m x + 1 m + 1 0 x < 1 1 1 x
and the probability (6) with 0 a < b 1 becomes
P a < Q b = m = 1 P M = m m b m a m + 1
It is clear that, with the exception of the expected value E Q = 1 / 2 , all these quantities are influenced by the selection of the denominator distribution. However, we will demonstrate in the subsequent section that, given reasonable conditions on the denominators M, the distribution of Q can indeed be made arbitrarily close to, though not precisely coincident with, a uniform distribution on the interval [ 0 , 1 ] . This behavior is what we will refer to as asymptotic equiprobability.

5. Asymptotic Equiprobability

Considering the equiprobable numerators introduced in the preceding section, where we denote the distribution of M as p m = P M = m and the supremum of all its values as s, let us now consider a sequence of denominators M k k 1 with corresponding distributions p m ( k ) k 1 . Furthermore, let s k approach zero as k tends to infinity in a manner such that
lim k s k ln k = 0
To put it differently, we examine a sequence of distributions that progressively become flatter and approach zero uniformly, consequently leading to increasingly equiprobable denominators. Illustrative examples of such sequences for various values of k (where k takes on the values 1 , 2 , ) include the sequence of finite equiprobable distributions
p m ( k ) = 1 / k m = 1 , 2 , , k 0 m > k
where s k = 1 / k k 0 and (13) is satisfied; that of the geometric distributions
p m ( k ) = w k ( 1 w k ) m 1 m = 1 , 2 ,
with infinitesimal w k so that s k = w k k 0 : (13) is satisfied with a suitable choice of w k ; and finally, that of the Poisson distributions
p m ( k ) = e λ k λ k m 1 ( m 1 ) ! m = 1 , 2 ,
with divergent λ k , where again the modal values are infinitesimal: we know indeed that a Poisson distribution attains its maximum in λ k + 1 , so that for λ k k + , its modal value s k essentially behaves as (see [1] 8 . 327 . 1 )
s k = e λ k λ k λ k 1 Γ ( λ k ) = 1 2 π λ k 1 + O ( λ k 1 ) k 0
In this case, (13) is also fulfilled through a suitable choice of λ k
Lemma 1.
Within the aforementioned notations and under the given conditions, we have
μ k = E 1 / M k = m = 1 p m ( k ) m k 0
Proof. 
The positive series defining μ k is certainly convergent because
μ k = m = 1 p m ( k ) m < m = 1 p m ( k ) = 1
and, hence, we can write
μ k = m = 1 p m ( k ) m = m = 1 k p m ( k ) m + R k
where
R k = m = k + 1 p m ( k ) m k 0
is an infinitesimal remainder. Remark that here k plays the roles of index of the distribution sequence as well as the cut-off of the series.
On the other hand, under our stated conditions,
m = 1 k p m ( k ) m < s k m = 1 k 1 m = s k H k
where H k denotes the k t h harmonic number, namely the sum of the reciprocal integers up to 1 / k . It is well known ([1] 0 . 131 ) that, for k , H k grows as ln k , so using (13), we have s k H k k 0 , and finally μ k = s k H k + R k k 0 . □
Theorem 1.
If Q = N / M and F Q ( x ) is itscdf, then, given the notation and conditions outlined above, we have
lim k P Q = q = 0 lim k P a < Q b = b a
lim k F Q ( x ) = 0 x < 0 x 0 x < 1 1 1 x
Proof. 
Since our series have positive terms, the first result in (15) follows from (10) and (14) because, with q n / j ,
P Q = q = = 1 p j ( k ) j + 1 < m = 1 p m ( k ) m + 1 < m = 1 p m ( k ) m = μ k k 0
As for the second result in (15), since for every real number x it is x 1 x x , for every k = 1 , 2 , , and 0 a < b 1 , we have, from (12),
m = 1 p m ( k ) m ( b a ) 1 m + 1 P a < Q b m = 1 p m ( k ) m ( b a ) + 1 m + 1
namely,
b a + ( a b 1 ) m = 1 p m ( k ) m + 1 P a < Q b b a + ( a b + 1 ) m = 1 p m ( k ) m + 1
so that, since a b 1 0 and a b + 1 0 , it is
b a + ( a b 1 ) μ k P a < Q b b a + ( a b + 1 ) μ k
and the second result (15) follows again from (14). Finally, in a similar way, we find, for (16), that
m = 1 p m ( k ) m x m + 1 F Q ( x ) m = 1 p m ( k ) m x + 1 m + 1 0 x 1
namely,
x x m = 1 p m ( k ) m + 1 F Q ( x ) x + ( 1 x ) m = 1 p m ( k ) m + 1
and, hence,
x x μ k < F Q ( x ) < x + ( 1 x ) μ k
so that, in this case, the result also follows from (14). □
This theorem reveals that as the upper limit k approaches infinity; although the probability associated with individual rational numbers tends to vanish, the probability of these numbers grouped into intervals remains substantial. This behavior bears a striking resemblance to the behavior observed in continuously distributed real rvs. Nevertheless, due to the factors discussed in Section 2, it is important to emphasize that the previous result does not imply the possibility of achieving a uniform limit distribution on Q 0 (as such a distribution does not exist). Instead, it suggests that our stochastic rational numbers Q—at least for denominators m distributed in a fairly flat way, and numerators n that are conditionally equiprobable within the range of 0 to m—tend to behave asymptotically like a uniform distribution within the interval [ 0 , 1 ] . This aligns well with our intuitive concept of selecting rational numbers randomly. It is worth noting in this context that the variance is also given by
V Q = 1 12 + 1 6 E 1 M = 1 12 + μ k 6 k 1 12
again in agreement with an approximate uniform distribution in [ 0 , 1 ] .

6. Denominator Distributions

6.1. Geometric Denominators

A few closed formulas about the rv Q are available for particular denominator distributions: let us suppose, for instance, that the denominator M is geometrically distributed as
P M = m = w ( 1 w ) m 1 w > 0 , m = 1 , 2 ,
In this case, we first find
E M = 1 w E 1 M = m = 1 w ( 1 w ) m 1 m = w 1 w m = 1 ( 1 w ) m m = w ln w 1 w
and, hence,
V Q = 1 12 w ln w 6 ( 1 w )
while for the cdf we can not go beyond its formal definition
F Q ( x ) = 0 x < 0 m 1 w ( 1 w ) m 1 m x + 1 m + 1 0 x < 1 1 1 x
As for the Q discrete distribution instead, taking q n / m , we find with j = 1 the analytic expression
P Q = q = = 1 w ( 1 w ) m 1 m + 1 = w ( 1 w ) m 1 = 1 ( 1 w ) m ( 1 ) m + 1 = w ( 1 w ) m 1 j = 0 ( 1 w ) m j m ( j + 1 ) + 1 = w ( 1 w ) m 1 m + 1 2 F 1 1 , 1 + 1 / m ; 2 + 1 / m ; ( 1 w ) m
where 2 F 1 ( a , b ; c ; z ) is a hypergeometric function [1] that quantifies the deviation of P Q = q from the corresponding joint probability of N , M
P N = n , M = m = w ( 1 w ) m 1 m + 1
This formula allows a graphic representation of P Q = q as a function of the irreducible denominators m displayed in Figure 1, where it is clear how the initial ( m = 1 ) ordering of the probabilities (increasing with the w values going from w = 0.001 to w = 0.9 ) becomes totally overturned for a large enough m. We remark that each value of the probability (17) should be considered to be attributed to every rational number with the same m as the irreducible denominator. For instance, see Table 2; for m = 1 , we obtain the probability of q 0 and 1; for m = 2 , the probability of q 1 / 2 alone; for m = 3 , that of q 1 / 3 , 2 / 3 ; for m = 4 , that of q 1 / 4 , 3 / 4 ; ; and so on. This observation enables us, in particular, to avoid a potential misinterpretation. Indeed, we note that, while it might seem at first glance that
m = 1 n = 0 m P N = n , M = m = m = 1 n = 0 m w ( 1 w ) m 1 m + 1 = m = 1 w ( 1 w ) m 1 = 1
we find instead
m = 1 n = 0 m w ( 1 w ) m 1 m + 1 2 F 1 1 , 1 + 1 / m ; 2 + 1 / m ; ( 1 w ) m < 1
as can be seen from the fact that for 0 < w < 1
2 F 1 1 , 1 + 1 / m ; 2 + 1 / m ; ( 1 w ) m = 1 m = 1 < 1 m = 2 , 3 ,
This is not in contradiction with the mandatory requirement that
q Q 0 P Q = q = 1
precisely because, as previously remarked, the probability associated to an m must be attributed to several different rational numbers q; if ν m is the number of rationals q that have m as its irreducible denominator, then we should rather pay attention to ascertain the normalization in the form
q Q 0 P Q = q = m = 1 n = 0 m ν m w ( 1 w ) m 1 m + 1 2 F 1 1 , 1 + 1 / m ; 2 + 1 / m ; ( 1 w ) m = m = 1 ν m w ( 1 w ) m 1 2 F 1 1 , 1 + 1 / m ; 2 + 1 / m ; ( 1 w ) m = 1
We stress that confirming this result—which we can confidently establish through construction and definition—proves to be challenging when attempting direct calculations. This difficulty arises due to the lack of a readily available closed-form expression for the sequence ν m . The behavior of this sequence is rather irregular, though it demonstrates an overall upward trend on average. This can be observed from an empirical plot of its initial values, depicted in Figure 2. We will defer a more detailed discussion on this matter to Section 7, where we will provide additional insights. In particular, we will demonstrate how the preceding normalization condition can be employed for stepwise computations of the ν m values.

6.2. Poisson and Equiprobable Denominators

When the denominators are distributed according to different (albeit simple) laws, we no longer have access to elementary closed forms for P Q = q . For instance, if M follows a Poisson distribution, we have
P M = m = e λ λ m 1 ( m 1 ) ! λ > 0 , m = 1 , 2 ,
we find E M = 1 + λ and
E 1 M = m = 1 e λ m λ m 1 ( m 1 ) ! = e λ λ m = 1 λ m m ! = e λ λ m = 0 λ m m ! 1 = 1 e λ λ
while for the variance, we have
V Q = 1 12 + 1 e λ 6 λ
but the cdf is
F Q ( x ) = 0 x < 0 e λ m 1 λ m 1 ( m 1 ) ! m x + 1 m + 1 0 x < 1 1 1 x
and for the discrete distribution, taking q n / m , we find
P Q = q = = 1 e λ m + 1 λ m 1 ( m 1 ) !
with no closed expression readily available.
Considering, instead, denominators M taking only a finite number k = 1 , 2 , of equiprobable values m, we have:
P M = m = 1 / k m = 1 , 2 , , k 0 m > k
We then have
E M = k + 1 2 E 1 M = 1 k m = 1 k 1 m = H k k
and, hence,
V Q = 1 12 + H k 6 k
while for the cdf it is
F Q ( x ) = 1 k m = 1 k m x + 1 m + 1
and the discrete distribution probabilities are
P Q = q = 1 k = 1 k / m 1 m + 1 q n / m
where, since m k , it is always k / m = 1 , 2 , .
Even in this case, we have no closed formulas to show. Since the sums involved are now always finite, a simple—but essentially trivial—technique for simulating an asymptotically equiprobable sample of rational numbers within the interval [ 0 , 1 ] seems to emerge. The approach involves several steps. Begin by selecting a sufficiently large value k. Then, randomly select an integer m from the equiprobable set of numbers 1 , 2 , , k . Subsequently, choose another random integer n from the equiprobable set of numbers 0 , 1 , , m , and calculate q = n / m . By repeating this process a substantial number of times, an almost uniformly distributed sample within the range [ 0 , 1 ] can be generated, as depicted in Figure 3. Nevertheless, it is important to note that the approach has limitations, as mentioned earlier in Section 2. Not every rational number in Q 0 would have an opportunity to be drawn using this method, as only a finite subset of these numbers would be taken into account. Although, in theory, this finite set of numbers could be made exactly equiprobable, the infinitely numerous remaining rational numbers would be entirely excluded and assigned a probability of precisely zero.

7. Final Remarks: Sequencing Rational Numbers

Other examples of distributions on the rational numbers in [ 0 , 1 ] are, of course, possible. For instance, given 0 < p < 1 and for a given denominator m = 1 , 2 , , it is possible to suppose that the numerators are binomially—instead of equiprobably—distributed as
P N = n M = m = m n p ( 1 p ) m n n = 0 , 1 , , m
By choosing then a suitable distribution for the denominator M, we can define the global distribution of Q = N / M . However, rather than indulging in displaying these further examples, we would like to conclude this paper with a few remarks about a particular residual open problem.
Due to the countable nature of Q 0 , as we have already said, its elements within the range 0 q 1 can be systematically organized into a sequence. To simplify the process of assigning a distribution to Q 0 , it would be immensely advantageous if this sequence could encompass all rational numbers within [ 0 , 1 ] without any repetitions. Achieving this arrangement, however, requires identifying patterns that govern such sequence. This, in turn, would enable us to easily determine both the rational number q associated with a given index k and, conversely, the index k corresponding to a specific rational number q. Yet, this endeavor is complicated by the inherent irregularity present in the sequence of entries in the triangular table, such as the unpredictable occurrences of prime numbers among the denominators m. Notably, even the presence of prime numbers—which uniquely identify rows without gaps between the extremes—does not follow a readily discernible pattern. Nonetheless, it is evident that effectively sequencing all numbers in Q 0 hinges on obtaining insights into ν m —specifically, the count of non-blank entries in the m th row of Table 3.
While not attempting an exhaustive treatment of this topic, we will focus on several observations concerning some basic properties of the numbers ν m (representing the count of rational numbers with a common irreducible denominator m in a row of Table 3) and σ m (indicating the sum of these rational numbers). To begin, it is worth noting that the normalization condition (18) can be employed to derive a systematic method for iteratively computing the values of ν m . For example, as detailed in Section 6.1, when denominators follow a geometric distribution and numerators are conditionally equiprobable, the distribution of Q is expressed by (17). To satisfy the normalization (18), the number ν m of equiprobable numbers sharing the same irreducible denominator must be taken into consideration. It is apparent that by setting z = 1 w in (17), the normalization condition (18) transforms into
q Q 0 P Q = q = 1 z z 2 m = 1 ν m = 1 z m + 1 m + 1 = 1
namely, with a power expansion
m = 1 ν m = 1 z m + 1 m + 1 = z 2 1 z = j = 0 z j + 2
This relation can be used to find the values of ν m by equating the coefficients of the identical powers of z. Indeed, writing the first terms of (19), we find
ν 1 z 2 2 + z 3 3 + z 4 4 + z 5 5 + + ν 2 z 3 3 + z 5 5 + z 7 7 + z 9 9 + + ν 3 z 4 4 + z 7 7 + z 10 10 + z 13 13 + + ν 4 z 5 5 + z 9 9 + z 13 13 + z 17 17 + + = z 2 + z 3 + z 4 + z 5 +
and, hence, we progressively have
ν 1 / 2 = 1                                                 ν 1 = 2 ν 1 / 3 + ν 2 / 3 = 1                                                 ν 2 = 1 ν 1 / 4 + ν 3 / 4 = 1                                                 ν 3 = 2 ν 1 / 5 + ν 2 / 5 + ν 4 / 5 = 1                                                 ν 4 = 2                                                
and so on, in agreement with the corresponding entries of Table 3. It is crucial to emphasize that this procedure cannot rely on the specific distribution of Q since the sequence ν m remains constant, and the normalization condition (18) must hold for any valid distribution.
To conclude, we will outline a few elementary properties of ν m and σ m that can be instrumental for future advancements. Here, m = 1 , 2 , represents the denominators and n = 0 , 1 , , m represents the numerators. We term them accepted when n / m appears in Table 3, meaning it is an irreducible fraction. Here are the properties:
  • ν m m 1 for m 2 : in our table n = 0 and n = m are accepted only for m = 1 so that, in every row with m 2 , the first and last number are always missing; then, apparently, ν m = ( m + 1 ) 2 = m 1 ; in particular, ν m = m 1 only, for m prime number.
  • For m 3 , if n = k 1 is accepted, then n = m k m 1 is also accepted because, if k / m is irreducible, then ( m k ) / m = 1 k / m is also irreducible, namely, the accepted values always show up in pairs; in particular, since n = 1 is always accepted, then n = m 1 is also always accepted, and hence, ν m 2 for m 3 (the two numbers coincide for m = 2 , so that ν 2 = 1 ).
  • ν m always is an even number for m 3 because, according to point 2, the accepted numerators n always show up in pairs; moreover, if m 3 is even, then n = m / 2 is not accepted because, for m = 2 (and 2 ), the numerator would be n = m / 2 = , and n / m = / 2 would be a reducible fraction.
  • For m 3 , the sum of an accepted pair always is 1 because we are adding k / m and ( m k ) / m = 1 k / m ; as a consequence, the sum of the irreducible fractions sharing a common denominator m is σ m = ν m / 2 because there are ν m / 2 accepted pairs; looking, moreover, at Table 3, we see that this last result also holds for m = 1 ( ν 1 = 2 , σ 1 = 1 ) and m = 2 ( ν 2 = 1 , σ 2 = 1 / 2 ).

8. Conclusions (Written by Giovanni M. Cicuta)

Let us summarize the findings of this work. The goal of the work is to define a uniform probability distribution to every rational number q [ 0 , 1 ] . This does not seem to have practical applications today, but it is an intriguing problem. Indeed, it may only be achieved as a limiting process. The main steps are:
For every ratio of pair of random variables N / M , with n m , a uniform distribution for the random variable N is chosen, for fixed m. Next, a sequence, indexed by a parameter k of distributions, is chosen for the random variable M, the denominator.
The k-dependent distribution is increasingly more flat as k .
In terms of these distributions, a k-dependent probability distribution P { Q = q } is defined in Equation (1), for any q = n / m , 0 q 1 , where the pair n, m are co-primes. It is defined as asymptotically equiprobable. Theorem 1 asserts that all the desired properties for the probability distribution are achieved through this procedure.
Section 6 provides examples of the distributions for the denominator and detailed evaluations.
Section 7 is not probabilistic. The proof of the countability of rational numbers by G. Cantor provides a sequence of all fractions n / m . Several other sequences were written in the decades following this proof. In all of them, every rational number q appears several times (an infinite number of times). One would like to define a sequence of all rational numbers q [ 0 , 1 ] , such that the sequence of fractions q = n / m would only include the pair n, m as co-primes. In Section 7, some properties of the occurrence of repeated fractions are obtained.
If the desired sequence of rationals numbers without repetitions could be built, many probability distributions could be proposed for the elements of the sequence.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The author declares no conflict of interest.

Reference

  1. Gradshteyn, I.S.; Ryzhik, I.M. Table of Integrals, Series and Products; Academic Press: Burlington, VT, USA, 2007. [Google Scholar]
Figure 1. Probabilities (17) attributed to rational numbers as a function of the irreducible, geometrically distributed denominators m, and for decreasing ( 0.9 , 0.5 , 0.1 , 0.01 , 0.001 ) values of w: by choosing different m intervals, the pictures show how these probabilities level down to infinitesimal equiprobability for w 0 .
Figure 1. Probabilities (17) attributed to rational numbers as a function of the irreducible, geometrically distributed denominators m, and for decreasing ( 0.9 , 0.5 , 0.1 , 0.01 , 0.001 ) values of w: by choosing different m intervals, the pictures show how these probabilities level down to infinitesimal equiprobability for w 0 .
Appliedmath 03 00034 g001
Figure 2. Numerosity ν m of the different rational numbers q n / m sharing a common, irreducible denominator m.
Figure 2. Numerosity ν m of the different rational numbers q n / m sharing a common, irreducible denominator m.
Appliedmath 03 00034 g002
Figure 3. Typical histogram of the relative frequencies of a sample of 10 5 random rationals generated following the procedure described in Section 6.2: here, the maximum value of the equiprobable denominators is chosen to be k = 10 5 .
Figure 3. Typical histogram of the relative frequencies of a sample of 10 5 random rationals generated following the procedure described in Section 6.2: here, the maximum value of the equiprobable denominators is chosen to be k = 10 5 .
Appliedmath 03 00034 g003
Table 1. Table of rational numbers q = n / m with repetitions: many fractions are reducible to canonical forms already present in earlier positions.
Table 1. Table of rational numbers q = n / m with repetitions: many fractions are reducible to canonical forms already present in earlier positions.
n
m 0 1 2 3 4 5 6 7 8
101
20 1 / 2 1
30 1 / 3 2 / 3 1
40 1 / 4 2 / 4 3 / 4 1
50 1 / 5 2 / 5 3 / 5 4 / 5 1
60 1 / 6 2 / 6 3 / 6 4 / 6 5 / 6 1
70 1 / 7 2 / 7 3 / 7 4 / 7 5 / 7 6 / 7 1
80 1 / 8 2 / 8 3 / 8 4 / 8 5 / 8 6 / 8 7 / 8 1
Table 2. Table of rational numbers q n / m without repetitions: only irreducible fractions are represented, along with the number ν m of the different rationals sharing a common irreducible denominator m.
Table 2. Table of rational numbers q n / m without repetitions: only irreducible fractions are represented, along with the number ν m of the different rationals sharing a common irreducible denominator m.
n
ν m m 0 1 2 3 4 5 6 7
2101
12 1 / 2
23 1 / 3 2 / 3
24 1 / 4 3 / 4
45 1 / 5 2 / 5 3 / 5 4 / 5
26 1 / 6 5 / 6
67 1 / 7 2 / 7 3 / 7 4 / 7 5 / 7 6 / 7
48 1 / 8 3 / 8 5 / 8 7 / 8
Table 3. Table of rational numbers q n / m without repetitions, along with the progressive number ν m of the different rationals sharing a common irreducible denominator m, and their sums σ m .
Table 3. Table of rational numbers q n / m without repetitions, along with the progressive number ν m of the different rationals sharing a common irreducible denominator m, and their sums σ m .
n
σ m ν m m 0 1 2 3 4 5 6 7 8 9 10
12101
1 / 2 12 1 / 2
123 1 / 3 2 / 3
124 1 / 4 3 / 4
245 1 / 5 2 / 5 3 / 5 4 / 5
126 1 / 6 5 / 6
367 1 / 7 2 / 7 3 / 7 4 / 7 5 / 7 6 / 7
248 1 / 8 3 / 8 5 / 8 7 / 8
369 1 / 9 2 / 9 4 / 9 5 / 9 7 / 9 8 / 9
2410 1 / 10 3 / 10 7 / 10 9 / 10
51011 1 / 11 2 / 11 3 / 11 4 / 11 5 / 11 6 / 11 7 / 11 8 / 11 9 / 11 10 / 11
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cufaro Petroni, N. Taking Rational Numbers at Random. AppliedMath 2023, 3, 648-663. https://doi.org/10.3390/appliedmath3030034

AMA Style

Cufaro Petroni N. Taking Rational Numbers at Random. AppliedMath. 2023; 3(3):648-663. https://doi.org/10.3390/appliedmath3030034

Chicago/Turabian Style

Cufaro Petroni, Nicola. 2023. "Taking Rational Numbers at Random" AppliedMath 3, no. 3: 648-663. https://doi.org/10.3390/appliedmath3030034

Article Metrics

Back to TopTop