4
$\begingroup$

What could be the fastest manual approach for sorting (ascending) these fractions:

$\frac{117}{229},\frac{143}{291},\frac{123}{241},\frac{109}{219}$

I would also be very grateful if somebody explain a general manual approach for sorting fractions which doesn't really follow any pattern.

4 Answers 4

13

The fastest way is to use lazy continued fraction expansions, computed in parallel, as I explained in an answer to a similar question. Your example requires only a single step manually, viz.

$ 2-\dfrac{5}{117}\ <\ 2-\dfrac{5}{123}\ <\ 2+\dfrac{5}{5\cdot109}\ <\ 2+\dfrac{5}{143} $

  • 0
    $T$he algorithm does not take CFs as input. Rather it works on any effective representation of rationals or reals, i.e. where one can effectively compute the operations: floor, sgn, x-n, and 1/x. Conceptually the algorithm computes and compares the continued fraction coefficients. But if you aren't familiar with CFs you can simply ignore that background information and simply view it as comparing integer and fractional parts, performing the latter by flipping and recursing, as described in the linked answer.2011-08-17
4

The answer by lhf is the only real way (other than the elegant approach described by Bill Dubuque). You can use some ad hoc techniques to makes the numbers smaller. One possible trick is that for positive integers $a,b,c,d$ we always have that the mediant $(a+c)/(b+d)$ is between $a/b$ and $c/d$. Works here. The mediant of the first two is $260/520=1/2$, so to compare these two you only need to decide, which is larger than $1/2$, and that is easier with lhf's test (= the definition of the order of rationals).

A weighted mediant might work better sometimes, but occasionally you just cannot avoid getting some dirt on your hands.

2

The only way I know of comparing fractions without considering decimal equivalents is by cross multiplication: $\displaystyle\frac a b < \frac c d $ iff $ad < bc$ (assuming positive fractions).

  • 0
    @FoolForMath: plus the least decimal equivalents that you need for comparision are $0.5109,0.491,0.5103,0.497$.2011-08-17
1

First, note that $ \frac{{117}}{{229}},\;\frac{{123}}{{241}} > \frac{1}{2} $ and $ \frac{{143}}{{291}},\;\frac{{109}}{{219}} < \frac{1}{2}. $ Hence it suffices to show $ \frac{{117}}{{229}} > \frac{{123}}{{241}} $ and $ \frac{{143}}{{291}} < \frac{{109}}{{219}}. $ For the first inequality, note that $ \frac{{123}}{{241}} = \frac{{117 + 6}}{{229 + 12}} < \frac{{117}}{{229}}, $ since $ \frac{6}{{12}} = \frac{1}{2} < \frac{{117}}{{229}}. $ For the second inequality, note that $ \frac{{143}}{{291}} = \frac{{109 + 34}}{{219 + 72}} < \frac{{109}}{{219}}, $ since $ \frac{{34}}{{72}} < \frac{{109}}{{219}}. $ (The last inequality can be taken for granted, noting that $109/219 \approx 0.5$.)