# Toy problem: increase production or use production?

There is a class of prob­lems that I no­ticed comes up again and again in var­i­ous sce­nar­ios. Ab­stractly, you can for­mu­late it like this: given a time limit, how much time should you spend in­creas­ing your pro­duc­tion ca­pac­ity, and then how much time should you use your pro­duc­tion ca­pac­ity to pro­duce util­ity? Let’s take a look at two ver­sion of this prob­lem:

Ver­sion 1:

You have N days. You start with a pro­duc­tion ca­pac­ity C=0 and ac­cu­mu­lated util­ity U=0. Each day you can ei­ther: 1) in­crease your pro­duc­tion ca­pac­ity (C=C+1) or 2) use your cur­rent pro­duc­tion ca­pac­ity to pro­duce util­ity (U=U+C).

Ques­tion: On what days should you in­crease your pro­duc­tion, and on what days should you pro­duce util­ity to max­i­mize to­tal ac­cu­mu­lated util­ity at the end of the N days?

It’s triv­ial to prove that the op­ti­mal solu­tion looks like in­creas­ing ca­pac­ity for T days, and then switch­ing to pro­duc­ing util­ity for N-T days. What is T? In this case it’s re­ally straight-for­ward to figure it out. We can com­pute fi­nal util­ity as U(T)=(N-T)*T. The max­i­mum is at T=N/​2. So, you should spend the first half in­creas­ing your pro­duc­tion and the sec­ond half pro­duc­ing util­ity. In­ter­est­ing...

Ver­sion 2:

You have N days. You start with a pro­duc­tion ca­pac­ity C=1 and ac­cu­mu­lated util­ity U=0. Each day you can ei­ther: 1) in­crease your pro­duc­tion ca­pac­ity by a fac­tor F (C=C*F), where F>1 or 2) use your cur­rent pro­duc­tion ca­pac­ity to pro­duce util­ity (U=U+C).

Same ques­tion. Now the fi­nal util­ity is U(T)=F^T*(N-T). Do­ing ba­sic calcu­lus, we find the op­ti­mal T=max(0, N-1/​ln(F)). A few in­ter­est­ing points you can take a way from this solu­tion:

1) If your growth fac­tor F is not large enough, you might have to stick with your origi­nal pro­duc­tion ca­pac­ity of 1 and never in­crease it. E.g. F=1.01 and N=100, where op­ti­mal T=max(0,-0.499171).

2) The big­ger the N, the lower growth fac­tor you can ac­cept as be­ing use­ful, i.e. T>0.

3) For most sce­nar­ios, you should spend 80-90% of the time in­creas­ing the pro­duc­tion. Ex­am­ple. With larger F, T will ap­proach N. This re­minds me of Re­duc­ing Astro­nom­i­cal Waste post.

Ques­tions for you: where have you seen these types of prob­lems come up in your life? Is this a known class of prob­lems?

• In real life, in­creas­ing your pro­duc­tion ca­pac­ity of­ten costs you money. So you have to use your pro­duc­tion ca­pac­ity to pay for in­creas­ing your pro­duc­tion ca­pac­ity.

Then, there is the un­cer­tainty. (You spend 30 years in­creas­ing your pro­duc­tion ca­pac­ity, and then a tech­nolog­i­cal change makes your ex­ist­ing ca­pac­ity ob­so­lete. Or you die in ac­ci­dent.)

Then, there is the prob­lem of re­al­is­tic hu­man mo­ti­va­tion, and of sig­nal­ling to oth­ers. (How would you con­vince you have a su­pe­rior pro­duc­tion ca­pac­ity, when I never saw you pro­duce any­thing?)

Then, there are con­flicts and the first-mover ad­van­tage. (Your pro­duc­tion ca­pac­ity is con­quered by an en­emy who de­cided to pro­duce sooner.)

Some of these may or may not ap­ply in spe­cific sce­nar­ios.

• You of­ten get those kind of prob­lems when play­ing strat­egy games, es­pe­cially 4X (civ-like) games, with de­vel­op­ing your cities/​bases vs pro­duc­ing mil­i­tary units. The main differ­ence with your “toy prob­lem” is that in games the N isn’t fixed, but prob­a­bil­is­tic, which makes it much harder.

I of­ten tend to spend most of the time de­vel­op­ing my pro­duc­tion ca­pac­ity (as you said, it’s the most effi­cient thing to do with a fixed N) but some­times I do it too much and I get caught un­pre­pared by an at­tack...

• Oh, haha, yup! Now I’m an­ti­ci­pat­ing a flood of nega­tive com­ments on my post as well.

• Don’t think so. That is not easy to find via google ex­cept if you already know it. The same re­sults are of­ten re­dis­cov­ered in­de­pen­dently. This just shows that were smart enough to re­dis­cover it.

• Ques­tions for you: where have you seen these types of prob­lems come up in your life? Is this a known class of prob­lems?

The solu­tions you de­rived re­sem­ble bang-bang solu­tions in con­trol the­ory. If you have a con­trol knob you can turn to any value be­tween some min­i­mum and some max­i­mum, a bang-bang solu­tion is an op­ti­mal solu­tion which turns the knob all the way in one di­rec­tion for a while, then turns it all the way in the other di­rec­tion and leaves it there in­definitely.

• Here is one pos­si­ble do­main ex­pert.