Nine Out Of Ten

Let's consider the subproblem of maximizing the number of successful experiments. The set of successful experiments consists of two non-overlapping subsets: the mad scientist correctly identified a successful experiment and the mad scientist incorrectly identified an experiment as unsuccessful. Since these subsets do not overlap, we can maximize their sizes independently of each other. According to the problem statement, the size of the set of correctly identified experimental results is $$$\frac{n}{10}$$$, and according to the condition, the size of the set of experiments that the scientist identified as successful is $$$x$$$. To maximize the number of correctly identified successful experiments, we use the fact that the experiments are independent and indistinguishable from each other, leading us to the result of $$$min(\frac{n}{10}, x)$$$. The formula for the second subset is accordingly: $$$min(\frac{9n}{10}, n-x)$$$. By summing these two minima, we obtain the formula for our subproblem: $$$min(\frac{n}{10}, x) + min(\frac{9n}{10}, n-x)$$$. The second subproblem of minimizing the number of successful experiments is equivalent to the problem of maximizing the number of unsuccessful experiments, which can be solved similarly to the first subproblem, and the final formula for the minimization subproblem looks like this: $$$n - min(\frac{n}{10}, 10-x) - min(\frac{9n}{10}, x)$$$.