This a short problem related to derangement, pigeonhole principle, modular arithmetic and cyclic permutation.
Problem
Problem
Seats of the round table are all labeled with the names of managers. All managers have chosen the wrong seat. Prove that you can always rotate the table so that at least two managers sit in the positions with the correct names.
n
Proof and simulation
Proof and simulation
Assume we have 16 managers {1,2,3,…,16}. The seats are numbered in the same manner and in CCW direction. That all managers have chosen the wrong seat is exactly a derangement. Because everyone is one of the following distance apart from the seat with same number: {1,2,3,…,15}. Notice 16 seats difference between ID of manager and that of seat means correct seating, which is excluded. Thus we have a situation that 16 elements is put into 15 buckets. By pigeonhole principle, there are at least one bucket has two elements.
In[]:=
Pigeonhole principle
Because we have no issue to replace 16 with any integer and 15 with and the argument above still holds, the statement in the problem holds for all .
n
n-1
n
We can construct one possible configuration for 16 managers and seat:
In[]:=
rdr=BlockRandom[16],RandomSeeding->5454
Out[]=
{13,6,8,3,11,14,5,15,2,7,12,4,16,9,1,10}
The modular difference between the index of the manager and that of the seat:
In[]:=
distances=Mod[rdr-Range[16],16]
Out[]=
{12,4,5,15,6,8,14,7,9,13,1,8,3,11,2,10}
We have two managers are 8 CCW units apart from the correct seat:
In[]:=
If[#[[2]]==2,Highlighted[#],#]&/@Tally[distances]
Out[]=
{12,1},{4,1},{5,1},{15,1},{6,1},,{14,1},{7,1},{9,1},{13,1},{1,1},{3,1},{11,1},{2,1},{10,1}
Thus if we rotate the table 8 units CCW, we have two managers (ID 12 and 7) at the correct seat.
Visualize the seats (s +index) and managers (m + index):
In[]:=
With[{cp=N@CirclePoints[16]},seats=AssociationThread[Range[16]->cp];seats2=AssociationThread[RotateRight[Range[16],8]->cp];manager=AssociationThread[rdr->cp]];
Initial seat arrangement before rotation:
In[]:=
Graphics[{Circle[],{Gray,Table[Disk[seats[i],0.1],{i,16}]},Table[Text["s"<>ToString@i,seats[i]],{i,16}],Table[Text["m "<>ToString@i,1.25*manager[i]],{i,16}]}]
Out[]=
After rotate 8 units CCW, we have two manager seated correctly:
In[]:=
GraphicsCircle[],{Gray,Table[Disk[seats[i],0.1],{i,16}]},Table[Text["s"<>ToString@i,seats[i]*0.7],{i,16}],Table[Text["s"<>ToString@i,seats2[i]],{i,16}],Table[Text[If[i==4||i==14,Highlighted["m"<>ToString@i],"m "<>ToString@i],1.28*manager[i]],{i,16}],Arrow{0,0},{0.85,0.85},{1,0},-,
7π
16
9π
16
Out[]=
Utility function
Utility function
How to find the right seed to create a derangement with exactly two distances duplicated:
In[]:=
Module{n=0,data,rdr},UntilMax[data[[All,2]]]==2&&Count[data[[All,2]],2]==1,rdr=BlockRandom[16],RandomSeeding->n++;distances=Mod[rdr-Range[16],16];data=Tally[distances];n
Out[]=
5455
Then use random seed 5454 to generate the requested derangement.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
The managers of the round table puzzle
by Shenghui Yang
Wolfram Community, STAFF PICKS, May 23 2023
https://community.wolfram.com/groups/-/m/t/2924025
by Shenghui Yang
Wolfram Community, STAFF PICKS, May 23 2023
https://community.wolfram.com/groups/-/m/t/2924025