TITLE: Selecting a menu
QUESTION [15 upvotes]: While perusing old unanswered puzzle questions, I came across this one. I found it quite interesting, but a bit vague, so I've decided to recast it.

A party is to be held at a restaurant. The restaurant has the ability to make $D$ different dishes, but the menu for the party will be a fixed menu featuring just $d$ dishes, where $d < D$. To select which dishes should be on the menu, the $n$ guests are asked to rank all D dishes.
For which values of $D$, $d$ and $n$ is it always possible to select $d$ dishes such that for any dish $k$ not on the menu, more than half the guests would prefer one of the dishes in the menu over dish $k$?

Let's look at a concrete example. Suppose the number of possible dishes was $D=10$, the number of selected dishes was $d=3$ and the number of guests was $n=10$. The worst possible ranking I can think of (though I'm not sure it is the worst) is shown below:

The ranks are spread out so no guest ranks any dish the same.
I now selected the $3$ dishes marked in green so that the ranks of $1,2, 3$ were distributed among the guests as much as possible. Thus, only guest $10$ does not have one of the selected dishes in his top $3$.
If you now go through each of the unselected dishes, you will see that in every case a majority of the guests will have a higher ranked dish among the $3$ selected dishes.
So (assuming my worst case actually is the worst case!) with these values of $D$, $d$ and $n$, it is always possible to select such a menu.
Any input as to whether a worse case ranking is possible, would also be appreciated.
EDIT - Partial results
After fiddling with this question, I realize I should probably have asked "Given $n$ and $D$, what is the minimum required $d$ to fulfill the constraint?". Afterall, if a certain value of $d$ works, then so will any larger value of $d$.
My biggest problem, oddly, is how to know the worst possible ranking. To test conjectures, I need to test them against the worst case. But I'm not completely sure what that is, for a given $n$ and $D$.
Anyway, an initial result is that a menu is always possible if $d > \frac{n}{2}$.
A second tentative result is that if $n = D$ then $d = 2$. E.g., if I select dish $1$ and $6$ in my example above, the constraint is fulfilled.
But this implies that if a $1000$ people ranked a $1000$ dishes, it would still be possible to select $2$ dishes that fulfilled the constraint. This doesn't seem right. But if I use the "worst case" scenario which I used in my example above, this is the result I get.
I'd appreciate if someone could post a counter-example. I suspect the problem is that my "worst case" is not the actual worst case.
EDIT2 - Outragous!
Further fiddling and computer simulation suggests the outragous claim that if $n \ge D$ then still $d = 2$. This implies that if a $1,000$ dishes were ranked by a $1,000,000$ guests, we could always find just $2$ dishes which fulfilled the constraint! I must be doing something wrong.
As usual, counter-examples would be greatly appreciated.
EDIT3
So I've now done $10,000$ simulations with $30$ dishes and $60$ guests, where the guests ranked the dishes randomly, and in every case a menu of just $2$ dishes was sufficient. My confidence that $2$ dishes will always be sufficient for $n \ge D$ grows. :-)
But a proof or counter-example would be nice.
Now to look at $n < D$.

REPLY [4 votes]: You asked:

For which values of $D$, $d$ and $n$ is it always possible to select $d$ dishes such that for any dish $k$ not on the menu, more than half the guests would prefer one of the dishes in the menu over dish $k$?

Perhaps you meant to say "at least half" instead of "more than half"? The point of the example below is to show that it might make a difference. (This example is based on an idea from a comment by Rosie F.)
Later you asked whether $d=2$ is always possible for $n\gt1$ and $D\gt2$. In this example with $D=7$ and $n=14$, for any menu of size $d=2$, there is a dish $k$ not on the menu such that exactly half of the guests prefer one of the dishes on the menu to dish $k$, and exactly half prefer dish $k$ to both of the dishes on the menu. Calling the dishes $0,1,2,3,4,5,6$, the $14$ preference lists below. (The notation $0,1,5,2,3,4,6$ means that dish $0$ is preferred to dish $1$, which is preferred to dish $5$, which is preferred to dish $2$, which is preferred to dish $3$, which is preferred to dish $4$, which is preferred to dish $6$.)
$$0,1,5,2,3,4,6\quad\quad\quad\quad0,2,3,4,5,6,1$$
$$1,2,6,3,4,5,0\quad\quad\quad\quad1,3,4,5,6,0,2$$
$$2,3,0,4,5,6,1\quad\quad\quad\quad2,4,5,6,0,1,3$$
$$3,4,1,5,6,0,2\quad\quad\quad\quad3,5,6,0,1,2,4$$
$$4,5,2,6,0,1,3\quad\quad\quad\quad4,6,0,1,2,3,5$$
$$5,6,3,0,1,2,4\quad\quad\quad\quad5,0,1,2,3,4,6$$
$$6,0,4,1,2,3,5\quad\quad\quad\quad6,1,2,3,4,5,0$$
For instance, if the menu is $\{0,1\}$, we can take $k=6$; if the $14$ guests are asked to rank the dishes $0$, $1$ and $6$, then $3$ guests rank dish $0$ highest of the three, $4$ guests rank dish $1$ highest, and $7$ guests rank dish $6$ highest.
Likewise, it can be seen that $k=6$ also works for the menus $\{0,2\}$ and $\{0,3\}$. Cyclically, $k=0$ works for $\{1,2\}$, $\{1,3\}$, $\{1,4\}$; $k=1$ works for $\{2,3\}$, $\{2,4\}$, $\{2,5\}$; $k=2$ works for $\{3,4\}$, $\{3,5\}$, $\{3,6\}$; $k=3$ works for $\{4,5\}$, $\{4,6\}$, $\{0,4\}$; $k=4$ works for $\{5,6\}$, $\{0,5\}$, $\{1,5\}$; and $k=5$ works for $\{0,6\}$, $\{1,6\}$, $\{2,6\}$.