We know that the number of prisoners involved in the experiment is 10, but due to different combinations we also know that in the worst case only a maximum of 9 will die due to poison, hence the solution seems to be 9.

But the question in the end clearly states that the king wants to minimize the number of prisoners involved in the experiment as he may decide to kill them all. So the worst case is he kills them all and thus the answer should be 10.

Please correct me if i am missing something here.