After the Math Department’s Magic: the Gathering tournament, the five competitors told
their colleagues how it turned out. But, mathematicians being what they are, each competitor told only a half-truth: that is, one true and one untrue statement. Here’s what they
said:
Allen: Deis came in second. I finished third.
Black: I won the whole thing, and Chang finished second.
Chang: I got third place; poor Black was last.
Deis: I was in second place, and Frayer was fourth.
Frayer: I ended up fourth. Allen was the champion!
What were the true results?
clearvars
orders=perms('abcdf');
for i=1:length(orders)
order=orders(i,:);
if sum([(order(2)=='d'),(order(3)=='a')])==1
if sum([(order(1)=='b'),(order(2)=='c')])==1
if sum([(order(3)=='c'),(order(5)=='b')])==1
if sum([(order(2)=='d'),(order(4)=='f')])==1
if sum([(order(4)=='f'),(order(1)=='a')])==1
disp(order)
disp([(order(2)=='d'),(order(3)=='a')])
disp([(order(1)=='b'),(order(2)=='c')])
disp([(order(3)=='c'),(order(5)=='b')])
disp([(order(2)=='d'),(order(4)=='f')])
disp([(order(4)=='f'),(order(1)=='a')])
end
end
end
end
end
end
finds
dcafb
0 1
0 1
0 1
0 1
1 0
indicating the order was
Deis, Chang, Allen, Frayer, Black
and Frayer's first statement was the true one; everyone else's last statement was their true one.
|
Posted by Charlie
on 2024-03-09 12:29:50 |