# Math Help - Egyptian Fractions

1. ## Egyptian Fractions

This is related to a recent question (http://www.mathhelpforum.com/math-he...ead.php?t=2762) in the Homework Help section. What are "Egyptian fractions?"

Thanks!

-Dan

2. Originally Posted by topsquark
This is related to a recent question (http://www.mathhelpforum.com/math-he...ead.php?t=2762) in the Homework Help section. What are "Egyptian fractions?"

Thanks!

-Dan
Hello,

the old egypts only used fractions with the numerator 1. To express other fractions there existed tables which show, how to assemble this fraction by those with numerator 1.

An example: $\frac{47}{60}=\frac{1}{3}+\frac{1}{4}+\frac{1}{5}$

I assume that those fractions with the numerator 1 are meant when you are talking about "Egyptian fractions".

Have a look here: http://www.mcs.surrey.ac.uk/Personal.../egyptian.html

Greetings

EB

3. Originally Posted by topsquark
This is related to a recent question (http://www.mathhelpforum.com/math-he...ead.php?t=2762) in the Homework Help section. What are "Egyptian fractions?"

Thanks!

-Dan
The Ancient Egyptian method of dealing with fractions was to express them
as a sum of unit fractions. For example:

$
\frac{2}{3}=\frac{1}{2}+\frac{1}{6}
$
.

this can be written in list form $[2,6]$, and it is usual not to repeat a denominator in the expansion.

The representation of a fraction as EF is not unique since the identity:

$
\frac{1}{n}=\frac{1}{n+1}+\frac{1}{n(n+1)}
$

can always be used to extend a representation.

That any fraction can be written as an EF can be shown using the Greedy
algorithm (Fibonacci-Sylvester algorithm). This proceeds as follows:

Code:
assume: p, q positive integers such that p/q is a rational in lowest terms <1.

let n be the largest integer such that 1/n<=p/q, and R=p/q-1/n
EF=[]    //null list form Egyptian fraction

Repeat until R==0
EF=EF|n    //concatenate n to EF
let n be the largest integer such that 1/n<=R, and R=R-1/n
end

assert: EF is an Egyptian fraction representation of p/q
This can be shown to be guaranteed to terminate (I won't do that here) with
EF then obviously an Egyptian Fraction representation of p/q.

Further information can be found here

RonL

Note to self - must type faster in future

4. hey CaptainBlack, what languages do you use to code? I know C++ now and am looking for another language to pick up, something in the direction of web design.

This has nothing to do with math (kind of)

5. Originally Posted by c_323_h
hey CaptainBlack, what languages do you use to code? I know C++ now and am looking for another language to pick up, something in the direction of web design.

This has nothing to do with math (kind of)
That was pseudo-code made up for the occasion.

Otherwise mainly Euler (a freeware Matlab like system), Matlab (and more
Matlab like systems than you can shake a stick at), some C, and in the past
FORTRAN (66 & 77), Pascal, Basic (of assorted varieties), SPSS, Coral 66.

RonL

6. There is a minor bug in the pseudo-code in my previous post which
was deliberately put there to see if anyone was paying attention

If we start with p=1, that is we already have a unit/Egyptian fraction we
are at the mercy of how we interpret a "Repeat until" loop. If we test at
the top of the loop we will not get the right result under these conditions.

I think the following should correct the problem.

Code:
assume: p, q positive integers such that p/q is a rational in lowest terms <1.

let n be the largest integer such that 1/n<=p/q, and R=p/q-1/n
EF=[n]    //list form Egyptian fraction with one entry

Repeat while R<>0
let n be the largest integer such that 1/n<=R, and R=R-1/n
EF=EF|n    //concatenate n to EF
end

assert: EF is an Egyptian fraction representation of p/q
or:

Code:
assume: p, q positive integers such that p/q is a rational in lowest terms <1.

let n be the largest integer such that 1/n<=p/q, and R=p/q-1/n
EF=[]    //null list form Egyptian fraction

if R==0 then
EF=[n]
else
Repeat
EF=EF|n    //concatenate n to EF
let n be the largest integer such that 1/n<=R, and R=R-1/n
Until R==0
endif

assert: EF is an Egyptian fraction representation of p/q
RonL

7. Originally Posted by CaptainBlack
There is a minor bug in the pseudo-code in my previous post which
was deliberately put there to see if anyone was paying attention

If we start with p=1, that is we already have a unit/Egyptian fraction we
are at the mercy of how we interpret a "Repeat until" loop. If we test at
the top of the loop we will not get the right result under these conditions.

I think the following should correct the problem.

Code:
assume: p, q positive integers such that p/q is a rational in lowest terms <1.

let n be the largest integer such that 1/n<=p/q, and R=p/q-1/n
EF=[n]    //list form Egyptian fraction with one entry

Repeat while R<>0
let n be the largest integer such that 1/n<=R, and R=R-1/n
EF=EF|n    //concatenate n to EF
end

assert: EF is an Egyptian fraction representation of p/q
RonL
I'm bilingual in English and Calculus. I don't read codes. Coeds on the other hand...

-Dan

8. Just to see who has been following this so far:

Find seven distinct positive integers $n_1,\ n_2,\ n_3,\ n_4,\ n_5\ n_6,\ n_7$
the recipricals of which sum to $1$, that is, find:

$
n_1,\ \dots\ n_7 \ \in \mathbb{N}
$
,

such that:

$
\forall\ i,j \in \{1,\dots, 7\},\ i \ne j \Rightarrow n_i \ne n_j
$
,

and

$
1=\frac{1}{n_1}+\ \dots\ +\frac{1}{n_7}
$

Extra:

Give an algorithm to generate such a set of integers of any length greater
than 2.

RonL