Consider the popular game of 20 Questions. In this game, someone chooses a secret entity $x^* \in X$ and you can ask up to 20 yes/no questions $q \in Q$ to determine the identity of $x^*$. Each question $q$ partitions $X$ into two partitions, and asking question $q$ will tell you which one contains $x^*$.
How do you select the right sequence of questions to minimize the number needed to determine the identity of $x^*$? Assume every $x \in X$ is equally likely to be chosen as $x^*$.
One approach is to select questions that partition your candidates into two parts as close in size as possible (i.e. a binary search/maximizing information gain with each step). However this doesn't seem to imply globally optimality -- e.g. you can divide $X$ into two even sets with your first question but then run out of efficient questions to ask.
Given $X$ and $Q$, how do you figure out the minimum number of questions you need to ask to determine $x^*$? What if $x^*$ was selected from some other non-uniform, known distribution?
This amounts to generate a binary prefix-free coding scheme (each yes/no answer is like a 0/1 bit), which in turn is equivalent to build a binary tree (each answer corresponds to a branch).
If you mean "to minimize the average number" of questions, then the optimal solution of this problem is the Huffman code.
(Your proposal of dividing the items in aproximately equally probably subsets is conceptually good, but it's not optimal; that would amount to build the tree starting from the root. What Huffman realized is that the tree should be built starting from the deepest leaves)
There is not a simple formula for $L=$ the exact average length of the code (or average number of questions), only the bounds
$$H\le L < H+1$$
where $H$ is the Shannon entropy (in bits) of the source (probabilities of each item). For the case of $n$ equiprobable items, we have $H=\log_2(n)$