@iamatiger : I predicted the 34 in an earlier post for the WCS under a double group method, and I also recommended a deductive method for reducing the question count - did you not see that? I genuinely don't think you need to exhaustively test all combinations.
I also think there may be an issue with Palynka's method - see my post above.
Yep! Tested it out
11T, 9L worst case 18 questions, successfully located a truther with all combos.
13 T, 11L (2,496144 combinations!) worst case 22 questions, and again located a truther each on each pass.
So Questions = N_people - N_Truthers + N_Liars = 2 * N_liars (it works with even only one more truther than liars, and doesn't change if only truthers are added)
Do people want to see my method? Or try to work it out themselves?
Originally posted by iamatigerThis forum is always about posting solutions. It would be hard to post it hidden but I for one want to see it. Anybody who doesn't want to see it can stop as soon as they see it is your method being announced.
Yep! Tested it out
11T, 9L worst case 18 questions, successfully located a truther with all combos.
13 T, 11L (2,496144 combinations!) worst case 22 questions, and again located a truther each on each pass.
So Questions = N_people - N_Truthers + N_Liars (it works with even only one more truther than liars)
Do people want to see my method? Or try to work it out themselves?
Could you exhaustively walk through a very minimal example with N_T-N_L=2? Such as N_P=4, or 6?
With 9 liars, 11 truthers the distibution of Num questions needed is:
N_questions, Occurrences
9 1
10 11
11 66
12 286
13 1001
14 3003
15 8008
16 19448
17 43758
18 92378
With 10 liars, 12 truthers the distribution is:
10 1
11 12
12 78
13 364
14 1365
15 4368
16 12376
17 31824
18 75582
19 167960
20 352716
Now I've managed to reduce it by 1 to 17 for 9L 11T with the following histogram:
9 2036
10 8104
11 17570
12 27170
13 33000
14 32604
15 26026
16 15730
17 5720
Max questions is now Liars*2- 1
The tweak was to the finishing case, exit as soon as the length of the current chain of people asked was greater than the number of liars left, with the answer being the person you would ask a question next.
A worst case for 9L 11T goes like this:
Where the one in brackets is the guy we are just about to query, T is the length of the chain, L is the number of liars left and Q is the number of questions we have asked.
(T)TTTTTTTTLLLLLLLLTTL T 1 L 9 Q 0
T(T)TTTTTTTLLLLLLLLTTL T 2 L 9 Q 1
TT(T)TTTTTTLLLLLLLLTTL T 3 L 9 Q 2
TTT(T)TTTTTLLLLLLLLTTL T 4 L 9 Q 3
TTTT(T)TTTTLLLLLLLLTTL T 5 L 9 Q 4
TTTTT(T)TTTLLLLLLLLTTL T 6 L 9 Q 5
TTTTTT(T)TTLLLLLLLLTTL T 7 L 9 Q 6
TTTTTTT(T)TLLLLLLLLTTL T 8 L 9 Q 7
TTTTTTTT(T)LLLLLLLLTTL T 9 L 9 Q 8
TTTTTTT(T)LLLLLLLTTL T 8 L 8 Q 9
TTTTTT(T)LLLLLLTTL T 7 L 7 Q 10
TTTTT(T)LLLLLTTL T 6 L 6 Q 11
TTTT(T)LLLLTTL T 5 L 5 Q 12
TTT(T)LLLTTL T 4 L 4 Q 13
TT(T)LLTTL T 3 L 3 Q 14
T(T)LTTL T 2 L 2 Q 15
(T)TTL T 1 L 1 Q 16
T(T)TL T 2 L 1 Q 17
Sow now we would get an answer of 49*2 - 1 = 97 for the question as posed
Originally posted by iamatigerThat is a very clear presentation of how the worst case works out. Thanks. What an interesting outcome.
Now I've managed to reduce it by 1 to 17 for 9L 11T with the following histogram:
9 2036
10 8104
11 17570
12 27170
13 33000
14 32604
15 26026
16 15730
17 5720
Max questions is now Liars*2- 1
The tweak was to the finishing case, exit as soon as the length of the current chain of people asked was greater than the number of liars left, with the a ...[text shortened]... (T)TL T 2 L 1 Q 17
Sow now we would get an answer of 49*2 - 1 = 97 for the question as posed
Does a liar always tell the truth if he just told a lie and vice versa? if so you could ask each person about somebody twice and the first person with a consistent answer would be a truther... this would take maximum of 98 questions because after 98 you would eliminate all the liars and the rest would all be truthers.
Here is a nice spin on the problem.
Three gods A, B, and C are called, in no particular order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking two yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which.
-It could be that some god gets asked more than one question (and hence that - the other gods are not asked any question at all).
-What the second question is, and to which god it is put, may depend on the answer to the first question.
-Whether Random say ja or da should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he say ja; if tails, da.
Random will answer da or ja when asked any yes-no question.