Guaranteed strategy:
11 days.
10 days to round up enough prisoners, the 11th day to test it all (see explanation of the opposite)
prisoners lost will always be N
O wait N < 10. it thought it could be 10 or more, never the less my answer is still right, the explanation might be difficult to understand.
A strategy for (a) is as follows:
you have 1/2 the prisoners drink form the wine, if you are lucky the last 10 bottles will be poisonous and it will take you 10 days
let me explain:
1 prisoner drinks, but does not die, means you have 2 prisoners, for each prisoner you ask a new one so now you have 4 prisoners. then you have 2 prisoners drink, none dies so you have 4 prisoners after midnight, then you ask 4 more resulting in 8. This is exponential which makes it easy. (you will have 1024 prisoners in day 10. Now to continue, the first day you have 1 bottle tested, the second day you have 2 bottles tested (you will have a total of 3 bottles tested then 1 first day + 2 2nd day) then the third day you will test 4 bottles (add that to the 3 tested you have 7 bottles tested after the 3th day). the pattern here is you will have tested 1 bottle less than you have prisoners.
Now for the opposite:
if you have 999 bottles poisoned you will do the same but the first person will die, there will always be 1 person that dies and 1 person that lives, so you can only ask for 1 person each day. meaning you'll need 999 days to find out all but 1 bottles are poisoned. you will also lose 999 prisoners. now this takes way to long so instead, as we have seen you can wait 10 days, asking for new prisoners every day, so after 10 days you will have enough prisoners and you can test all the bottles at once, so on the 11th day you will have lost 999 prisoners but it will have only cost 11 days.
As for losing the least prisoners, you will always lose at least N prisoners.