The problem is
N large empty boxes (assume they are of type:1) are initially placed on a table. An unknown number of boxes (type:1) are selected and in each of them K smaller boxes (type:2) are placed. Again an unknown number of type:2 boxes are selected and K boxes of type:3 are placed inside. This process is repeated T times. Now a box is assumed to be empty when it has no smaller boxes inside it. Finally after all the processes are complete let there be F empty boxes in total. Find the total number of boxes on the table(given N, K ,T and F).
There would be at least N + x1 * K + x2 * K + .... + X(2 * T + 1) * K + X(2 * T + 2) * K boxes,
where x1 is the boxes of type 1 in which K smaller boxes of type 2 were placed in trial 1, similarly x2 is the boxes of type 2 in which K smaller boxes of type 3 are placed and then similarly upto trial T.
I tried solving this but I get too many variables and cases such as placing a box inside an empty or non-empty box etc. So, how do I solve this?
Example: N = 11, K = 8, T = 2, F = 102 Answer: 115