2

This question is inspired by a (now deleted) answer to this question. The answerer tried to claim that given an arbitrary real number in decimal form, one can "guess" if it is rational/irrational by observing if repetition occurs in a finite string of decimal points. This claim was heavily criticized.

I would like to know if there is any way to make such a statement rigorous. Here is how I would do it:

1: Define a "repetition counter" $R(w)$ that computes, given a string $w=w_1 w_2\ldots w_n$ with $n$ digits, how "repetitive" the string is.

For instance, $R(1)=1$, $R(12)=1$, $R(121)=1$, $R(1212)=2$, $R(12125)=1$, $R(121255)=2$, $R(1212555)=3$.

2: Let $N>1$ be a fixed reject value; that is, given a real number $x$ whose first $n$ decimals form $w$, then if $R(w)<N$, we "guess" that $x$ is irrational; if $R(w)> N$, we conclude $x$ is rational.

In the limit $n\to\infty$, if $x$ is rational then $R(w)\to\infty$, so the chance of incorrectly labeling it as irrational should go to zero.

Similarly, in the limit $n\to\infty$, if $x$ is irrational then $R(w)\to1$, so the chance of incorrectly labeling it as rational should go to zero.

Does my attempt contain any flaws? More generally, can one ever reasonably say "it's probably rational/irrational" in the sense that the error goes to $0$?

David Raveh
  • 1,795
  • The most apparent issue is that "if $x$ is irrational then $R(w)\to1$" is false. – Brian Moehring Aug 04 '23 at 01:04
  • @BrianMoehring Can you expound on that? It isn't clear to me why. – David Raveh Aug 04 '23 at 01:06
  • 2
    This doesn't even touch on the fact of the impracticality of the test. If I know $R(w_n) > 10^{10^{100}}$ for the first $n$ digits $w_n$ of $x$, then we may still have $R(w_{n+1}) = 1$ when we add one more digit to get $w_{n+1}$. We would need certain level of "continuity at infinity" of a sort to make a test using a limit criterion practical, and the function doesn't have any. – Brian Moehring Aug 04 '23 at 01:19
  • 1
    In short, an integer sequence converging to $1$ means that it is eventually constant. Your $R$ function eventually being constant $1$ would mean there's no finite-length periodic sequences after some point, which might be a subset of the irrational numbers that someone cares about, but it's measure zero. (As an example, it would mean there's no "00" after some point.) – Brian Moehring Aug 04 '23 at 01:23
  • @BrianMoehring I suspected that the issue may be this lack of "continuity". However, I also feel that the issue may be more inherent, that there is never a way to make the statement "it probably is/isn't rational". – David Raveh Aug 04 '23 at 01:28
  • 1
    @BrianMoehring Perhaps we should be considering the $\liminf$ instead of the limit. Though I'm not sure that has to be equal to $1$ either. – eyeballfrog Aug 04 '23 at 01:30
  • It is very easy to prove a number is rational. It is much harder to prove that it is irrational. We can say any number is "probably" irrational and it is almost certain that that is true. As for your "repetition counter," how many digits are you prepared to count? However, far that is, I can find a rational number that appears to be irrational. Just take the first $n$ digits of $\pi$ where the string is longer than you care to count. – user317176 Aug 04 '23 at 01:41
  • 1
    Not always easy to prove that a number is rational. For instance,$$\frac{90}{\pi^4}\sum_{n=1}^\infty\frac1{n^4\binom{2n}{n}}$$is rational. – David Aug 04 '23 at 01:48
  • Talking about chances here might be misleading. Given a uniformly randomly chosen real number in $[0, 1]$, there is a 100 percent chance it is irrational. Thus the strategy of "always guess it is irrational" is a very successful strategy. – davidlowryduda Aug 04 '23 at 02:36
  • 1
    If I had to guess whether a certain number was or wasn't rational, I'd compute what I could of its continued fraction. But of course any guess could turn out to be wrong. – Gerry Myerson Aug 04 '23 at 02:44

0 Answers0