A single-meeting round-robin chess tournament commenced with five players Adrian, Beau, Craig, Damian, and Elliott playing against each other exactly once.
At the end of the tournament Adrian came 1st, Beau came 2nd, Craig came 3rd, Damian came 4th, and Elliott came 5th.
Beau and Elliott shared their impressions as follows:
- Beau: "I am the only one who finished without a single loss."
- Elliott: "I am the only one who did not win a single game."
The rules were:
- A winner got a full point.
- For a draw each opponent got half a point, and:
- The ranking is decided only by looking at the points.
Reconstruct the tournament table from the clues mentioned above.
clearvars, clc
global grid score
score=zeros(1,5);
grid=zeros(5);
addon(1,2);
function addon(r,co)
global grid score
for v=0:.5:1
grid(r,co)=v;
score(r)=score(r)+v;
score(co)=score(co)+1-v;
nc=co+1; nr=r;
if nc==6
nr=r+1;
nc=nr+1;
end
if nr<=4
addon(nr,nc);
else
a=grid(1,2:5);
c=[1-grid(1:2,3)' grid(3,4:5)];
d=[1-grid(1:3,4)' grid(4,5)];
b=[1-grid(1,2)' grid(2,3:5)];
good=true;
if length(b)==length(find(b))
e=1-grid(1:4,5)';
if length(a)~=length(find(a)) && length(d)~=length(find(d)) ...
&& length(e)~=length(find(e)) && length(c)~=length(find(c))
if length(find(e==1))==0 ...
&& length(find(a==1))~=0 && length(find(b==1))~=0 ...
&& length(find(c==1))~=0 && length(find(d==1))~=0
for j=2:5
if score(j)>=score(j-1)
good=false;
end
end
if good
fprintf('%3.1f %3.1f %3.1f %3.1f %3.1f \n',grid')
fprintf('\n')
fprintf('%3.1f %3.1f %3.1f %3.1f %3.1f \n\n',score)
end
end
end
end
end
score(co)=score(co)-1+v;
score(r)=score(r)-v;
end
end
finds
(titles added manually
and lower left triangle
erased manually.)
A B C D E
1.0 = player at left won
A --- 0.0 1.0 1.0 1.0 0.5 = tie
B --- 0.5 0.5 0.5 0.0 = player at top won
C --- 1.0 0.5
D --- 1.0
E ---
A B C D E
3.0 2.5 2.0 1.5 1.0
A lost to B, but defeated C, D and E.
B defeated A, but tied C, D and E.
C lost to A, tied B and E, and defeated D.
D lost to A and C, tied B and defeated E.
E lost to A and D, and tied B and C.
The point scores for all five are shown below the grid.
This is an exhaustive search--only one solution.
|
Posted by Charlie
on 2022-07-14 09:28:00 |