Введение
В математике медианта двух дробей, обычно состоящих из четырех положительных целых чисел, определяется как
and is defined as
That is to say, the numerator and denominator of the mediant are the sums of the numerators and denominators of the given fractions, respectively. It is sometimes called the freshman sum, as it is a common mistake in the early stages of learning about addition of fractions. Technically, this is a binary operation on valid fractions (nonzero denominator), considered as ordered pairs of appropriate integers, a priori disregarding the perspective on rational numbers as equivalence classes of fractions. For example, the mediant of the fractions 1/1 and 1/2 is 2/3. However, if the fraction 1/1 is replaced by the fraction 2/2, which is an equivalent fraction denoting the same rational number 1, the mediant of the fractions 2/2 and 1/2 is 3/4. For a stronger connection to rational numbers the fractions may be required to be reduced to lowest terms, thereby selecting unique representatives from the respective equivalence classes. The Stern–Brocot tree provides an enumeration of all positive rational numbers via mediants in lowest terms, obtained purely by iterative computation of the mediant according to a simple algorithm.
То есть, числитель и знаменатель медианты равны сумме числителей и знаменателей данных дробей соответственно. Иногда её называют суммой первокурсника, поскольку это распространенная ошибка на начальных этапах изучения сложения дробей. Строго говоря, это бинарная операция над допустимыми дробями (с ненулевым знаменателем), рассматриваемыми как упорядоченные пары соответствующих целых чисел, при этом априори не учитывается взгляд на рациональные числа как на классы эквивалентности дробей. Например, медианта дробей 1/1 и 1/2 равна 2/3. Однако, если дробь 1/1 заменить дробью 2/2, которая является эквивалентной дробью, представляющей то же рациональное число 1, то медианта дробей 2/2 и 1/2 равна 3/4. Для более тесной связи с рациональными числами дроби могут быть приведены к несократимому виду, тем самым выбирая уникальных представителей из соответствующих классов эквивалентности. Дерево Стерна — Броко обеспечивает перечисление всех положительных рациональных чисел посредством медиант в несократимом виде, получаемых исключительно итеративным вычислением медианты по простому алгоритму.
and is defined as
That is to say, the numerator and denominator of the mediant are the sums of the numerators and denominators of the given fractions, respectively. It is sometimes called the freshman sum, as it is a common mistake in the early stages of learning about addition of fractions. Technically, this is a binary operation on valid fractions (nonzero denominator), considered as ordered pairs of appropriate integers, a priori disregarding the perspective on rational numbers as equivalence classes of fractions. For example, the mediant of the fractions 1/1 and 1/2 is 2/3. However, if the fraction 1/1 is replaced by the fraction 2/2, which is an equivalent fraction denoting the same rational number 1, the mediant of the fractions 2/2 and 1/2 is 3/4. For a stronger connection to rational numbers the fractions may be required to be reduced to lowest terms, thereby selecting unique representatives from the respective equivalence classes. The Stern–Brocot tree provides an enumeration of all positive rational numbers via mediants in lowest terms, obtained purely by iterative computation of the mediant according to a simple algorithm.
Обобщение
Понятие медианты может быть обобщено на n дробей, и справедлива обобщенная неравенство медианты, что, по-видимому, впервые заметил Коши. Более точно, взвешенная медианта n дробей определяется как (при ). Можно показать, что она находится где-то между наименьшей и наибольшей дробью среди этих n дробей.