How to solve the Few Scientists Problem (big word problem) in its general form? I'm trying to figure out how to solve this word problem. I'm pretty sure it involves calculus or something even harder, but I don't know how to solve the general form.
Let me start with the concrete form, however:
Concrete Form:
You start with 5 scientists. A scientist can train 50 students for 5 years, after which each student becomes a scientist. (Assume a perfect graduation rate always, and assume you have an infinite population from which to draw students). Or a scientist can work on a project.
The problem is you have 30 Type-A projects, 50 Type-B projects, and 75 Type-C Projects, and they all need to be completed in minimal time. Each Type-A Project requires at least 10 scientists and takes 200/x years to complete, where x is the number of scientists assigned to them. Type-B's require at least 18 scientists and take 150/x years to complete. Type-C's require at least 25 scientist and take 120/x to complete.
What is the minimum time necessary to complete all projects, and what is the "event-order" of such an optimal solution?
I could solve this numerically by doing simulations in a computer program (although that will still be a pain in the neck), but what I really need is how to solve this in its general form.
General Form:
Just assign constants to everything. You start with s scientists, who can train t students for y years. There are A type-a projects, B type-b's, and C type-c's. Respectively, they require a minimum of d, e, and f scientists, and take g/x, h/x, and i/x years to complete.
How do you go about solving this? Is that even possible? Solving this requires finding an optimal solution (completing all projects in minimal time), and proving that no other solution exists that has a smaller finish time.
EDIT: Thanks to @Paul for this clarification. For projects, scientists can join or leave at any time. This is indiscrete time. For training, however, only 1 scientist can train a group of 50. (Two scientists training 50 does not make it go 2x faster.) The training has to be "atomic", which I think is the right word.
 A: I will introduce the following notation:
Let $s_0$ be the initial number of scientists.
Let $s$ be the number of scientists at a particular point.
Let $X_i$ be the different types of projects.
Let $W_i$ be the work required for project $X_i$ - the units will be "scientist years".
Let $N_i$ be the number of projects of type $X_i$.
Let $m_i$ be the minimum number of scientists needed to work on project $X_i$.
Let $r$ be the rate at which students are trained. In the example you have given, where $1$ scientist can train $50$ students, the value of $r$ would be $51$ because the $1$ scientist will become $51$.
Let $p$ be the period of time required to train the students.
Simplification:
Let $W$ be the total amount of work required by all the projects.
$W=\Sigma W_i N_i$
It can be shown that as soon as the total number of scientists is greater than $\max (m_i)$ we do not need to consider the separate values of $W_i$, but can just deal with the problem as being about the total amount of work $W$.
Consider the simplest scenario, "Scenario A":
$W$ is a fairly small number.
$s_0$ is a fairly small number, too, so that $s_0<\min(m_i)$.
You can't start on any projects immediately because you don't have enough scientists, so you must start training.
$p$ years later you have $s=rs_0$ scientists. Assuming that $s>\min(m_i)$, they can now start the projects.
If all the scientists get to work on the projects, they will finish the required work in $\frac {W}{s}=\frac {W}{rs_0}$ years. As $W$ is fairly small, $\frac {W}{rs_0}<p$, so there is no point in setting any of the scientists to train more scientists; the project will be completed before their training is completed.
Consider the next simplest scenario, "Scenario B":
$W$ is a larger number. Specifically, ${W}>prs_0$
As before, you can't start on any projects immediately because you don't have enough scientists, so you must start training.
$p$ years later you have $s=rs_0$ scientists. Assuming that $s \ge \min(m_i)$, they can now start the projects.
Option B.1
If all the scientists get to work on the projects, they will finish the required work in $\frac {W}{s}= \frac {W}{rs_0}$ years. In this case, $\frac {W}{s}>p$, so there are two other possible approaches:
Option B.2 Set all scientists to training students again.
$p$ years later you have $s=r^2s_0$ scientists. If all the scientists now get to work on the projects, they will finish the required work in $\frac {W}{s}= \frac {W}{r^2s_0}$ years. For the moment let us assume that $\frac {W}{r^2s_0}<p$.
Option B.3 Set some scientists to work on the projects and set some to training students.
Let $n$ be the number of scientists allocated to working. Clearly $n \ge \min(m_i)$
$p$ years later these scientists will have completed work equivalent to $np$ scientist years. There remains $W-np$ work to be done.
The $r^2s_0-n$ scientists who were set to train now have become $r^3s_0-rn$ scientists. They joined the $n$ scientists to work on the projects, so the time to complete the remaining work is $\frac {W-np}{r^3s_0-rn+n}$ years.
The times taken by these three approaches are:
Option B.1
$p+\frac {W}{rs_0}$
Option B.2
$2p+\frac {W}{r^2s_0}$
Option B.3
$2p+\frac {W-np}{r^3s_0-rn+n}$
Compare to see which is better.
In general, a good approach seems to be to throw all your resources into training until you have so many scientists that you can complete the projects in less time than it will take to train the next batch.
If $k$ is the number of times you run successive training sessions, then you will have $r^ks_0$ scientists, giving you a time to complete of $pk + \frac {W}{r^ks_0}$.
You find $k$ by solving $\frac {W}{r^ks_0}<p$
$\frac {W}{ps_0}<r^k$
$\ln(W) - \ln (p)- \ln (s_0) <k \ln (r)$
$k = \frac{\ln(W) - \ln (p)- \ln (s_0)}{\ln (r)}$
Then check if you would have been better to have alloacted some scientists to start projects during the previous training season by considering $pk + \frac {W-pn}{r^ks_0-rn+n}$.
A: There are some features to this problem that you might not think are present in the general form.  All the projects require a fixed number of scientist-years of research and all the scientists are interchangeable.  We just need to assign $22500$ scientist-years to research.  The minimum number per project does not matter because we will have lots of scientists and can assign them all to the same project, finishing it quickly, then have them move to another.  The only option is how many scientists to assign to training and how many to research.  Because the training ratio is so high, we make back the cost of training in $0.1$ years.  We should spend all our efforts training until we can complete the projects in less than $5$ years.  After that, training is in vain, because the trainees will not be ready until the research is done.  So we start with all five scientists training, then all $255$ scientists training, so at the end of $10$ years we have $13005$ scientists.  We will be done in $\frac {16500}{13005}\approx 1.730$ years for a total of $11.730$ years.
A: Here is a solution, although probably it's not optimal.
To complete all projects at once in one year, one needs (30 * 200) + (50 * 150) + (25 * 120) = 6000 + 7500 + 3000 = 16500 scientists. 
Training almost all of them can be done in 10 years: 


*

*Year 0: 5 scientists

*Year 5: 5 + (5 * 50) = 255 scientists

*Year 10: 255 + (255 * 50) = 13005 scientists


Dividing the scientists equally for all projects, they should be done in less than two years. Total time: 11 to 12 years.
