jonanes, I'm not sure that your method works. If every pair you make contains the same type of person, it's possible that you'll get KK answers everywhere.

]]>mathsyperson wrote:

Given this, what is the

minimumnumber of questions you need to accomplish your task?

I took it to mean the **minimum possible**. In that case, that would be when the island had exactly 49 spies and the first 49 people you asked all said they were spies.

by asking them to be in pair. so we have 50 pairs.

then asking each of them same question about the type of man in front of them.

the worst case is when we had 98 answers of KK (from 49 pairs) and (one group* consists of K and S )1 answer of SS ( already 100 "Questions"), otherwise is easy.

Then ask the other groups about each of the man in the *, again the worst case is if the answer is KK( of course , these answers from the 24 groups of 2 spies), ( already 48 "questions").

Then ask the next group ( must be consists of 2 knights) , then we get the answer : K and S. ( 2 "questions") .

So the total question needed is 150 questions....and that is the maximum questions needed. the minimum is depend on the pair that we could get.

" hope that am right....hehehehe, peace"]]>

If you ask all the residents a single question, then the most common answer you get is definitely the correct one. It's this fact that makes the task possible at all.

And like you said, identifying a knight would also be a very useful thing to do.

Jane is correct on both counts, but her methods only work some of the time.

A spy might identify himself as a knight, in which case you've learnt nothing, and similarly a spy might answer questions in a way that agrees with information you know.

Since we're dealing with the worst case scenario, we can assume that a spy will never reveal himself that easily.

When you have identified a person as a spy, you can also ask an unidentified person the question about the identified spy. If the answer is knight, you have another spy.

]]>And if you find a Knight, they can tell you everyone's status.

Hmmm ... if you chose a random person, say that cute redhead under the palm tree, and asked everyone else (99 people) what the redhead's status was, you would get at least 50 truthful answers. If you were *lucky* the readhead would be a Knight, and the rest would be easy. If not ....

Is this heading in a good direction?

]]>You visit an island inhabited by 100 people. These people come in two types - knights and spies.

Knights always tell the truth, but spies answer questions however they like.

Every resident of the island knows the status of every other resident.

You want to find out the type of every person on the island, but the only thing you can do is ask Person A: "Is Person B a knight or a spy?"

The pamphlet you read on the way over was largely useless, but it did say that there are more knights on the island than spies.

Given this, what is the minimum number of questions you need to accomplish your task?

]]>