Each of Abner, Berenice, Calvin and Dolores is either a knight who always tells the truth, or a liar who always speaks falsely, or a knave who alternates between lying and telling the truth in any order.
They say:
- Abner: Berenice is a liar.
- Berenice: I am a knight.
- Calvin: If asked, Berenice would say that she is a knight.
- Dolores: I am a knight.
Given that each of the four individuals being any of the 3 types is equally likely, and all the four statements are simultaneous and independent, determine the probability that:
- Abner is a knight, Berenice is a liar and each of Calvin and Dolores is a knight.
*** For an extra challenge, solve this puzzle without taking resort to a computer program/excel solver aided methodology.
In the list of types t and f (knight and liar) appear twice in the calculation of cases so as to give each of them the same a priori probability of showing up as a knave. Each has a probability of showing up in a given slot as each other: 1/3. This is necessary as knave necessarily has two slots, one for lying phase and one for truth phase. Imagine the population as having 6 of each name: 2 knights, 2 liars, and two knaves (one in each knave phase).
Since the statements are independent and simultaneous, it's assumed that Calvin's statement is his prediction about Berenice's statement that's quoted, rather than her next statement, when considering the possibility of her being a knave.
The code for their types is based on true, false, alternate.
clearvars,clc
types='ttffaA';
% t is knight
% f is liar
% a is knave lying
% A is knave telling the truth
ct=0; hit=0; rList=string.empty;
for a=types
for b=types
for c=types
for d=types
if b=='f'
if a=='f' || a=='a'
continue
end
else
if a=='t' || a=='A'
continue
end
end
if b=='A' || d=='A'
continue
end
if c=='f' || c=='a'
continue
end
abcd=string([a b c d]);
ct=ct+1;
if isequal([a b c d],'tftt')
hit=hit+1;
end
if ~ismember(abcd,rList)
rList(end+1)=abcd;
disp([a b c d])
if isequal([a b c d],'tftt')
disp('----')
end
end
end
end
end
end
disp([hit ct hit/ct])
List of possible combinations (not equally probable):
(target combination underscored, at top)
tftt
----
tftf
tfta
tfAt
tfAf
tfAa
fttt
fttf
ftta
ftAt
ftAf
ftAa
fatt
fatf
fata
faAt
faAf
faAa
attt
attf
atta
atAt
atAf
atAa
aatt
aatf
aata
aaAt
aaAf
aaAa
Aftt
Aftf
Afta
AfAt
AfAf
AfAa
The given scenario has probability 16 out of 225 valid "possibilities", weighted by their probability, for a probability of 0.0711111111111111.
There are not 225 listed as the 225 number results from the weighting necessary for the knave bifurcation. Only the 36 listed possibilities exist.
|
Posted by Charlie
on 2023-09-11 09:13:13 |