I got this problem from Rustan Leino, who got it from Carroll Morgan.
I solved it and wrote up my solution.
A king has a daughter and wants to choose the man she will marry. There are three suitors from whom to choose, a Knight, a Knave, and a Commoner. The king wants to avoid choosing the Commoner as the bridegroom, but he does not know which man is which. All the king knows is that the Knight always speaks the truth, the Knave always lies, and the Commoner can do either. The king will ask each man one yes/no question, and will then choose who gets to marry the princess. What questions should the king ask and how should he choose the bridegroom?
The king should ask them all the same question with an obvious answer, like "Does $2 + 2 = 4$?" Two of them will give answers that match each other and the third will give a non-matching answer. The king should choose that third person as the bridegroom.
This works because the Knight and Knave will always disagree, and the Commoner by answering arbitrarily winds up agreeing with one of them. Thus, the Commoner is always in the majority, and by choosing the minority party he avoids choosing the Commoner.