Five contestants: Aurora Armstrong, Beau Bennett, Cecilia Crawford, Damian Danilov, and Evangeline Ewing were competing on a TV show. In the final round they were shown five "mystery photos" and given 5 names, and had to match the photos with names.
The five contestants wrote down their answers as follows:
- Aurora Armstrong: Andrew Flintoff, Tony Blair, Robbie Williams, Bob Geldof, Richard Branson.
- Beau Bennett: Bob Geldof, Richard Branson, Andrew Flintoff, Robbie Williams, Tony Blair.
- Cecilia Crawford: Tony Blair, Bob Geldof, Robbie Williams, Richard Branson, Andrew Flintoff.
- Damian Danilov: Bob Geldof, Tony Blair, Andrew Flintoff, Robbie Williams, Richard Branson.
- Evangeline Ewing: Bob Geldof, Richard Branson, Robbie Williams, Andrew Flintoff, Tony Blair.
During final evaluation, the judges observed that
no two contestant had the same number of correct answers.
Determine which of the five contestants went home with the
first prize. Provide valid reasoning for your answer.
clearvars, clc
pics=["af" "tb" "rw" "bg" "rb"];
picset=perms(pics);
for i=1:length(picset)
pics=picset(i,:);
a=["af" "tb" "rw" "bg" "rb"];
b=["bg" "rb" "af" "rw" "tb"];
c=["tb" "bg" "rw" "rb" "af"];
d=["bg" "tb" "af" "rw" "rb"];
e=["bg" "rb" "rw" "af" "tb"];
set=[a==pics; b==pics; c==pics; d==pics; e==pics];
good=true;
for j=1:4
for k=j+1:5
if sum(set(j,:)) == sum(set(k,:))
good=false;
break
end
end
if ~good
break
end
end
if good
disp(set)
disp(pics)
disp(' ')
end
end
finds
0 1 0 0 1
1 0 1 1 0
0 0 0 0 0
1 1 1 1 1
1 0 0 0 0
"bg" "tb" "af" "rw" "rb"
The last line above shows the order of the mystery photos, using initials.
The grid, annotated with the contestants' initials,
AA 0 1 0 0 1
BB 1 0 1 1 0
CC 0 0 0 0 0
DD 1 1 1 1 1
EE 1 0 0 0 0
shows each one's sequence of hits (1) and misses (0).
Damian Danilove got first prize, having gotten all the pictures correctly identified.
Obviously the only missing score was 4, as you can't get just one in the wrong place in the sequence.
|
Posted by Charlie
on 2022-07-16 10:28:02 |