1
$\begingroup$

I know the Stern-Brocot tree lists out all the possible fractions. But how do I enumerate the fractions that are present in $[a, b]$ where $a$ and $b$ are two fractions.

$\endgroup$
  • 1
    $\begingroup$ Between any two distinct real numbers, it would be impossible to list out all of the possible fractions due to their density in the real numbers (vaguely, there are infinitely many fractions between any two distinct numbers). Perhaps you can provide more context within your post? $\endgroup$ – Clayton Mar 29 '18 at 18:41
  • $\begingroup$ @Clayton They can be enumerated with an infinite list. $\endgroup$ – Mike Earnest Mar 29 '18 at 18:44
  • $\begingroup$ Say I want to find all rationals between 1 and 1/2. Is there a particular pattern or design that we have to follow in the tree structure to list them out? I understand that the pattern would be infinitely long. $\endgroup$ – Free Radical Mar 29 '18 at 18:44
  • $\begingroup$ Do you mean that you would like a formula that would iterate through all the rationals number in this interval? It is possible because the set of rationals is countable. You could look at proofs of: $\mathbb Q$ is countable $\endgroup$ – Max Ft Mar 29 '18 at 18:45
  • 1
    $\begingroup$ Yeah, something like that if it is possible. I was wondering if all rationals in a particular range follow some pattern in the Stern-Brocot tree/series $\endgroup$ – Free Radical Mar 29 '18 at 18:47
2
$\begingroup$

Repeatedly interleaving mediants (as in the original Stern Brocot tree) should work. See https://arxiv.org/pdf/1301.6807.pdf

$\endgroup$
  • $\begingroup$ right, we have just to use $a$ and $b$ as the starting "parents" and then the mediant chain will provide the Stern-Brocot tree in between, i.e. all the rationals in the interval $[a,b]$. $\endgroup$ – G Cab Nov 23 '18 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.