  Given a set $A$ of positive integers $a_1<\cdots<a_k$ and a partition $P:
n_1+\cdots+n_k=n$, find the extremal denominators of the regular and
semi-regular continued fraction $[0;x_1,\ldots,x_n]$ with partial quotients
$x_i\in A$ and where each $a_i$ occurs exactly $n_i$ times in $x_1,\ldots,x_n$.
In 1983, G. Ramharter gave an explicit description of the extremal arrangements
of the regular continued fraction and the minimizing arrangement for the
semi-regular continued fraction and showed that in each case the arrangement is
unique up to reversal and independent of the actual values of the integers
$a_i$. However, an explicit determination of a maximizing arrangement for the
semi-regular continuant turned out to be more difficult. Ramharter conjectured
that as in the other three cases, the maximizing arrangement is unique up to
reversal and depends only on the partition $P$ and not on the values of the
$a_i$. He further verified the conjecture in the case of a binary $A$. In this
paper we confirm Ramharter's conjecture for sets $A$ with $|A|=3$ and give an
algorithmic construction for the unique maximizing arrangement. We also show
that Ramharter's conjecture fails for sets with $|A|\geq 4$, as the maximizing
arrangement is in general neither unique nor independent of the values of the
digits in $A$. The central idea is that the extremal arrangements satisfy a
strong combinatorial condition, which may also be stated in the context of
infinite sequences on an ordered set. We show that for bi-infinite binary
words, this condition coincides with the Markoff property, discovered by A.A.
Markoff in 1879 in his study of minima of binary quadratic forms. We further
show that this same combinatorial condition is the fundamental property which
describes the orbit structure of the natural codings of points under a
symmetric $k$-interval exchange transformation.
