We are given a set of 100 professors, each being either honest (always tells the truth) or dishonest (can lie or tell the truth arbitrarily). It is guaranteed that the number of honest professors is strictly more than 50.
We can ask any professor about any other professor:
"Professor Y, is Professor X honest?"
The respondent (Y) may answer “yes” or “no.”
Your goal: Identify exactly who the honest professors are, using no more than 198 questions.
✅ Key Observations:
Let ( H ) be the number of honest professors and ( D ) the number of dishonest ones.
( H + D = 100 ) and ( H > D ) → So ( H \geq 51 ), ( D \leq 49 ).
Honest professors can be trusted fully, so if we can find one honest professor, we can use them to test everyone else.
Dishonest professors can lie, so their answers can't be trusted unless validated.
✅ High-Level Strategy
Find at least one honest professor, using question comparisons.
Use this known honest professor to ask about all 99 others to find which are honest.
To achieve this in 198 questions or fewer, we’ll use a candidate elimination approach, inspired by the Boyer-Moore majority algorithm, which finds a majority element in linear time using pairwise testing.
✅ Step-by-Step Algorithm
Step 1: Find a candidate honest professor (at most 99 questions)
We simulate the Boyer-Moore majority algorithm:
Initialize candidate = null, count = 0.
For each professor ( P_i ) (from 1 to 100):
If count == 0, set candidate = P_i, and count = 1.
Else:
Ask: “Professor ( P_i ), is candidate honest?”
If the answer is yes, increment count.
If the answer is no, decrement count.
This uses exactly 99 questions: We ask each professor (except the candidate) about the current candidate.
At the end, the candidate is guaranteed to be honest because:
Honest professors are a strict majority, and
Dishonest ones can't collude consistently to eliminate all honest candidates.
Step 2: Ask the candidate to evaluate all others (99 questions)
Now that we have a known honest professor, call them H.
For every other professor ( P \neq H ):
Ask: “H, is P honest?”
Each answer is correct (since H is honest), and this correctly labels the 99 other professors.
This step uses 99 questions.
✅ Total Questions Used:
Step 1: 99 questions to find a candidate.
Step 2: 99 questions to verify all others.
💡 Total: 99 + 99 = 198 questions
✅ Summary of Algorithm
plaintext
1. Initialize count = 0, candidate = null
2. For each professor P_i (1 to 100):
a. If count == 0:
- candidate = P_i
- count = 1
b. Else:
- Ask P_i about candidate (cost: 1 question)
- If yes → count++
- If no → count--
3. Let candidate be the output at the end (one honest professor).
4. Ask the candidate about each of the other 99 professors.
- Each answer reveals whether the person is honest.
Total questions: 99 (phase 1) + 99 (phase 2) = 198
✅ This solves the problem in ≤ 198 questions with certainty. ✅
You now have a list of all honest professors (and by exclusion, all dishonest ones) and can safely identify good research advisors!