Math Circles
Mathematics Department • Xavier University of Louisiana
Spring 2026
Home
Week 3Saturday • March 7, 2026

Stern–Brocot Tree, Best Approximations, and Continued Fractions

Smallest denominator between fractions
Best approximations
Continued fractions
Header info
Mathematics Department • Xavier University of Louisiana
Math Circles — Spring 2026
Week 3 — Saturday March 7

Typed version (MathJax)

This section follows the Week 3 notes in order. The full original notes are displayed at the end.

Problem 2: simplest fraction between two given fractions

The Week 3 notes continue the Stern–Brocot discussion from Week 2 and focus first on the problem:

Problem 2. How do we find the fraction with the smallest possible denominator between two given fractions?

The notes split the problem into two cases:

  1. One path is not a continuation of the other.
  2. One path is the continuation of the other.

Case 1: one path is not a continuation of the other

Then we use the nearest common ancestor on the Stern–Brocot tree.

\[ L^2R^2L^2 = \frac{4}{11}, \qquad L^2R^2 = \frac{3}{7}, \qquad \text{nearest common ancestor } = L^2R = \frac{2}{5}. \]

So in this example the nearest common ancestor gives the fraction of smallest denominator lying between the two given fractions.

Case 2: one path is the continuation of the other

In this case the notes use the rule that we may attach an infinite tail without changing the number: one attaches either \(RL^{\infty}\) or \(LR^{\infty}\) in order to get the longest possible overlap.

First attach the appropriate infinite tail to the shorter path, then do the same to the longer path, and the overlap gives the desired fraction.

Example from the notes: \[ LR^2 = \frac{3}{4}, \qquad LR^3 = \frac{4}{5}, \] and the overlap gives \[ LR^2L = \frac{7}{9}, \] so \[ \frac{3}{4} < \frac{7}{9} < \frac{4}{5}. \]

Worksheet example

The notes return to the Week 2 worksheet problem of finding the simplest fraction between

\[ \frac{373}{857} \qquad \text{and} \qquad \frac{37}{85}. \]

Using Stern–Brocot paths and the longest overlap, the notes obtain

\[ \frac{121}{278}, \]

hence

\[ \frac{373}{857} < \frac{121}{278} < \frac{37}{85}. \]

Problem 3: best rational approximations

Problem 3. How do we find the best possible fraction to approximate \(\pi\) (or any other irrational number)?

A best approximation to \(\pi\) is a fraction \(\tfrac{p}{q}\) that does a better job than any other fraction \(\tfrac{a}{b}\) with denominator \(b \le q\).

\[ \left|\frac{p}{q} - \pi\right| < \left|\frac{a}{b} - \pi\right| \qquad \text{for every other } \frac{a}{b} \text{ with } b \le q. \]

The notes compare decimal approximations with \(\tfrac{355}{113}\), illustrating that decimal truncation does not necessarily give the best approximation.

Irrational numbers and infinite paths

The notes state that every irrational number corresponds to an infinite path on the Stern–Brocot tree that does not end with \(L^{\infty}\) or \(R^{\infty}\).

To find the best approximations, cut the infinite path every time there is a turn.

This raises the next question: how do we find the paths for numbers such as \(\pi\) or \(\tfrac{373}{857}\)? The answer leads to continued fractions.

From decimal expansions to continued fractions

The notes step back to decimal expansion. For example,

\[ 3.1415 = 3 + \frac{1}{10} + \frac{4}{10^2} + \frac{1}{10^3} + \frac{5}{10^4}. \]

Then they ask why base 10 is used at all, and suggest putting the digits into the denominators instead, producing automatically smaller and smaller pieces. This leads to a nested expression.

Continued fractions

After using parentheses, the expression becomes a continued fraction, written for short in bracket notation.

\[ 3 + \cfrac{1}{1 + \cfrac{1}{4 + \cfrac{1}{1 + \cfrac{1}{5}}}} \,=\, [3;1,4,1,5]. \]
Every fraction can be written as a continued fraction, and every irrational number can be written as an infinite continued fraction.

Continued fractions and the Stern–Brocot tree

For an irrational number, the continued fraction is the sequence of exponents in the Stern–Brocot path.

The notes indicate an example for \(\pi\) leading to a beginning such as

\[ [3;7,15,1,292,\ldots]. \]

For rational numbers, the notes discuss three equivalent descriptions: adding 1 to the last exponent, attaching \(L^{\infty}\) and ignoring \(R^{\infty}\), or attaching \(R^{\infty}\) and ignoring \(L^{\infty}\).

Examples

The notes work through examples such as

\[ \frac{3}{4} = [0;1,3], \qquad \frac{7}{18} = [0;2,1,1,3], \qquad \frac{7}{10} = [0;1,2,3]. \]

How to find the continued fraction of a number

The notes recall quotient and remainder. For example,

\[ \frac{49}{5} = 9 + \frac{4}{5}. \]

Then one inverts the fractional part and repeats the process. Applying this to \(\tfrac{37}{85}\), the notes derive

\[ \frac{37}{85} = [0;2,3,2,1,3]. \]

The last page remarks that the same recursive idea works for irrational numbers as well.

Full notes (all pages)

These are the complete Week 3 notes, included in full at the end.

Week 3 notes, page 1
Notes (Week 3) — page 1
Week 3 notes, page 2
Notes (Week 3) — page 2
Week 3 notes, page 3
Notes (Week 3) — page 3
Week 3 notes, page 4
Notes (Week 3) — page 4
Week 3 notes, page 5
Notes (Week 3) — page 5
Week 3 notes, page 6
Notes (Week 3) — page 6
Week 3 notes, page 7
Notes (Week 3) — page 7