Artificial intelligent assistant

How can the sniffer dog find the bag of drugs? There are $n$ bags. In one of the bags are drugs. There is a dog that when given a group of bags, can tell whether there are drugs in the group or not. Each sniff counts as a "turn". What is the best strategy, the strategy that find the bag with drugs in the smallest amount of turns? So for example, say there are $60$ bags and the drugs are in bag $5$. The dog sniffs bags $17, 6, 2$ and determines that there are no drugs in them. If the dog sniffs in bags $30, 35,5$ then the dog confirms that the drugs are in that group of bags. I think that the best strategy is to sniff half of the bags at a time. So when $n=60$, the dog would sniff thirty bags in the first turn, 15 bags in the second turn, 8 bags in the third turn and so on, eventually finding the one bag with drugs in it. But how can I prove that it is the best strategy? Thanks.

If we have $n$ bags, we will need $k = \log_2{n}$ turns to figure out which bag has the drugs.

The procedure would be similar to what you said in the first step.

Let us number each bag and represent this number in binary system. First turn would be first half bags, i.e., bags with $1$-th MSB equal to 1 (i.e., the first MSB from the leading edge), second turn would be another half set of bags which have $2$-th MSB equal to 1, and so on. In general, $m$-th turn would be all the bags with numbers which have the $m$-th MSB equal to 1.

We cannot beat $k = \log_2{n}$ turns, since each outcome of sniffing is binary and as we need $\log_2{n}$ bits to represent $n$ bags.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 863f0852743bdbab5dd9f0dbefd6a1d4