Factory Upgrade Problem: Amount of factories at a given moment
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Whilst trying to optimize a simple tycoon type game I came across the following problem.
A factory is defined by 2 functions $P: mathbb N rightarrow mathbb R$ and $C: mathbb N rightarrow mathbb R$.
$P$ is how much earnings the factory makes given its level. For example $P(5) = 7.5$ , would mean that a level 5 factory would make $7.5$/h$.
On the other hand, $C$ gives the cost of upgrading to the next level, So $C(4)=700$, would mean that to upgrade to level 4 from level 3 would take $700$$.
My Question now is you start with a level 1 factory and every time you can afford an upgrade you purchase it, define $f$ as a function which gives you the level of the factory at a specific time given the previous strategy. How can $f$ be defined in terms of $P$ and $C$.
discrete-mathematics
add a comment |Â
up vote
0
down vote
favorite
Whilst trying to optimize a simple tycoon type game I came across the following problem.
A factory is defined by 2 functions $P: mathbb N rightarrow mathbb R$ and $C: mathbb N rightarrow mathbb R$.
$P$ is how much earnings the factory makes given its level. For example $P(5) = 7.5$ , would mean that a level 5 factory would make $7.5$/h$.
On the other hand, $C$ gives the cost of upgrading to the next level, So $C(4)=700$, would mean that to upgrade to level 4 from level 3 would take $700$$.
My Question now is you start with a level 1 factory and every time you can afford an upgrade you purchase it, define $f$ as a function which gives you the level of the factory at a specific time given the previous strategy. How can $f$ be defined in terms of $P$ and $C$.
discrete-mathematics
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Whilst trying to optimize a simple tycoon type game I came across the following problem.
A factory is defined by 2 functions $P: mathbb N rightarrow mathbb R$ and $C: mathbb N rightarrow mathbb R$.
$P$ is how much earnings the factory makes given its level. For example $P(5) = 7.5$ , would mean that a level 5 factory would make $7.5$/h$.
On the other hand, $C$ gives the cost of upgrading to the next level, So $C(4)=700$, would mean that to upgrade to level 4 from level 3 would take $700$$.
My Question now is you start with a level 1 factory and every time you can afford an upgrade you purchase it, define $f$ as a function which gives you the level of the factory at a specific time given the previous strategy. How can $f$ be defined in terms of $P$ and $C$.
discrete-mathematics
Whilst trying to optimize a simple tycoon type game I came across the following problem.
A factory is defined by 2 functions $P: mathbb N rightarrow mathbb R$ and $C: mathbb N rightarrow mathbb R$.
$P$ is how much earnings the factory makes given its level. For example $P(5) = 7.5$ , would mean that a level 5 factory would make $7.5$/h$.
On the other hand, $C$ gives the cost of upgrading to the next level, So $C(4)=700$, would mean that to upgrade to level 4 from level 3 would take $700$$.
My Question now is you start with a level 1 factory and every time you can afford an upgrade you purchase it, define $f$ as a function which gives you the level of the factory at a specific time given the previous strategy. How can $f$ be defined in terms of $P$ and $C$.
discrete-mathematics
edited Jul 15 at 6:46
ab123
1,344319
1,344319
asked Jul 15 at 5:43
Sam Coutteau
1108
1108
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
Let's instead define $C(n)$ to be the cost of upgrading from level n. Then, the time you spend in level n is $C(n)/P(n)$ and the time to get to level n is $$f(n) = sum_i = 1^n - 1fracC(i)P(i)$$
Without knowing C or P there's not much to say about f.
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Let's instead define $C(n)$ to be the cost of upgrading from level n. Then, the time you spend in level n is $C(n)/P(n)$ and the time to get to level n is $$f(n) = sum_i = 1^n - 1fracC(i)P(i)$$
Without knowing C or P there's not much to say about f.
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
add a comment |Â
up vote
1
down vote
Let's instead define $C(n)$ to be the cost of upgrading from level n. Then, the time you spend in level n is $C(n)/P(n)$ and the time to get to level n is $$f(n) = sum_i = 1^n - 1fracC(i)P(i)$$
Without knowing C or P there's not much to say about f.
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Let's instead define $C(n)$ to be the cost of upgrading from level n. Then, the time you spend in level n is $C(n)/P(n)$ and the time to get to level n is $$f(n) = sum_i = 1^n - 1fracC(i)P(i)$$
Without knowing C or P there's not much to say about f.
Let's instead define $C(n)$ to be the cost of upgrading from level n. Then, the time you spend in level n is $C(n)/P(n)$ and the time to get to level n is $$f(n) = sum_i = 1^n - 1fracC(i)P(i)$$
Without knowing C or P there's not much to say about f.
answered Jul 15 at 6:04
Kaynex
2,3261714
2,3261714
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
add a comment |Â
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
What if we are allowed to make multiple level jumps if we have enough earnings? Also, I think it should be $1 + Big[fracC(i)P(i)Big]$ at each step
â ab123
Jul 15 at 6:12
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
$f$ is a function, given a time, that gives you a level, not the other way around. So my question would be the inverse function of your $f$.
â Sam Coutteau
Jul 15 at 15:52
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
It's definitely not invertable for general C(i) and P(i). Maybe for certain functions you may find an inverse.
â Kaynex
Jul 15 at 17:27
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2852216%2ffactory-upgrade-problem-amount-of-factories-at-a-given-moment%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password