Creating an Equation (coding for VR video game)

DurzoBlints

New member
Joined
Jun 26, 2019
Messages
3
Hello,

I'm a developer on a Minecraft server and I need help creating an equation to calculate how many times a player can Prestige in one single command.
The gamemode requires players to mine blocks in order to level up to the next Mine, starting at A Mine all the way through Z mine, with each level up costing a fixed amount more. After a player has reached Z Mine, they will be able to Prestige and be retested back to A mine. This algorithm will be coded, too.

Here are the initial conditions:
To get to Z, it cost $10,000,000,000.00. To get to Prestige 1, it will cost $17,500,000,000.00. That is a fixed amount of increase of 1.75. So to get to Prestige 2, it will cost $30,625,000,000.00. So on and so on.

The equation must take into consideration the players Current Balance and Current Prestige while X = the Amount of possible prestige's. If it helps, it is okay for the command to only work after a player has at least Prestiged one time, so the equation will only consider all subsequent Prestige's and beyond.

Please, if you need any more information, I will give you my discord ID and we can go from there. Also, if possible, please check the equation Inductively before submitting a solution.

Thank you for reading,

Michael.
 
Last edited by a moderator:
Too many undefined terms prevent me from following your request (eg: 'prestige' is not defined as either a noun or a verb).

Also, have you asked others to verify by induction because you're unable to do it?

:confused:
 
It sounds like you want a function that will take in the player's amount of money (\(N\)) and output how many times they can afford to prestige without running out of money. For example, say the player had 210,000,000,000. The function would then output 5 because:

\(210,000,000,000 - (10,000,000,000 + 17,500,000,000 \\ + 30,625,000,000 + 53,593,750,000 + 93,789,062,500) \\ = 4,492,187,500\)

Which is insufficient to be able to afford another level of prestige. Assuming this is correct, then the real question is how can you code such a function for an arbitrary value of \(N\)? Well, you can start by identifying that the cost of the \(x^{th}\) level of prestige is given by:

\(1.75^{x-1} \cdot 10^{10}\)

The total cost of every prestige level up to, and including, \(x\) would then be given by:

\(10^{10} + 1.75 \cdot 10^{10} + 1.75^{2} \cdot 10^{10} + 1.75^{3} \cdot 10^{10} + \cdots + 1.75^{x - 1} \cdot 10^{10}\)

Or we can write this in sigma notation:

\(\displaystyle \sum\limits_{k = 0}^{x - 1} 1.75^{k} \cdot 10^{10}\)

This informs us that the problem is really to find the maximum value of \(x\) for which:

\(\displaystyle \sum\limits_{k = 0}^{x - 1} 1.75^{k} \cdot 10^{10} < N\)

Can you see why this can be further reduced to simply solving the equality and rounding down to the nearest integer? How do you suppose you might go about this? As a hint, consider that this formula is a Geometric Series.
 
ksdhar2, thank you so much for responding and taking the time to solve this more me. I just realized I added a detail that is incorrect, that being the fact that when you Prestige, you do not get reset back to A- which mean you don't need the extra 10^10? Would i just have to remove the 10^10 from the equation? Or keep it in for the first Prestige and all subsequent prestige's remove it?
Again, thank you so much for helping. My specialty is not in mathematics.
 
It sounds like you want a function that will take in the player's amount of money (\(N\)) and output how many times they can afford to prestige without running out of money. For example, say the player had 210,000,000,000. The function would then output 5 because:

\(210,000,000,000 - (10,000,000,000 + 17,500,000,000 \\ + 30,625,000,000 + 53,593,750,000 + 93,789,062,500) \\ = 4,492,187,500\)

Which is insufficient to be able to afford another level of prestige. Assuming this is correct, then the real question is how can you code such a function for an arbitrary value of \(N\)? Well, you can start by identifying that the cost of the \(x^{th}\) level of prestige is given by:

\(1.75^{x-1} \cdot 10^{10}\)

The total cost of every prestige level up to, and including, \(x\) would then be given by:

\(10^{10} + 1.75 \cdot 10^{10} + 1.75^{2} \cdot 10^{10} + 1.75^{3} \cdot 10^{10} + \cdots + 1.75^{x - 1} \cdot 10^{10}\)

Or we can write this in sigma notation:

\(\displaystyle \sum\limits_{k = 0}^{x - 1} 1.75^{k} \cdot 10^{10}\)

This informs us that the problem is really to find the maximum value of \(x\) for which:

\(\displaystyle \sum\limits_{k = 0}^{x - 1} 1.75^{k} \cdot 10^{10} < N\)

Can you see why this can be further reduced to simply solving the equality and rounding down to the nearest integer? How do you suppose you might go about this? As a hint, consider that this formula is a Geometric Series.
ksdhar2, thank you so much for responding and taking the time to solve this more me. I just realized I added a detail that is incorrect, that being the fact that when you Prestige, you do not get reset back to A- which mean you don't need the extra 10^10? Would I just have to remove the 10^10 from the equation? Or keep it in for the first Prestige and all subsequent prestige's remove it? Also, what do all the variables stand for?
Again, thank you so much for helping. My specialty is not in mathematics and I want to make sure it is correct.
(Ignore my independent response as I just noticed the direct rely button.)
 
Top