Is there a way to do this? Fixed deduction for x rounds where total = fixed amount

69 Views Asked by At

I am trying to calculate the reduction amount / step per round for the given:

rounds = 1000 points = 80 starting at reward = 1 point

So from round 1 which has a reward of 1 point deduct a fixed amount for the remaining 999 rounds until the sum of all rewards = 80 points.

fixed_deduction_amount = ??

round 1, reward1 = 1 round 2, reward2 = 1 - fixed_deduction_amount round 3, reward3 = 1 - (2 x fixed_deduction_amount)

80 = reward1 + reward2 + .... + reward1000;

Can anyone point me in the right direction?

UPDATE 1

Put another way I am trying to find the value of y in:

80 = 1 + (1 - y) + (1 - 2y) + (1 - 3y) + ..... + (1 - 999y)

UPDATE 2

Thanks for the suggestion.

I am not sure I am doing it correctly but for the following values:

rounds = 25 total_rewards = 10 start_reward = 1

I get:

25 - 650x/2 + 25x = 10

-300x = -15

x = 0.05;

reduction_value = 0.05

rounds:

1: 0.95 :: running total = 1
2: 0.9 :: running total = 1.95
3: 0.85 :: running total = 2.85
4: 0.8 :: running total = 3.7
5: 0.75 :: running total = 4.5
6: 0.7 :: running total = 5.25
7: 0.65 :: running total = 5.95
8: 0.6 :: running total = 6.6
9: 0.55 :: running total = 7.2
10: 0.5 :: running total = 7.75
11: 0.45 :: running total = 8.25
12: 0.4 :: running total = 8.7
13: 0.35 :: running total = 9.1
14: 0.3 :: running total = 9.45
15: 0.25 :: running total = 9.75
16: 0.2 :: running total = 10
17: 0.15 :: running total = 10.2
18: 0.1 :: running total = 10.35
19: 0.05 :: running total = 10.45
20: -3.16414e-16 :: running total = 10.5
21: -0.05 :: running total = 10.5
22: -0.1 :: running total = 10.45
23: -0.15 :: running total = 10.35
24: -0.2 :: running total = 10.2
25: -0.25 :: running total = 10

Is there a way to do this where the running total never exceeds the total_rewards value? In other words the round reward never goes below 0?

Thanks

1

There are 1 best solutions below

1
On

I don´t know exactly, what do you want. From your post I deduce the following equation:

$$\sum_{i=1}^{1000} \left( 1-(i-1)\cdot x \right) =80 $$

The LHS can be splitted into three sums:

$\sum_{i=1}^{1000} 1 \ \ \ \ (1)$

$-x\sum_{i=1}^{1000} i \ \ \ \ (2)$

$x\sum_{i=1}^{1000} 1 \ \ \ \ (3)$


$(1)$ has the value 1000.

$(2)$ can be simplified by using the formula for the nth partial sum of a geometric series: $$-x \cdot \frac{1000\cdot 1001}{2}$$

$(3)$ is $1000\cdot x$

The sum of the three terms has to be 80. Thus you have an equation, which has to be solved for x.