[Math] Honest and Deceitful Professors Problem

algorithmspuzzle

I found this in An Introduction to Bioinformatics Algorithms. I've paraphrased for clarity.

There are 100 professors. Some are honest, while others are dishonest. There are more honest professors than dishonest ones. Honest professors always tell the truth, but the dishonest ones sometimes tell the truth and sometimes lie. You can ask any professor the following question about any other professor, "Professor Y, is Professor X honest?" to which he/she will answer yes or no. Design an algorithm that allows you to figure out which of the professors are honest with no more than 198 questions.

The bold part is the kicker. If liars always lied, then the problem is trivial – just ask 99 people about one guy. The majority would be the truthful answer, so you know your honest guys and your liars.

So, any advice? If you give the answer please put it in spoiler tags since I'm just looking for direction.

Best Answer

Spoiler

Randomly pair the professors, for each pair ask both the professors, the opinion of each other. Pick one from each of the pairs which result in the answer of (Honest, Honest). Rinse, Repeat.

Related Question