Connecting Tech Pros Worldwide Forums | Help | Site Map

Dividing a Number into Unequal Parts

Member
 
Join Date: Nov 2008
Posts: 80
#1: Dec 16 '08
Title looks unclear but what I need is fairly simple:

Suppose we have a rope 100cm long, and we want to divide it into 10 equal parts. In this case each part would be 10cm long.

Now, what if we want to divide it into unequal parts; say each part will be x times longer than the previous part. How to write such an equation?

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Dec 16 '08

re: Dividing a Number into Unequal Parts


Quote:

Originally Posted by serdar View Post

Title looks unclear but what I need is fairly simple:

Suppose we have a rope 100cm long, and we want to divide it into 10 equal parts. In this case each part would be 10cm long.

Now, what if we want to divide it into unequal parts; say each part will be x times longer than the previous part. How to write such an equation?

If the smallest piece of rope has length l (lower case ell) then the next parts have lengths x*l x^2*l x^3*l ... x^9*l (ten pieces in total).

The sum of these numbers must equal 100 so:

l+x*l+x^2*l+ ... x^9*l == 100 -->

l*((1-x^10)/(1-x)) == 100 -->

x is a constant so:

l*C == 100 --> l == 100/C

kind regards,

Jos
Member
 
Join Date: Nov 2008
Posts: 80
#3: Dec 16 '08

re: Dividing a Number into Unequal Parts


Hmm, you explained it so clear -and fast. Thanks very much.

I think I need a 'simple maths' sub-forum here to post :)
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: Dec 17 '08

re: Dividing a Number into Unequal Parts


Ha, the off-by-one does Jos in again.
Reply


Similar Algorithms / Advanced Math bytes