In the planet Realmivory, all the inhabitants are either Knights, who always speak truthfully; Liars, who always speak falsely; Knaves, who make statements that are alternately true and false, but in which order is unknown; or those few Revoltosos who do not abide by the planet's traditions.
A Revoltoso is an eccentric person who can choose to speak truthfully like Knights, or speak falsely like Liars or, alternate between true and false statements (not necessarily in that order) like Knaves.
Four inhabitants: Atys, Euryalus, Lausus and Turnus were busy in a conversation. In response to a query posited by an inquisitive visitor from a neighboring planet regarding their identity, they say:
Atys:
1. I am a Knight.
2. Euryalus is not a Knave.
Euryalus:
1. I am a Knave.
2. Lausus is not a Liar.
Lausus:
1. I am a Liar.
2. Turnus is not a Revoltoso.
Turnus:
1. I am a Revoltoso.
2. Atys is not a Knight.
(i) Determine the probability that:
(Atys, Euryalus, Lausus, Turnus) = (Knight, Revoltoso, Knave, Liar) given that the
types of the four inhabitants are distinct.
(ii) What is the answer to (i) if the
types of the four inhabitants may or may not be distinct?
Dustin and I both agree that there's only one way that four distincttyped inhabitants can state the given statements, and that is the (Knight, Revoltoso, Knave, Liar) sequence.
However we disagree on part two.
First the program that finds all sets consistent with the given statements:
DIM used(16)
tp$ = "NNNNllllVVvv1234" ' 1=RevTT; 2=RevFF; 3=RevTF; 4=RevFT
FOR a = 1 TO 16
IF used(a) = 0 THEN
used(a) = 1
FOR e = 1 TO 16
IF used(e) = 0 THEN
used(e) = 1
FOR l = 1 TO 16
IF used(l) = 0 THEN
used(l) = 1
FOR t = 1 TO 16
IF used(t) = 0 THEN
used(t) = 1
consist = 1
distinct = 1
typs$ = MID$(tp$, a, 1) + MID$(tp$, e, 1) + MID$(tp$, l, 1) + MID$(tp$, t, 1)
tru1$ = typs$
tru2$ = typs$
FOR i = 1 TO 4
SELECT CASE MID$(typs$, i, 1)
CASE "n", "l", "v"
MID$(typs$, i, 1) = UCASE$(MID$(typs$, i, 1))
CASE "1", "2", "3", "4"
MID$(typs$, i, 1) = "R"
END SELECT
NEXT
FOR i = 1 TO 3
FOR j = i + 1 TO 4
IF MID$(typs$, i, 1) = MID$(typs$, j, 1) THEN distinct = 0: EXIT FOR
NEXT
IF distinct = 0 THEN EXIT FOR
NEXT
FOR i = 1 TO 4
SELECT CASE MID$(tru1$, i, 1)
CASE "N", "V", "1", "3"
MID$(tru1$, i, 1) = "T"
CASE ELSE
MID$(tru1$, i, 1) = "F"
END SELECT
NEXT
FOR i = 1 TO 4
SELECT CASE MID$(tru2$, i, 1)
CASE "N", "v", "1", "4"
MID$(tru2$, i, 1) = "T"
CASE ELSE
MID$(tru2$, i, 1) = "F"
END SELECT
NEXT
c1=(mid$(typs$,1,1)="N")=mid$(tru1$,1,1)="T")
c2=(mid$(typs$,2,1)<>"V")=mid$(tru2$,1,1)="T")
if c1=0 or c2=0 then consist=0
c1=(mid$(typs$,2,1)="V")=mid$(tru1$,2,1)="T")
c2=(mid$(typs$,3,1)<>"L")=mid$(tru2$,2,1)="T")
if c1=0 or c2=0 then consist=0
c1=(mid$(typs$,3,1)="L")=mid$(tru1$,3,1)="T")
c2=(mid$(typs$,4,1)<>"R")=mid$(tru2$,3,1)="T")
if c1=0 or c2=0 then consist=0
c1=(mid$(typs$,4,1)="R")=mid$(tru1$,4,1)="T")
c2=(mid$(typs$,1,1)<>"N")=mid$(tru2$,4,1)="T")
if c1=0 or c2=0 then consist=0
IF consist then
print MID$(tp$, a, 1) + MID$(tp$, e, 1) + MID$(tp$, l, 1) + MID$(tp$, t, 1);" ";
if distinct then print "*":else print
endif
used(t) = 0
END IF
NEXT
used(l) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(a) = 0
END IF
NEXT
Note that in order to make the probabilities equal that a given person be a Knight (N), Revoltoso (R), Knave (V) or Liar, each must be represented by four occurrences of his/her type. This is a result of the fact that subsets of Revoltosos, in the long run on average, will 1/4 of the time choose to be in such a state as to display TT, FF, TF and FT truth sequences. Knights and Liars are represented by NNNN and LLLL, as they are consistent each time they are up. The upper and lower case V's represent truthfirst and liefirst strategies, equally likely, so VVvv. There are four cases of happenstance states for Revoltosos, and so are represented by numeric digits 1234, with a comment in the program indicating what each represents.
In the results, below, on the left side are the types represented by their states and on the right by showing only the type (i.e., revoltosos by R). An asterisk appears between if all the types are distinct.
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N423 NRRR
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N423 NRRR
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N423 NRRR
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N4vl * NRVL
N423 NRRR
v421 VRRR
v421 VRRR
NRVL appears so many times as there are 4 N's, 4 L's and 2 lowercase v's in the mix, giving 32 occurrences.
As there are only 6 cases other than NRVL, (i.e., other than N4vl), that makes the probability 32/38 that it's NRVL.
As mentioned, this is assuming that each person is equally likely to be (probability 1/4 each) a Knight, Knave, Liar or Revoltoso and that these are independent events. They'd really be independent only in an infinite population, but here we consider the population to be large enough to ignore the dependence.
More troubling is the wording "those few Revoltosos" in the text of the puzzle. It sounds like possibly Revoltosos are less common than any one of the other types, in which case getting three of them together as in VRRR or NRRR would be even more rare, and the Bayesian results would skew even closer to 1 than the 32/38 given here. And of course the Bayesian probability would also depend on the demographics of the other types as well.

Posted by Charlie
on 20120716 13:00:50 