Factory Upgrade Problem: Amount of factories at a given moment

The name of the pictureThe name of the pictureThe name of the pictureClash 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$.







share|cite|improve this question

























    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$.







    share|cite|improve this question























      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$.







      share|cite|improve this question













      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$.









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 15 at 6:46









      ab123

      1,344319




      1,344319









      asked Jul 15 at 5:43









      Sam Coutteau

      1108




      1108




















          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.






          share|cite|improve this answer





















          • 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











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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






























          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.






          share|cite|improve this answer





















          • 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















          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.






          share|cite|improve this answer





















          • 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













          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.






          share|cite|improve this answer













          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.







          share|cite|improve this answer













          share|cite|improve this answer



          share|cite|improve this answer











          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

















          • 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













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Comments

          Popular posts from this blog

          What is the equation of a 3D cone with generalised tilt?

          Color the edges and diagonals of a regular polygon

          Relationship between determinant of matrix and determinant of adjoint?