0

I have these two fractions

${11 \over 31 }+{-11 \over 61}$

Adding them gives

$330 \over 1891$

But how do I go back to the two fractions, once I've added them?

I can get the denominators just by factoring 1891, but how do I find the numerators without brute force?

amWhy
  • 210,739

4 Answers4

4

Factor the denominator: $${330 \over 1891} = \frac {330}{31\cdot 61} = \frac A{31} + \frac B{61}$$

Then we need to find $$A\cdot 61 + B\cdot 31 = 330\tag{$\dagger$}$$ The problem then becomes finding integers $A, B$ that satisfy this equation $(\dagger)$. To do this, try using Euclid's Algorithm, or the \Extended Euclidean Algorithm.

amWhy
  • 210,739
1

Every fraction can be decomposed into infinitely many other fractions. For instance, $1/2=1/12321+12319/24642$. So there's no hope.

Brian Rushton
  • 13,375
  • True. Let me add a restriction, to make the output more useful: all of the denominators must be prime numbers. – Nick ODell Jun 27 '13 at 21:20
1

You need to find integers $m$ and $n$ such that $$61m + 31n = 330.$$

For this you use Euclid's algorithm.

MJD
  • 67,568
  • 43
  • 308
  • 617
0

I eventually got around to writing a library to do this.

Link to github.