This question comes out of a game mod I was playing. In the game you get income every 30 seconds (period = $30s$), in order to increase your income you can send units (sending units will give you 10% of the unit cost in income).
In the game, you get to a kind of next stage when you reach $1M$ gold, so my question is how do I reach that fastest?
Let's say I started saving all my income as soon as my income reached $50K$, then it would take $\frac{1M}{50K}=20$ periods. Or I can instead double my income to $100K$, which would take $$1.1^x=2, x\approx7.27254$$ $$\frac{1M}{100K}+7.27254\approx17.27$$
But how do I check this for all values?
SOLUTION I ended up bruteforcing the solution to my problem, at the answer seems to be 90910, which is faster than 100K by 0.434248915812692 periods/rounds.
92K, disproves it:
$$10.49205869\cdot ln(\frac{100000}{92000})+10 > \frac{100000}{92000}$$ Formula comes from: $$92000\cdot1.1^x=100000$$ isolated for x.
So I'm just gonna bruteforce the solution it seems, would've been nice with a more beautiful approach.
– Akudo Oct 18 '17 at 15:24