Stern-Brocot tree

Stern-Brocot tree

If we start with irreducible fractions representing zero and
infinity,

0

1

,

1

0

,

and then between

adjacent fractions

m

n

and

m

′

n

′

we insert

fraction

m

+

m

′

n

+

n

′

, then we
obtain

0

1

,

1

1

,

1

0

.

Repeating the process, we get

0

1

,

1

2

,

1

1

,

2

1

,

1

0

,

and then

0

1

,

1

3

,

1

2

,

2

3

,

1

1

,

3

2

,

2

1

,

3

1

,

1

0

,

and so forth. It can be proven that every irreducible fraction
appears at some iteration and no fraction ever appears twice

[

1

]

. The process
can be represented graphically by means of so-called

Stern-Brocot tree

, named after its discoverers, Moritz Stern
and Achille Brocot.

{xy}

*

!

C

\xybox

\xymatrix

@

C

=

0.4

e

m

0

1

\ar

@

.

[

d

]

&

&

&

&

&

&

&

&

1

1

\ar

@

-

[

l

l

l

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

r

r

r

d

]

&

&

&

&

&

&

&

&

1

0

\ar

@

.

[

d

]

0

1

\ar

@

.

[

d

]

&

&

&

&

1

2

\ar

@

-

[

l

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

r

d

]

&

&

&

&

1

1

\ar

@

.

[

d

]

&

&

&

&

2

1

\ar

@

-

[

l

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

r

d

]

&

&

&

&

1

0

\ar

@

.

[

d

]

0

1

\ar

@

.

[

d

]

&

&

1

3

\ar

@

-

[

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

d

]

&

&

1

2

\ar

@

.

[

d

]

&

&

2

3

\ar

@

-

[

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

d

]

&

&

1

1

\ar

@

.

[

d

]

&

&

3

2

\ar

@

-

[

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

d

]

&

&

2

1

\ar

@

.

[

d

]

&

&

3

1

\ar

@

-

[

l

d

]

\ar

@

.

[

d

]

\ar

@

-

[

r

d

]

&

&

1

0

\ar

@

.

[

d

]

0

1

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

1

4

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

1

3

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

2

5

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

1

2

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

3

5

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

2

3

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

3

4

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

1

1

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

4

3

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

3

2

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

5

3

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

2

1

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

5

2

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

3

1

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

&

4

1

\ar

@

-

+

<

-

0.5

e

m

,

-

5

e

x

>

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

\ar

@

-

+

<

0.5

e

m

,

-

5

e

x

>

&

1

0

\ar

@

.

+

<

0

e

m

,

-

5

e

x

>

If we specify position of a fraction in the tree as a path consisting of L(eft) an R(ight) moves along the tree starting from the top (fraction

1

1

), and also define matrices

L

=

[

1

1

0

1

]

,

R

=

[

1

0

1

1

]

,

then product of the matrices corresponding to the path is matrix

[

n

n

′

m

m

′

]

whose entries are numerators and denominators of parent fractions. For example, the path leading to fraction

3

5

is LRL. The corresponding

matrix product

is

L

⁢

R

⁢

L

=

[

1

1

0

1

]

⁢

[

1

0

1

1

]

⁢

[

1

1

0

1

]

=

[

2

3

1

2

]

,

and the parents of

3

5

are

1

2

and

2

3

.

Continued fractions

and Stern-Brocot tree are closely related. A continued fraction

⟨

a

0

;

a

1

,

a

2

,

…

⟩

corresponds to fraction whose path from the top is

R

a

0

⁢

L

a

1

⁢

R

a

2

⁢

⋯

with the last element removed. For example,

5

3

=

1

+

1

1

+

1

2

=

⟨

1

;

1

,

2

⟩

=

R

1

⁢

L

1

⁢

R

2

-

1

=

R

⁢

L

⁢

R

,

4

11

=

0

+

1

2

+

1

1

+

1

3

=

⟨

0

;

2

,

1

,

3

⟩

=

R

0

⁢

L

2

⁢

R

1

⁢

L

3

-

1

=

L

⁢

L

⁢

R

⁢

L

⁢

L

.

The

irrational numbers

correspond to the infinite paths in the Stern-Brocot tree. For example, the golden mean

ϕ

=

⟨

1

;

1

,

1

,

1

,

…

⟩

corresponds to the infinite path

R

⁢

L

⁢

R

⁢

L

⁢

R

⁢

⋯

. In particular, the denominator of the fraction corresponding to the string

R

⁢

L

⁢

R

⁢

⋯

of length

n

is the

n

’th

Fibonacci number

.

References

1

Ronald L. Graham, Donald E. Knuth, and Oren Patashnik.

Concrete Mathematics

.

Addison-Wesley, 1998.

http://www.emis.de/cgi-bin/zmen/ZMATH/en/quick.html?type=html&an=0836.00001

Zbl 0836.00001.

Title

Stern-Brocot tree

\metatable

Generated on Fri Feb 9 15:10:45 2018 by

LaTeXML