A coach picks team members in two ways:
A. The team of three people should consist of one experienced participant and two newbies. Thus, each experienced participant can share the experience with a large number of people.
B. The team should have two experienced members plus one newbie. Thus, each newbie can gain more knowledge and experience.
All the teams during the training session should belong to one of the two ways described above. Furthermore, they agree that the total number of teams should be as much as possible.
There are $E$ experienced members and $N$ newbies on the training session. Can you calculate what maximum number of teams can be formed?
I have solved this problem in a purely mathematical way! Let the number of teams of type A be $x$ and type B be $y$. Now
$$\begin{align*} 2\cdot x+y&=E\\ 2\cdot y+x&=N \end{align*}$$
Now adding these equations, I get
$$\begin{align*} 3\cdot (x+y)&=N+E\\ (x+y)&=(N+E)/3 \end{align*}$$
For the maximum number of integral teams, I should take floor of $(N+E)/3$ as it is equal to $x+y$ (the number of teams).
We also have to check another condition, i.e., $x+y= (N+E)/3$. Now we have to back substitute in starting equations and constrain $x$ and $y$ to be greater than zero!
This would yield us the condition where this will be true; otherwise one type of teams will be zero and that case is trivial.
Now, I want to know is there a better solution than all of this maths?