File size: 201,580 Bytes
eebb93b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
61st International Mathematical Olympiad Saint Petersburg Russia

# SHORTLISTED PROBLEMS <br> (with solutions) 

## Shortlisted Problems <br> (with solutions)

$61^{\text {st }}$ International Mathematical Olympiad Saint-Petersburg — Russia, 18th-28th September 2020

## The Shortlist has to be kept strictly confidential until the conclusion of the following International Mathematical Olympiad. <br> IMO General Regulations §6.6

## Contributing Countries

The Organising Committee and the Problem Selection Committee of IMO 2020 thank the following 39 countries for contributing 149 problem proposals:

Armenia, Australia, Austria, Belgium, Brazil, Canada, Croatia, Cuba, Cyprus, Czech Republic, Denmark, Estonia, France, Georgia, Germany, Hong Kong, Hungary, India, Iran, Ireland, Israel, Kosovo, Latvia, Luxembourg, Mongolia, Netherlands, North Macedonia, Philippines, Poland, Slovakia, Slovenia, South Africa, Taiwan, Thailand, Trinidad and Tobago, Ukraine, United Kingdom, USA, Venezuela

## Problem Selection Committee

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-05.jpg?height=610&width=1006&top_left_y=1822&top_left_x=525)

Ilya I. Bogdanov, Sergey Berlov, Alexander Gaifullin, Alexander S. Golovanov, Géza Kós, Pavel Kozhevnikov, Dmitry Krachun, Ivan Mitrofanov, Fedor Petrov, Paul Vaderlind

## Problems

## Algebra

A1. Version 1. Let $n$ be a positive integer, and set $N=2^{n}$. Determine the smallest real number $a_{n}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant a_{n}(x-1)^{2}+x
$$

Version 2. For every positive integer $N$, determine the smallest real number $b_{N}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant b_{N}(x-1)^{2}+x
$$

(Ireland)
A2. Let $\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\mathcal{B}$ denote the subset of $\mathcal{A}$ formed by all polynomials which can be expressed as

$$
(x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z)
$$

with $P, Q, R \in \mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \in \mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \geqslant n$.
(Venezuela)
A3. Suppose that $a, b, c, d$ are positive real numbers satisfying $(a+c)(b+d)=a c+b d$. Find the smallest possible value of

$$
\frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a}
$$

A4. Let $a, b, c, d$ be four real numbers such that $a \geqslant b \geqslant c \geqslant d>0$ and $a+b+c+d=1$. Prove that

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<1
$$

(Belgium)
A5. A magician intends to perform the following trick. She announces a positive integer $n$, along with $2 n$ real numbers $x_{1}<\ldots<x_{2 n}$, to the audience. A member of the audience then secretly chooses a polynomial $P(x)$ of degree $n$ with real coefficients, computes the $2 n$ values $P\left(x_{1}\right), \ldots, P\left(x_{2 n}\right)$, and writes down these $2 n$ values on the blackboard in non-decreasing order. After that the magician announces the secret polynomial to the audience.

Can the magician find a strategy to perform such a trick?
(Luxembourg)
A6. Determine all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that

$$
f^{a^{2}+b^{2}}(a+b)=a f(a)+b f(b) \quad \text { for every } a, b \in \mathbb{Z}
$$

Here, $f^{n}$ denotes the $n^{\text {th }}$ iteration of $f$, i.e., $f^{0}(x)=x$ and $f^{n+1}(x)=f\left(f^{n}(x)\right)$ for all $n \geqslant 0$.

A7. Let $n$ and $k$ be positive integers. Prove that for $a_{1}, \ldots, a_{n} \in\left[1,2^{k}\right]$ one has

$$
\sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}} \leqslant 4 \sqrt{k n}
$$

A8. Let $\mathbb{R}^{+}$be the set of positive real numbers. Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ such that, for all positive real numbers $x$ and $y$,

$$
f(x+f(x y))+y=f(x) f(y)+1
$$

## Combinatorics

C1. Let $n$ be a positive integer. Find the number of permutations $a_{1}, a_{2}, \ldots, a_{n}$ of the sequence $1,2, \ldots, n$ satisfying

$$
a_{1} \leqslant 2 a_{2} \leqslant 3 a_{3} \leqslant \ldots \leqslant n a_{n}
$$

(United Kingdom)
C2. In a regular 100-gon, 41 vertices are colored black and the remaining 59 vertices are colored white. Prove that there exist 24 convex quadrilaterals $Q_{1}, \ldots, Q_{24}$ whose corners are vertices of the 100 -gon, so that

- the quadrilaterals $Q_{1}, \ldots, Q_{24}$ are pairwise disjoint, and
- every quadrilateral $Q_{i}$ has three corners of one color and one corner of the other color.
(Austria)
C3. Let $n$ be an integer with $n \geqslant 2$. On a slope of a mountain, $n^{2}$ checkpoints are marked, numbered from 1 to $n^{2}$ from the bottom to the top. Each of two cable car companies, $A$ and $B$, operates $k$ cable cars numbered from 1 to $k$; each cable car provides a transfer from some checkpoint to a higher one. For each company, and for any $i$ and $j$ with $1 \leqslant i<j \leqslant k$, the starting point of car $j$ is higher than the starting point of car $i$; similarly, the finishing point of car $j$ is higher than the finishing point of car $i$. Say that two checkpoints are linked by some company if one can start from the lower checkpoint and reach the higher one by using one or more cars of that company (no movement on foot is allowed).

Determine the smallest $k$ for which one can guarantee that there are two checkpoints that are linked by each of the two companies.
(India)
C4. The Fibonacci numbers $F_{0}, F_{1}, F_{2}, \ldots$ are defined inductively by $F_{0}=0, F_{1}=1$, and $F_{n+1}=F_{n}+F_{n-1}$ for $n \geqslant 1$. Given an integer $n \geqslant 2$, determine the smallest size of a set $S$ of integers such that for every $k=2,3, \ldots, n$ there exist some $x, y \in S$ such that $x-y=F_{k}$.
(Croatia)
C5. Let $p$ be an odd prime, and put $N=\frac{1}{4}\left(p^{3}-p\right)-1$. The numbers $1,2, \ldots, N$ are painted arbitrarily in two colors, red and blue. For any positive integer $n \leqslant N$, denote by $r(n)$ the fraction of integers in $\{1,2, \ldots, n\}$ that are red.

Prove that there exists a positive integer $a \in\{1,2, \ldots, p-1\}$ such that $r(n) \neq a / p$ for all $n=1,2, \ldots, N$.
(Netherlands)
C6.
$4 n$ coins of weights $1,2,3, \ldots, 4 n$ are given. Each coin is colored in one of $n$ colors and there are four coins of each color. Show that all these coins can be partitioned into two sets with the same total weight, such that each set contains two coins of each color.
(Hungary)

C7. Consider any rectangular table having finitely many rows and columns, with a real number $a(r, c)$ in the cell in row $r$ and column $c$. A pair $(R, C)$, where $R$ is a set of rows and $C$ a set of columns, is called a saddle pair if the following two conditions are satisfied:
(i) For each row $r^{\prime}$, there is $r \in R$ such that $a(r, c) \geqslant a\left(r^{\prime}, c\right)$ for all $c \in C$;
(ii) For each column $c^{\prime}$, there is $c \in C$ such that $a(r, c) \leqslant a\left(r, c^{\prime}\right)$ for all $r \in R$.

A saddle pair $(R, C)$ is called a minimal pair if for each saddle pair ( $R^{\prime}, C^{\prime}$ ) with $R^{\prime} \subseteq R$ and $C^{\prime} \subseteq C$, we have $R^{\prime}=R$ and $C^{\prime}=C$.

Prove that any two minimal pairs contain the same number of rows.
(Thailand)

## C8.

Players $A$ and $B$ play a game on a blackboard that initially contains 2020 copies of the number 1. In every round, player $A$ erases two numbers $x$ and $y$ from the blackboard, and then player $B$ writes one of the numbers $x+y$ and $|x-y|$ on the blackboard. The game terminates as soon as, at the end of some round, one of the following holds:
(1) one of the numbers on the blackboard is larger than the sum of all other numbers;
(2) there are only zeros on the blackboard.

Player $B$ must then give as many cookies to player $A$ as there are numbers on the blackboard. Player $A$ wants to get as many cookies as possible, whereas player $B$ wants to give as few as possible. Determine the number of cookies that $A$ receives if both players play optimally.

## Geometry

G1. Let $A B C$ be an isosceles triangle with $B C=C A$, and let $D$ be a point inside side $A B$ such that $A D<D B$. Let $P$ and $Q$ be two points inside sides $B C$ and $C A$, respectively, such that $\angle D P B=\angle D Q A=90^{\circ}$. Let the perpendicular bisector of $P Q$ meet line segment $C Q$ at $E$, and let the circumcircles of triangles $A B C$ and $C P Q$ meet again at point $F$, different from $C$.

Suppose that $P, E, F$ are collinear. Prove that $\angle A C B=90^{\circ}$.
(Luxembourg)
G2. Let $A B C D$ be a convex quadrilateral. Suppose that $P$ is a point in the interior of $A B C D$ such that

$$
\angle P A D: \angle P B A: \angle D P A=1: 2: 3=\angle C B P: \angle B A P: \angle B P C .
$$

The internal bisectors of angles $A D P$ and $P C B$ meet at a point $Q$ inside the triangle $A B P$. Prove that $A Q=B Q$.
(Poland)
G3. Let $A B C D$ be a convex quadrilateral with $\angle A B C>90^{\circ}, \angle C D A>90^{\circ}$, and $\angle D A B=\angle B C D$. Denote by $E$ and $F$ the reflections of $A$ in lines $B C$ and $C D$, respectively. Suppose that the segments $A E$ and $A F$ meet the line $B D$ at $K$ and $L$, respectively. Prove that the circumcircles of triangles $B E K$ and $D F L$ are tangent to each other.
(Slovakia)
G4. In the plane, there are $n \geqslant 6$ pairwise disjoint disks $D_{1}, D_{2}, \ldots, D_{n}$ with radii $R_{1} \geqslant R_{2} \geqslant \ldots \geqslant R_{n}$. For every $i=1,2, \ldots, n$, a point $P_{i}$ is chosen in disk $D_{i}$. Let $O$ be an arbitrary point in the plane. Prove that

$$
O P_{1}+O P_{2}+\ldots+O P_{n} \geqslant R_{6}+R_{7}+\ldots+R_{n}
$$

(A disk is assumed to contain its boundary.)
(Iran)
G5. Let $A B C D$ be a cyclic quadrilateral with no two sides parallel. Let $K, L, M$, and $N$ be points lying on sides $A B, B C, C D$, and $D A$, respectively, such that $K L M N$ is a rhombus with $K L \| A C$ and $L M \| B D$. Let $\omega_{1}, \omega_{2}, \omega_{3}$, and $\omega_{4}$ be the incircles of triangles $A N K$, $B K L, C L M$, and $D M N$, respectively. Prove that the internal common tangents to $\omega_{1}$ and $\omega_{3}$ and the internal common tangents to $\omega_{2}$ and $\omega_{4}$ are concurrent.
(Poland)
G6. Let $I$ and $I_{A}$ be the incenter and the $A$-excenter of an acute-angled triangle $A B C$ with $A B<A C$. Let the incircle meet $B C$ at $D$. The line $A D$ meets $B I_{A}$ and $C I_{A}$ at $E$ and $F$, respectively. Prove that the circumcircles of triangles $A I D$ and $I_{A} E F$ are tangent to each other.

G7. Let $P$ be a point on the circumcircle of an acute-angled triangle $A B C$. Let $D$, $E$, and $F$ be the reflections of $P$ in the midlines of triangle $A B C$ parallel to $B C, C A$, and $A B$, respectively. Denote by $\omega_{A}, \omega_{B}$, and $\omega_{C}$ the circumcircles of triangles $A D P, B E P$, and $C F P$, respectively. Denote by $\omega$ the circumcircle of the triangle formed by the perpendicular bisectors of segments $A D, B E$ and $C F$.

Show that $\omega_{A}, \omega_{B}, \omega_{C}$, and $\omega$ have a common point.
(Denmark)

## G8.

Let $\Gamma$ and $I$ be the circumcircle and the incenter of an acute-angled triangle $A B C$. Two circles $\omega_{B}$ and $\omega_{C}$ passing through $B$ and $C$, respectively, are tangent at $I$. Let $\omega_{B}$ meet the shorter arc $A B$ of $\Gamma$ and segment $A B$ again at $P$ and $M$, respectively. Similarly, let $\omega_{C}$ meet the shorter arc $A C$ of $\Gamma$ and segment $A C$ again at $Q$ and $N$, respectively. The rays $P M$ and $Q N$ meet at $X$, and the tangents to $\omega_{B}$ and $\omega_{C}$ at $B$ and $C$, respectively, meet at $Y$.

Prove that the points $A, X$, and $Y$ are collinear.
(Netherlands)

## G9.

Prove that there exists a positive constant $c$ such that the following statement is true:

Assume that $n$ is an integer with $n \geqslant 2$, and let $\mathcal{S}$ be a set of $n$ points in the plane such that the distance between any two distinct points in $\mathcal{S}$ is at least 1 . Then there is a line $\ell$ separating $\mathcal{S}$ such that the distance from any point of $\mathcal{S}$ to $\ell$ is at least $c n^{-1 / 3}$.
(A line $\ell$ separates a point set $\mathcal{S}$ if some segment joining two points in $\mathcal{S}$ crosses $\ell$.)

## Number Theory

N1. Given a positive integer $k$, show that there exists a prime $p$ such that one can choose distinct integers $a_{1}, a_{2}, \ldots, a_{k+3} \in\{1,2, \ldots, p-1\}$ such that $p$ divides $a_{i} a_{i+1} a_{i+2} a_{i+3}-i$ for all $i=1,2, \ldots, k$.
(South Africa)
N2. For each prime $p$, there is a kingdom of $p$-Landia consisting of $p$ islands numbered $1,2, \ldots, p$. Two distinct islands numbered $n$ and $m$ are connected by a bridge if and only if $p$ divides $\left(n^{2}-m+1\right)\left(m^{2}-n+1\right)$. The bridges may pass over each other, but cannot cross. Prove that for infinitely many $p$ there are two islands in $p$-Landia not connected by a chain of bridges.
(Denmark)
N3. Let $n$ be an integer with $n \geqslant 2$. Does there exist a sequence $\left(a_{1}, \ldots, a_{n}\right)$ of positive integers with not all terms being equal such that the arithmetic mean of every two terms is equal to the geometric mean of some (one or more) terms in this sequence?
(Estonia)
N4. For any odd prime $p$ and any integer $n$, let $d_{p}(n) \in\{0,1, \ldots, p-1\}$ denote the remainder when $n$ is divided by $p$. We say that $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ is a $p$-sequence, if $a_{0}$ is a positive integer coprime to $p$, and $a_{n+1}=a_{n}+d_{p}\left(a_{n}\right)$ for $n \geqslant 0$.
(a) Do there exist infinitely many primes $p$ for which there exist $p$-sequences $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ and $\left(b_{0}, b_{1}, b_{2}, \ldots\right)$ such that $a_{n}>b_{n}$ for infinitely many $n$, and $b_{n}>a_{n}$ for infinitely many $n$ ?
(b) Do there exist infinitely many primes $p$ for which there exist $p$-sequences $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ and $\left(b_{0}, b_{1}, b_{2}, \ldots\right)$ such that $a_{0}<b_{0}$, but $a_{n}>b_{n}$ for all $n \geqslant 1$ ?
(United Kingdom)
N5. Determine all functions $f$ defined on the set of all positive integers and taking non-negative integer values, satisfying the three conditions:
(i) $f(n) \neq 0$ for at least one $n$;
(ii) $f(x y)=f(x)+f(y)$ for every positive integers $x$ and $y$;
(iii) there are infinitely many positive integers $n$ such that $f(k)=f(n-k)$ for all $k<n$.
(Croatia)
N6. For a positive integer $n$, let $d(n)$ be the number of positive divisors of $n$, and let $\varphi(n)$ be the number of positive integers not exceeding $n$ which are coprime to $n$. Does there exist a constant $C$ such that

$$
\frac{\varphi(d(n))}{d(\varphi(n))} \leqslant C
$$

for all $n \geqslant 1$ ?
(Cyprus)
N7. Let $\mathcal{S}$ be a set consisting of $n \geqslant 3$ positive integers, none of which is a sum of two other distinct members of $\mathcal{S}$. Prove that the elements of $\mathcal{S}$ may be ordered as $a_{1}, a_{2}, \ldots, a_{n}$ so that $a_{i}$ does not divide $a_{i-1}+a_{i+1}$ for all $i=2,3, \ldots, n-1$.
(Ukraine)

## Solutions

## Algebra

A1. Version 1. Let $n$ be a positive integer, and set $N=2^{n}$. Determine the smallest real number $a_{n}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant a_{n}(x-1)^{2}+x
$$

Version 2. For every positive integer $N$, determine the smallest real number $b_{N}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant b_{N}(x-1)^{2}+x
$$

(Ireland)
Answer for both versions : $a_{n}=b_{N}=N / 2$.
Solution 1 (for Version 1). First of all, assume that $a_{n}<N / 2$ satisfies the condition. Take $x=1+t$ for $t>0$, we should have

$$
\frac{(1+t)^{2 N}+1}{2} \leqslant\left(1+t+a_{n} t^{2}\right)^{N} .
$$

Expanding the brackets we get

$$
\left(1+t+a_{n} t^{2}\right)^{N}-\frac{(1+t)^{2 N}+1}{2}=\left(N a_{n}-\frac{N^{2}}{2}\right) t^{2}+c_{3} t^{3}+\ldots+c_{2 N} t^{2 N}
$$

with some coefficients $c_{3}, \ldots, c_{2 N}$. Since $a_{n}<N / 2$, the right hand side of (1) is negative for sufficiently small $t$. A contradiction.

It remains to prove the following inequality

$$
\sqrt[N]{\frac{1+x^{2 N}}{2}} \leqslant x+\frac{N}{2}(x-1)^{2}
$$

where $N=2^{n}$.
Use induction in $n$. The base case $n=0$ is trivial: $N=1$ and both sides of $\mathcal{I}(N, x)$ are equal to $\left(1+x^{2}\right) / 2$. For completing the induction we prove $\mathcal{I}(2 N, x)$ assuming that $\mathcal{I}(N, y)$ is established for all real $y$. We have

$$
\begin{aligned}
\left(x+N(x-1)^{2}\right)^{2} & =x^{2}+N^{2}(x-1)^{4}+N(x-1)^{2} \frac{(x+1)^{2}-(x-1)^{2}}{2} \\
& =x^{2}+\frac{N}{2}\left(x^{2}-1\right)^{2}+\left(N^{2}-\frac{N}{2}\right)(x-1)^{4} \geqslant x^{2}+\frac{N}{2}\left(x^{2}-1\right)^{2} \geqslant \sqrt[N]{\frac{1+x^{4 N}}{2}}
\end{aligned}
$$

where the last inequality is $\mathcal{I}\left(N, x^{2}\right)$. Since

$$
x+N(x-1)^{2} \geqslant x+\frac{(x-1)^{2}}{2}=\frac{x^{2}+1}{2} \geqslant 0
$$

taking square root we get $\mathcal{I}(2 N, x)$. The inductive step is complete.

Solution 2.1 (for Version 2). Like in Solution 1 of Version 1, we conclude that $b_{N} \geqslant N / 2$. It remains to prove the inequality $\mathcal{I}(N, x)$ for an arbitrary positive integer $N$.

First of all, $\mathcal{I}(N, 0)$ is obvious. Further, if $x>0$, then the left hand sides of $\mathcal{I}(N,-x)$ and $\mathcal{I}(N, x)$ coincide, while the right hand side of $\mathcal{I}(N,-x)$ is larger than that of $\mathcal{I}(N,-x)$ (their difference equals $2(N-1) x \geqslant 0)$. Therefore, $\mathcal{I}(N,-x)$ follows from $\mathcal{I}(N, x)$. So, hereafter we suppose that $x>0$.

Divide $\mathcal{I}(N, x)$ by $x$ and let $t=(x-1)^{2} / x=x-2+1 / x$; then $\mathcal{I}(n, x)$ reads as

$$
f_{N}:=\frac{x^{N}+x^{-N}}{2} \leqslant\left(1+\frac{N}{2} t\right)^{N}
$$

The key identity is the expansion of $f_{N}$ as a polynomial in $t$ :

## Lemma.

$$
f_{N}=N \sum_{k=0}^{N} \frac{1}{N+k}\binom{N+k}{2 k} t^{k}
$$

Proof. Apply induction on $N$. We will make use of the straightforward recurrence relation

$$
f_{N+1}+f_{N-1}=(x+1 / x) f_{N}=(2+t) f_{N}
$$

The base cases $N=1,2$ are straightforward:

$$
f_{1}=1+\frac{t}{2}, \quad f_{2}=\frac{1}{2} t^{2}+2 t+1
$$

For the induction step from $N-1$ and $N$ to $N+1$, we compute the coefficient of $t^{k}$ in $f_{N+1}$ using the formula $f_{N+1}=(2+t) f_{N}-f_{N-1}$. For $k=0$ that coefficient equals 1 , for $k>0$ it equals

$$
\begin{aligned}
& 2 \frac{N}{N+k}\binom{N+k}{2 k}+\frac{N}{N+k-1}\binom{N+k-1}{2 k-2}-\frac{N-1}{N+k-1}\binom{N+k-1}{2 k} \\
& =\frac{(N+k-1)!}{(2 k)!(N-k)!}\left(2 N+\frac{2 k(2 k-1) N}{(N+k-1)(N-k+1)}-\frac{(N-1)(N-k)}{N+k-1}\right) \\
& =\frac{(N+k-1)!}{(2 k)!(N-k+1)!}\left(2 N(N-k+1)+3 k N+k-N^{2}-N\right)=\frac{\binom{N+k+1}{2 k}}{(N+k+1)}(N+1)
\end{aligned}
$$

that completes the induction.
Turning back to the problem, in order to prove (2) we write

$$
\left(1+\frac{N}{2} t\right)^{N}-f_{N}=\left(1+\frac{N}{2} t\right)^{N}-N \sum_{k=0}^{N} \frac{1}{N+k}\binom{N+k}{2 k} t^{k}=\sum_{k=0}^{N} \alpha_{k} t^{k}
$$

where

$$
\begin{aligned}
\alpha_{k} & =\left(\frac{N}{2}\right)^{k}\binom{N}{k}-\frac{N}{N+k}\binom{N+k}{2 k} \\
& =\left(\frac{N}{2}\right)^{k}\binom{N}{k}\left(1-2^{k} \frac{(1+1 / N)(1+2 / N) \cdot \ldots \cdot(1+(k-1) / N)}{(k+1) \cdot \ldots \cdot(2 k)}\right) \\
& \geqslant\left(\frac{N}{2}\right)^{k}\binom{N}{k}\left(1-2^{k} \frac{2 \cdot 3 \cdot \ldots \cdot k}{(k+1) \cdot \ldots \cdot(2 k)}\right)=\left(\frac{N}{2}\right)^{k}\binom{N}{k}\left(1-\prod_{j=1}^{k} \frac{2 j}{k+j}\right) \geqslant 0
\end{aligned}
$$

and (2) follows.

Solution 2.2 (for Version 2). Here we present another proof of the inequality (2) for $x>0$, or, equivalently, for $t=(x-1)^{2} / x \geqslant 0$. Instead of finding the coefficients of the polynomial $f_{N}=f_{N}(t)$ we may find its roots, which is in a sense more straightforward. Note that the recurrence (4) and the initial conditions $f_{0}=1, f_{1}=1+t / 2$ imply that $f_{N}$ is a polynomial in $t$ of degree $N$. It also follows by induction that $f_{N}(0)=1, f_{N}^{\prime}(0)=N^{2} / 2$ : the recurrence relations read as $f_{N+1}(0)+f_{N-1}(0)=2 f_{N}(0)$ and $f_{N+1}^{\prime}(0)+f_{N-1}^{\prime}(0)=2 f_{N}^{\prime}(0)+f_{N}(0)$, respectively.

Next, if $x_{k}=\exp \left(\frac{i \pi(2 k-1)}{2 N}\right)$ for $k \in\{1,2, \ldots, N\}$, then

$$
-t_{k}:=2-x_{k}-\frac{1}{x_{k}}=2-2 \cos \frac{\pi(2 k-1)}{2 N}=4 \sin ^{2} \frac{\pi(2 k-1)}{4 N}>0
$$

and

$$
f_{N}\left(t_{k}\right)=\frac{x_{k}^{N}+x_{k}^{-N}}{2}=\frac{\exp \left(\frac{i \pi(2 k-1)}{2}\right)+\exp \left(-\frac{i \pi(2 k-1)}{2}\right)}{2}=0 .
$$

So the roots of $f_{N}$ are $t_{1}, \ldots, t_{N}$ and by the AM-GM inequality we have

$$
\begin{aligned}
f_{N}(t)=\left(1-\frac{t}{t_{1}}\right)\left(1-\frac{t}{t_{2}}\right) \ldots\left(1-\frac{t}{t_{N}}\right) & \leqslant\left(1-\frac{t}{N}\left(\frac{1}{t_{1}}+\ldots+\frac{1}{t_{n}}\right)\right)^{N}= \\
\left(1+\frac{t f_{N}^{\prime}(0)}{N}\right)^{N} & =\left(1+\frac{N}{2} t\right)^{N}
\end{aligned}
$$

Comment. The polynomial $f_{N}(t)$ equals to $\frac{1}{2} T_{N}(t+2)$, where $T_{n}$ is the $n^{\text {th }}$ Chebyshev polynomial of the first kind: $T_{n}(2 \cos s)=2 \cos n s, T_{n}(x+1 / x)=x^{n}+1 / x^{n}$.

Solution 2.3 (for Version 2). Here we solve the problem when $N \geqslant 1$ is an arbitrary real number. For a real number $a$ let

$$
f(x)=\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}}-a(x-1)^{2}-x
$$

Then $f(1)=0$,

$$
f^{\prime}(x)=\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-1} x^{2 N-1}-2 a(x-1)-1 \quad \text { and } \quad f^{\prime}(1)=0
$$

$f^{\prime \prime}(x)=(1-N)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-2} x^{4 N-2}+(2 N-1)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-1} x^{2 N-2}-2 a \quad$ and $\quad f^{\prime \prime}(1)=N-2 a$.
So if $a<\frac{N}{2}$, the function $f$ has a strict local minimum at point 1 , and the inequality $f(x) \leqslant$ $0=f(1)$ does not hold. This proves $b_{N} \geqslant N / 2$.

For $a=\frac{N}{2}$ we have $f^{\prime \prime}(1)=0$ and

$$
f^{\prime \prime \prime}(x)=\frac{1}{2}(1-N)(1-2 N)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-3} x^{2 N-3}\left(1-x^{2 N}\right) \quad \begin{cases}>0 & \text { if } 0<x<1 \text { and } \\ <0 & \text { if } x>1\end{cases}
$$

Hence, $f^{\prime \prime}(x)<0$ for $x \neq 1 ; f^{\prime}(x)>0$ for $x<1$ and $f^{\prime}(x)<0$ for $x>1$, finally $f(x)<0$ for $x \neq 1$.

Comment. Version 2 is much more difficult, of rather A5 or A6 difficulty. The induction in Version 1 is rather straightforward, while all three above solutions of Version 2 require some creativity.

This page is intentionally left blank

A2. Let $\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\mathcal{B}$ denote the subset of $\mathcal{A}$ formed by all polynomials which can be expressed as

$$
(x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z)
$$

with $P, Q, R \in \mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \in \mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \geqslant n$.
(Venezuela)
Answer: $n=4$.
Solution. We start by showing that $n \leqslant 4$, i.e., any monomial $f=x^{i} y^{j} z^{k}$ with $i+j+k \geqslant 4$ belongs to $\mathcal{B}$. Assume that $i \geqslant j \geqslant k$, the other cases are analogous.

Let $x+y+z=p, x y+y z+z x=q$ and $x y z=r$. Then

$$
0=(x-x)(x-y)(x-z)=x^{3}-p x^{2}+q x-r
$$

therefore $x^{3} \in \mathcal{B}$. Next, $x^{2} y^{2}=x y q-(x+y) r \in \mathcal{B}$.
If $k \geqslant 1$, then $r$ divides $f$, thus $f \in \mathcal{B}$. If $k=0$ and $j \geqslant 2$, then $x^{2} y^{2}$ divides $f$, thus we have $f \in \mathcal{B}$ again. Finally, if $k=0, j \leqslant 1$, then $x^{3}$ divides $f$ and $f \in \mathcal{B}$ in this case also.

In order to prove that $n \geqslant 4$, we show that the monomial $x^{2} y$ does not belong to $\mathcal{B}$. Assume the contrary:

$$
x^{2} y=p P+q Q+r R
$$

for some polynomials $P, Q, R$. If polynomial $P$ contains the monomial $x^{2}$ (with nonzero coefficient), then $p P+q Q+r R$ contains the monomial $x^{3}$ with the same nonzero coefficient. So $P$ does not contain $x^{2}, y^{2}, z^{2}$ and we may write

$$
x^{2} y=(x+y+z)(a x y+b y z+c z x)+(x y+y z+z x)(d x+e y+f z)+g x y z
$$

where $a, b, c ; d, e, f ; g$ are the coefficients of $x y, y z, z x ; x, y, z ; x y z$ in the polynomials $P$; $Q ; R$, respectively (the remaining coefficients do not affect the monomials of degree 3 in $p P+q Q+r R)$. By considering the coefficients of $x y^{2}$ we get $e=-a$, analogously $e=-b$, $f=-b, f=-c, d=-c$, thus $a=b=c$ and $f=e=d=-a$, but then the coefficient of $x^{2} y$ in the right hand side equals $a+d=0 \neq 1$.

Comment 1. The general question is the following. Call a polynomial $f\left(x_{1}, \ldots, x_{n}\right)$ with integer coefficients nice, if $f(0,0, \ldots, 0)=0$ and $f\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=f\left(x_{1}, \ldots, x_{n}\right)$ for any permutation $\pi$ of $1, \ldots, n$ (in other words, $f$ is symmetric and its constant term is zero.) Denote by $\mathcal{I}$ the set of polynomials of the form

$$
p_{1} q_{1}+p_{2} q_{2}+\ldots+p_{m} q_{m}
$$

where $m$ is an integer, $q_{1}, \ldots, q_{m}$ are polynomials with integer coefficients, and $p_{1}, \ldots, p_{m}$ are nice polynomials. Find the least $N$ for which any monomial of degree at least $N$ belongs to $\mathcal{I}$.

The answer is $n(n-1) / 2+1$. The lower bound follows from the following claim: the polynomial

$$
F\left(x_{1}, \ldots, x_{n}\right)=x_{2} x_{3}^{2} x_{4}^{3} \cdot \ldots \cdot x_{n}^{n-1}
$$

does not belong to $\mathcal{I}$.
Assume that $F=\sum p_{i} q_{i}$, according to (2). By taking only the monomials of degree $n(n-1) / 2$, we can additionally assume that every $p_{i}$ and every $q_{i}$ is homogeneous, $\operatorname{deg} p_{i}>0$, and $\operatorname{deg} p_{i}+\operatorname{deg} q_{i}=$ $\operatorname{deg} F=n(n-1) / 2$ for all $i$.

Consider the alternating sum

$$
\sum_{\pi} \operatorname{sign}(\pi) F\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=\sum_{i=1}^{m} p_{i} \sum_{\pi} \operatorname{sign}(\pi) q_{i}\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right):=S
$$

where the summation is done over all permutations $\pi$ of $1, \ldots n$, and $\operatorname{sign}(\pi)$ denotes the sign of the permutation $\pi$. Since $\operatorname{deg} q_{i}=n(n-1) / 2-\operatorname{deg} p_{i}<n(n-1) / 2$, in any monomial $Q$ of $q_{i}$, there are at least two variables, say $x_{\alpha}$ and $x_{\beta}$, with equal exponents. Therefore $\sum_{\pi} \operatorname{sign}(\pi) Q\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=0$, because each pair of terms that corresponds to permutations which differ by the transposition of $\alpha$ and $\beta$, cancels out. This holds for any $i=1, \ldots, m$ and any monomial of $q_{i}$, so $S=0$. But the left hand side of (3) is a non-zero polynomial. This is a contradiction.

Let us now prove, using induction on $n$, that any monomial $h=x_{1}^{c_{1}} \ldots x_{n}^{c_{n}}$ of degree $n(n-1) / 2+1$ belongs to $\mathcal{I}$, and additionally all $p_{i}, q_{i}$ in the representation (2) can be chosen homogeneous with sum of degrees equal to $n(n-1) / 2+1$. (Obviously, any monomial of degree at least $n(n-1) / 2+1$ is divisible by a monomial of degree exactly $n(n-1) / 2+1$, thus this suffices.) The proposition is true for $n=1$, so assume that $n>1$ and that the proposition is proved for smaller values of $n$.

We proceed by an internal induction on $S:=\left|\left\{i: c_{i}=0\right\}\right|$. In the base case $S=0$ the monomial $h$ is divisible by the nice polynomial $x_{1} \cdot \ldots x_{n}$, therefore $h \in \mathcal{I}$. Now assume that $S>0$ and that the claim holds for smaller values of $S$. Let $T=n-S$. We may assume that $c_{T+1}=\ldots=c_{n}=0$ and $h=x_{1} \cdot \ldots \cdot x_{T} g\left(x_{1}, \ldots, x_{n-1}\right)$, where $\operatorname{deg} g=n(n-1) / 2-T+1 \geqslant(n-1)(n-2) / 2+1$. Using the outer induction hypothesis we represent $g$ as $p_{1} q_{1}+\ldots+p_{m} q_{m}$, where $p_{i}\left(x_{1}, \ldots, x_{n-1}\right)$ are nice polynomials in $n-1$ variables. There exist nice homogeneous polynomials $P_{i}\left(x_{1}, \ldots, x_{n}\right)$ such that $P_{i}\left(x_{1}, \ldots, x_{n-1}, 0\right)=p_{i}\left(x_{1}, \ldots, x_{n-1}\right)$. In other words, $\Delta_{i}:=p_{i}\left(x_{1}, \ldots, x_{n-1}\right)-P_{i}\left(x_{1}, \ldots, x_{n-1}, x_{n}\right)$ is divisible by $x_{n}$, let $\Delta_{i}=x_{n} g_{i}$. We get

$$
h=x_{1} \cdot \ldots \cdot x_{T} \sum p_{i} q_{i}=x_{1} \cdot \ldots \cdot x_{T} \sum\left(P_{i}+x_{n} g_{i}\right) q_{i}=\left(x_{1} \cdot \ldots \cdot x_{T} x_{n}\right) \sum g_{i} q_{i}+\sum P_{i} q_{i} \in \mathcal{I}
$$

The first term belongs to $\mathcal{I}$ by the inner induction hypothesis. This completes both inductions.
Comment 2. The solutions above work smoothly for the versions of the original problem and its extensions to the case of $n$ variables, where all polynomials are assumed to have real coefficients. In the version with integer coefficients, the argument showing that $x^{2} y \notin \mathcal{B}$ can be simplified: it is not hard to show that in every polynomial $f \in \mathcal{B}$, the sum of the coefficients of $x^{2} y, x^{2} z, y^{2} x, y^{2} z, z^{2} x$ and $z^{2} y$ is even. A similar fact holds for any number of variables and also implies that $N \geqslant n(n-1) / 2+1$ in terms of the previous comment.

A3. Suppose that $a, b, c, d$ are positive real numbers satisfying $(a+c)(b+d)=a c+b d$. Find the smallest possible value of

$$
S=\frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a}
$$

(Israel)
Answer: The smallest possible value is 8.
Solution 1. To show that $S \geqslant 8$, apply the AM-GM inequality twice as follows:

$$
\left(\frac{a}{b}+\frac{c}{d}\right)+\left(\frac{b}{c}+\frac{d}{a}\right) \geqslant 2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}}=\frac{2(a c+b d)}{\sqrt{a b c d}}=\frac{2(a+c)(b+d)}{\sqrt{a b c d}} \geqslant 2 \cdot \frac{2 \sqrt{a c} \cdot 2 \sqrt{b d}}{\sqrt{a b c d}}=8 .
$$

The above inequalities turn into equalities when $a=c$ and $b=d$. Then the condition $(a+c)(b+d)=a c+b d$ can be rewritten as $4 a b=a^{2}+b^{2}$. So it is satisfied when $a / b=2 \pm \sqrt{3}$. Hence, $S$ attains value 8 , e.g., when $a=c=1$ and $b=d=2+\sqrt{3}$.

Solution 2. By homogeneity we may suppose that $a b c d=1$. Let $a b=C, b c=A$ and $c a=B$. Then $a, b, c$ can be reconstructed from $A, B$ and $C$ as $a=\sqrt{B C / A}, b=\sqrt{A C / B}$ and $c=\sqrt{A B / C}$. Moreover, the condition $(a+c)(b+d)=a c+b d$ can be written in terms of $A, B, C$ as

$$
A+\frac{1}{A}+C+\frac{1}{C}=b c+a d+a b+c d=(a+c)(b+d)=a c+b d=B+\frac{1}{B} .
$$

We then need to minimize the expression

$$
\begin{aligned}
S & :=\frac{a d+b c}{b d}+\frac{a b+c d}{a c}=\left(A+\frac{1}{A}\right) B+\left(C+\frac{1}{C}\right) \frac{1}{B} \\
& =\left(A+\frac{1}{A}\right)\left(B-\frac{1}{B}\right)+\left(A+\frac{1}{A}+C+\frac{1}{C}\right) \frac{1}{B} \\
& =\left(A+\frac{1}{A}\right)\left(B-\frac{1}{B}\right)+\left(B+\frac{1}{B}\right) \frac{1}{B} .
\end{aligned}
$$

Without loss of generality assume that $B \geqslant 1$ (otherwise, we may replace $B$ by $1 / B$ and swap $A$ and $C$, this changes neither the relation nor the function to be maximized). Therefore, we can write

$$
S \geqslant 2\left(B-\frac{1}{B}\right)+\left(B+\frac{1}{B}\right) \frac{1}{B}=2 B+\left(1-\frac{1}{B}\right)^{2}=: f(B)
$$

Clearly, $f$ increases on $[1, \infty)$. Since

$$
B+\frac{1}{B}=A+\frac{1}{A}+C+\frac{1}{C} \geqslant 4,
$$

we have $B \geqslant B^{\prime}$, where $B^{\prime}=2+\sqrt{3}$ is the unique root greater than 1 of the equation $B^{\prime}+1 / B^{\prime}=4$. Hence,

$$
S \geqslant f(B) \geqslant f\left(B^{\prime}\right)=2\left(B^{\prime}-\frac{1}{B^{\prime}}\right)+\left(B^{\prime}+\frac{1}{B^{\prime}}\right) \frac{1}{B^{\prime}}=2 B^{\prime}-\frac{2}{B^{\prime}}+\frac{4}{B^{\prime}}=8
$$

It remains to note that when $A=C=1$ and $B=B^{\prime}$ we have the equality $S=8$.

Solution 3. We present another proof of the inequality $S \geqslant 8$. We start with the estimate

$$
\left(\frac{a}{b}+\frac{c}{d}\right)+\left(\frac{b}{c}+\frac{d}{a}\right) \geqslant 2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}}
$$

Let $y=\sqrt{a c}$ and $z=\sqrt{b d}$, and assume, without loss of generality, that $a c \geqslant b d$. By the AM-GM inequality, we have

$$
y^{2}+z^{2}=a c+b d=(a+c)(b+d) \geqslant 2 \sqrt{a c} \cdot 2 \sqrt{b d}=4 y z .
$$

Substituting $x=y / z$, we get $4 x \leqslant x^{2}+1$. For $x \geqslant 1$, this holds if and only if $x \geqslant 2+\sqrt{3}$.
Now we have

$$
2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}}=2\left(x+\frac{1}{x}\right) .
$$

Clearly, this is minimized by setting $x(\geqslant 1)$ as close to 1 as possible, i.e., by taking $x=2+\sqrt{3}$. Then $2(x+1 / x)=2((2+\sqrt{3})+(2-\sqrt{3}))=8$, as required.

A4. Let $a, b, c, d$ be four real numbers such that $a \geqslant b \geqslant c \geqslant d>0$ and $a+b+c+d=1$. Prove that

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<1
$$

(Belgium)
Solution 1. The weighted AM-GM inequality with weights $a, b, c, d$ gives

$$
a^{a} b^{b} c^{c} d^{d} \leqslant a \cdot a+b \cdot b+c \cdot c+d \cdot d=a^{2}+b^{2}+c^{2}+d^{2}
$$

so it suffices to prove that $(a+2 b+3 c+4 d)\left(a^{2}+b^{2}+c^{2}+d^{2}\right)<1=(a+b+c+d)^{3}$. This can be done in various ways, for example:

$$
\begin{aligned}
(a+b+c+d)^{3}> & a^{2}(a+3 b+3 c+3 d)+b^{2}(3 a+b+3 c+3 d) \\
& \quad+c^{2}(3 a+3 b+c+3 d)+d^{2}(3 a+3 b+3 c+d) \\
\geqslant & \left(a^{2}+b^{2}+c^{2}+d^{2}\right) \cdot(a+2 b+3 c+4 d)
\end{aligned}
$$

Solution 2. From $b \geqslant d$ we get

$$
a+2 b+3 c+4 d \leqslant a+3 b+3 c+3 d=3-2 a
$$

If $a<\frac{1}{2}$, then the statement can be proved by

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d} \leqslant(3-2 a) a^{a} a^{b} a^{c} a^{d}=(3-2 a) a=1-(1-a)(1-2 a)<1
$$

From now on we assume $\frac{1}{2} \leqslant a<1$.
By $b, c, d<1-a$ we have

$$
b^{b} c^{c} d^{d}<(1-a)^{b} \cdot(1-a)^{c} \cdot(1-a)^{d}=(1-a)^{1-a} .
$$

Therefore,

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<(3-2 a) a^{a}(1-a)^{1-a}
$$

For $0<x<1$, consider the functions
$f(x)=(3-2 x) x^{x}(1-x)^{1-x} \quad$ and $\quad g(x)=\log f(x)=\log (3-2 x)+x \log x+(1-x) \log (1-x) ;$ hereafter, $\log$ denotes the natural logarithm. It is easy to verify that

$$
g^{\prime \prime}(x)=-\frac{4}{(3-2 x)^{2}}+\frac{1}{x}+\frac{1}{1-x}=\frac{1+8(1-x)^{2}}{x(1-x)(3-2 x)^{2}}>0
$$

so $g$ is strictly convex on $(0,1)$.
By $g\left(\frac{1}{2}\right)=\log 2+2 \cdot \frac{1}{2} \log \frac{1}{2}=0$ and $\lim _{x \rightarrow 1-} g(x)=0$, we have $g(x) \leqslant 0$ (and hence $f(x) \leqslant 1$ ) for all $x \in\left[\frac{1}{2}, 1\right)$, and therefore

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<f(a) \leqslant 1
$$

Comment. For a large number of variables $a_{1} \geqslant a_{2} \geqslant \ldots \geqslant a_{n}>0$ with $\sum_{i} a_{i}=1$, the inequality

$$
\left(\sum_{i} i a_{i}\right) \prod_{i} a_{i}^{a_{i}} \leqslant 1
$$

does not necessarily hold. Indeed, let $a_{2}=a_{3}=\ldots=a_{n}=\varepsilon$ and $a_{1}=1-(n-1) \varepsilon$, where $n$ and $\varepsilon \in(0,1 / n)$ will be chosen later. Then

$$
\left(\sum_{i} i a_{i}\right) \prod_{i} a_{i}^{a_{i}}=\left(1+\frac{n(n-1)}{2} \varepsilon\right) \varepsilon^{(n-1) \varepsilon}(1-(n-1) \varepsilon)^{1-(n-1) \varepsilon}
$$

If $\varepsilon=C / n^{2}$ with an arbitrary fixed $C>0$ and $n \rightarrow \infty$, then the factors $\varepsilon^{(n-1) \varepsilon}=\exp ((n-1) \varepsilon \log \varepsilon)$ and $(1-(n-1) \varepsilon)^{1-(n-1) \varepsilon}$ tend to 1 , so the limit of (1) in this set-up equals $1+C / 2$. This is not simply greater than 1 , but it can be arbitrarily large.

A5. A magician intends to perform the following trick. She announces a positive integer $n$, along with $2 n$ real numbers $x_{1}<\ldots<x_{2 n}$, to the audience. A member of the audience then secretly chooses a polynomial $P(x)$ of degree $n$ with real coefficients, computes the $2 n$ values $P\left(x_{1}\right), \ldots, P\left(x_{2 n}\right)$, and writes down these $2 n$ values on the blackboard in non-decreasing order. After that the magician announces the secret polynomial to the audience.

Can the magician find a strategy to perform such a trick?
(Luxembourg)
Answer: No, she cannot.
Solution. Let $x_{1}<x_{2}<\ldots<x_{2 n}$ be real numbers chosen by the magician. We will construct two distinct polynomials $P(x)$ and $Q(x)$, each of degree $n$, such that the member of audience will write down the same sequence for both polynomials. This will mean that the magician cannot distinguish $P$ from $Q$.
Claim. There exists a polynomial $P(x)$ of degree $n$ such that $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for $i=$ $1,2, \ldots, n$.
Proof. We want to find a polynomial $a_{n} x^{n}+\ldots+a_{1} x+a_{0}$ satisfying the following system of equations:

$$
\left\{\begin{array}{l}
\left(x_{1}^{n}+x_{2}^{n}\right) a_{n}+\left(x_{1}^{n-1}+x_{2}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\
\left(x_{3}^{n}+x_{4}^{n}\right) a_{n}+\left(x_{3}^{n-1}+x_{4}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\
\cdots \\
\left(x_{2 n-1}^{n}+x_{2 n}^{n}\right) a_{n}+\left(x_{2 n-1}^{n-1}+x_{2 n}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0
\end{array}\right.
$$

We use the well known fact that a homogeneous system of $n$ linear equations in $n+1$ variables has a nonzero solution. (This fact can be proved using induction on $n$, via elimination of variables.) Applying this fact to the above system, we find a nonzero polynomial $P(x)$ of degree not exceeding $n$ such that its coefficients $a_{0}, \ldots, a_{n}$ satisfy this system. Therefore $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for all $i=1,2, \ldots, n$. Notice that $P$ has a root on each segment $\left[x_{2 i-1}, x_{2 i}\right]$ by the Intermediate Value theorem, so $n$ roots in total. Since $P$ is nonzero, we get $\operatorname{deg} P=n$.

Now consider a polynomial $P(x)$ provided by the Claim, and take $Q(x)=-P(x)$. The properties of $P(x)$ yield that $P\left(x_{2 i-1}\right)=Q\left(x_{2 i}\right)$ and $Q\left(x_{2 i-1}\right)=P\left(x_{2 i}\right)$ for all $i=1,2, \ldots, n$. It is also clear that $P \neq-P=Q$ and $\operatorname{deg} Q=\operatorname{deg} P=n$.

Comment. It can be shown that for any positive integer $n$ the magician can choose $2 n+1$ distinct real numbers so as to perform such a trick. Moreover, she can perform such a trick with almost all (in a proper sense) $(2 n+1)$-tuples of numbers.

A6. Determine all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that

$$
f^{a^{2}+b^{2}}(a+b)=a f(a)+b f(b) \quad \text { for every } a, b \in \mathbb{Z}
$$

Here, $f^{n}$ denotes the $n^{\text {th }}$ iteration of $f$, i.e., $f^{0}(x)=x$ and $f^{n+1}(x)=f\left(f^{n}(x)\right)$ for all $n \geqslant 0$.
(Slovakia)
Answer: Either $f(x)=0$ for all $x \in \mathbb{Z}$, or $f(x)=x+1$ for all $x \in \mathbb{Z}$.
Solution. Refer to the main equation as $E(a, b)$.
$E(0, b)$ reads as $f^{b^{2}}(b)=b f(b)$. For $b=-1$ this gives $f(-1)=0$.
Now $E(a,-1)$ reads as

$$
f^{a^{2}+1}(a-1)=a f(a)=f^{a^{2}}(a) .
$$

For $x \in \mathbb{Z}$ define the orbit of $x$ by $\mathcal{O}(x)=\{x, f(x), f(f(x)), \ldots\} \subseteq \mathbb{Z}$. We see that the orbits $\mathcal{O}(a-1)$ and $\mathcal{O}(a)$ differ by finitely many terms. Hence, any two orbits differ by finitely many terms. In particular, this implies that either all orbits are finite or all orbits are infinite.
Case 1: All orbits are finite.
Then $\mathcal{O}(0)$ is finite. Using $E(a,-a)$ we get

$$
a(f(a)-f(-a))=a f(a)-a f(-a)=f^{2 a^{2}}(0) \in \mathcal{O}(0)
$$

For $|a|>\max _{z \in \mathcal{O}(0)}|z|$, this yields $f(a)=f(-a)$ and $f^{2 a^{2}}(0)=0$. Therefore, the sequence $\left(f^{k}(0): k=0,1, \ldots\right)$ is purely periodic with a minimal period $T$ which divides $2 a^{2}$. Analogously, $T$ divides $2(a+1)^{2}$, therefore, $T \mid \operatorname{gcd}\left(2 a^{2}, 2(a+1)^{2}\right)=2$, i.e., $f(f(0))=0$ and $a(f(a)-f(-a))=f^{2 a^{2}}(0)=0$ for all $a$. Thus,

$$
\begin{array}{ll}
f(a)=f(-a) \quad \text { for all } a \neq 0 \\
\text { in particular, } & f(1)=f(-1)=0
\end{array}
$$

Next, for each $n \in \mathbb{Z}$, by $E(n, 1-n)$ we get

$$
n f(n)+(1-n) f(1-n)=f^{n^{2}+(1-n)^{2}}(1)=f^{2 n^{2}-2 n}(0)=0
$$

Assume that there exists some $m \neq 0$ such that $f(m) \neq 0$. Choose such an $m$ for which $|m|$ is minimal possible. Then $|m|>1$ due to $(\boldsymbol{\phi}) ; f(|m|) \neq 0$ due to ( $\boldsymbol{\phi})$; and $f(1-|m|) \neq 0$ due to $(\Omega)$ for $n=|m|$. This contradicts to the minimality assumption.

So, $f(n)=0$ for $n \neq 0$. Finally, $f(0)=f^{3}(0)=f^{4}(2)=2 f(2)=0$. Clearly, the function $f(x) \equiv 0$ satisfies the problem condition, which provides the first of the two answers.
Case 2: All orbits are infinite.
Since the orbits $\mathcal{O}(a)$ and $\mathcal{O}(a-1)$ differ by finitely many terms for all $a \in \mathbb{Z}$, each two orbits $\mathcal{O}(a)$ and $\mathcal{O}(b)$ have infinitely many common terms for arbitrary $a, b \in \mathbb{Z}$.

For a minute, fix any $a, b \in \mathbb{Z}$. We claim that all pairs $(n, m)$ of nonnegative integers such that $f^{n}(a)=f^{m}(b)$ have the same difference $n-m$. Arguing indirectly, we have $f^{n}(a)=f^{m}(b)$ and $f^{p}(a)=f^{q}(b)$ with, say, $n-m>p-q$, then $f^{p+m+k}(b)=f^{p+n+k}(a)=f^{q+n+k}(b)$, for all nonnegative integers $k$. This means that $f^{\ell+(n-m)-(p-q)}(b)=f^{\ell}(b)$ for all sufficiently large $\ell$, i.e., that the sequence $\left(f^{n}(b)\right)$ is eventually periodic, so $\mathcal{O}(b)$ is finite, which is impossible.

Now, for every $a, b \in \mathbb{Z}$, denote the common difference $n-m$ defined above by $X(a, b)$. We have $X(a-1, a)=1$ by (1). Trivially, $X(a, b)+X(b, c)=X(a, c)$, as if $f^{n}(a)=f^{m}(b)$ and $f^{p}(b)=f^{q}(c)$, then $f^{p+n}(a)=f^{p+m}(b)=f^{q+m}(c)$. These two properties imply that $X(a, b)=b-a$ for all $a, b \in \mathbb{Z}$.

But (1) yields $f^{a^{2}+1}(f(a-1))=f^{a^{2}}(f(a))$, so

$$
1=X(f(a-1), f(a))=f(a)-f(a-1) \quad \text { for all } a \in \mathbb{Z}
$$

Recalling that $f(-1)=0$, we conclude by (two-sided) induction on $x$ that $f(x)=x+1$ for all $x \in \mathbb{Z}$.

Finally, the obtained function also satisfies the assumption. Indeed, $f^{n}(x)=x+n$ for all $n \geqslant 0$, so

$$
f^{a^{2}+b^{2}}(a+b)=a+b+a^{2}+b^{2}=a f(a)+b f(b)
$$

Comment. There are many possible variations of the solution above, but it seems that finiteness of orbits seems to be a crucial distinction in all solutions. However, the case distinction could be made in different ways; in particular, there exist some versions of Case 1 which work whenever there is at least one finite orbit.

We believe that Case 2 is conceptually harder than Case 1.

A7. Let $n$ and $k$ be positive integers. Prove that for $a_{1}, \ldots, a_{n} \in\left[1,2^{k}\right]$ one has

$$
\sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}} \leqslant 4 \sqrt{k n}
$$

(Iran)
Solution 1. Partition the set of indices $\{1,2, \ldots, n\}$ into disjoint subsets $M_{1}, M_{2}, \ldots, M_{k}$ so that $a_{\ell} \in\left[2^{j-1}, 2^{j}\right]$ for $\ell \in M_{j}$. Then, if $\left|M_{j}\right|=: p_{j}$, we have

$$
\sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant \sum_{i=1}^{p_{j}} \frac{2^{j}}{2^{j-1} \sqrt{i}}=2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}}
$$

where we used that $a_{\ell} \leqslant 2^{j}$ and in the denominator every index from $M_{j}$ contributes at least $\left(2^{j-1}\right)^{2}$. Now, using $\sqrt{i}-\sqrt{i-1}=\frac{1}{\sqrt{i}+\sqrt{i-1}} \geqslant \frac{1}{2 \sqrt{i}}$, we deduce that

$$
\sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}} \leqslant 2 \sum_{i=1}^{p_{j}} 2(\sqrt{i}-\sqrt{i-1})=4 \sqrt{p_{j}}
$$

Therefore, summing over $j=1, \ldots, k$ and using the QM-AM inequality, we obtain

$$
\sum_{\ell=1}^{n} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 4 \sum_{j=1}^{k} \sqrt{\left|M_{j}\right|} \leqslant 4 \sqrt{k \sum_{j=1}^{k}\left|M_{j}\right|}=4 \sqrt{k n}
$$

Comment. Consider the function $f\left(a_{1}, \ldots, a_{n}\right)=\sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}}$. One can see that rearranging the variables in increasing order can only increase the value of $f\left(a_{1}, \ldots, a_{n}\right)$. Indeed, if $a_{j}>a_{j+1}$ for some index $j$ then we have

$$
f\left(a_{1}, \ldots, a_{j-1}, a_{j+1}, a_{j}, a_{j+2}, \ldots, a_{n}\right)-f\left(a_{1}, \ldots, a_{n}\right)=\frac{a}{S}+\frac{b}{\sqrt{S^{2}-a^{2}}}-\frac{b}{S}-\frac{a}{\sqrt{S^{2}-b^{2}}}
$$

where $a=a_{j}, b=a_{j+1}$, and $S=\sqrt{a_{1}^{2}+\ldots+a_{j+1}^{2}}$. The positivity of the last expression above follows from

$$
\frac{b}{\sqrt{S^{2}-a^{2}}}-\frac{b}{S}=\frac{a^{2} b}{S \sqrt{S^{2}-a^{2}} \cdot\left(S+\sqrt{S^{2}-a^{2}}\right)}>\frac{a b^{2}}{S \sqrt{S^{2}-b^{2}} \cdot\left(S+\sqrt{S^{2}-b^{2}}\right)}=\frac{a}{\sqrt{S^{2}-b^{2}}}-\frac{a}{S} .
$$

Comment. If $k<n$, the example $a_{m}:=2^{k(m-1) / n}$ shows that the problem statement is sharp up to a multiplicative constant. For $k \geqslant n$ the trivial upper bound $n$ becomes sharp up to a multiplicative constant.

Solution 2. Apply induction on $n$. The base $n \leqslant 16$ is clear: our sum does not exceed $n \leqslant 4 \sqrt{n k}$. For the inductive step from $1, \ldots, n-1$ to $n \geqslant 17$ consider two similar cases. Case 1: $n=2 t$.

Let $x_{\ell}=\frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}}$. We have

$$
\exp \left(-x_{t+1}^{2}-\ldots-x_{2 t}^{2}\right) \geqslant\left(1-x_{t+1}^{2}\right) \ldots\left(1-x_{2 t}^{2}\right)=\frac{a_{1}^{2}+\ldots+a_{t}^{2}}{a_{1}^{2}+\ldots+a_{2 t}^{2}} \geqslant \frac{1}{1+4^{k}}
$$

where we used that the product is telescopic and then an estimate $a_{t+i} \leqslant 2^{k} a_{i}$ for $i=1, \ldots, t$. Therefore, $x_{t+1}^{2}+\ldots+x_{2 t}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$, where log denotes the natural logarithm. This implies $x_{t+1}+\ldots+x_{2 t} \leqslant \sqrt{2 k t}$. Hence, using the inductive hypothesis for $n=t$ we get

$$
\sum_{\ell=1}^{2 t} x_{\ell} \leqslant 4 \sqrt{k t}+\sqrt{2 k t} \leqslant 4 \sqrt{2 k t}
$$

Case 2: $n=2 t+1$.
Analogously, we get $x_{t+2}^{2}+\ldots+x_{2 t+1}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$ and

$$
\sum_{\ell=1}^{2 t+1} x_{\ell} \leqslant 4 \sqrt{k(t+1)}+\sqrt{2 k t} \leqslant 4 \sqrt{k(2 t+1)}
$$

The last inequality is true for all $t \geqslant 8$ since

$$
4 \sqrt{2 t+1}-\sqrt{2 t} \geqslant 3 \sqrt{2 t}=\sqrt{18 t} \geqslant \sqrt{16 t+16}=4 \sqrt{t+1}
$$

A8. Let $\mathbb{R}^{+}$be the set of positive real numbers. Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ such that, for all positive real numbers $x$ and $y$,

$$
f(x+f(x y))+y=f(x) f(y)+1
$$

(Ukraine)
Answer: $f(x)=x+1$.
Solution 1. A straightforward check shows that $f(x)=x+1$ satisfies (*). We divide the proof of the converse statement into a sequence of steps.
Step 1: $f$ is injective.
Put $x=1$ in (*) and rearrange the terms to get

$$
y=f(1) f(y)+1-f(1+f(y))
$$

Therefore, if $f\left(y_{1}\right)=f\left(y_{2}\right)$, then $y_{1}=y_{2}$.
Step 2: $f$ is (strictly) monotone increasing.
For any fixed $y \in \mathbb{R}^{+}$, the function

$$
g(x):=f(x+f(x y))=f(x) f(y)+1-y
$$

is injective by Step 1. Therefore, $x_{1}+f\left(x_{1} y\right) \neq x_{2}+f\left(x_{2} y\right)$ for all $y, x_{1}, x_{2} \in \mathbb{R}^{+}$with $x_{1} \neq x_{2}$. Plugging in $z_{i}=x_{i} y$, we arrive at

$$
\frac{z_{1}-z_{2}}{y} \neq f\left(z_{2}\right)-f\left(z_{1}\right), \quad \text { or } \quad \frac{1}{y} \neq \frac{f\left(z_{2}\right)-f\left(z_{1}\right)}{z_{1}-z_{2}}
$$

for all $y, z_{1}, z_{2} \in \mathbb{R}^{+}$with $z_{1} \neq z_{2}$. This means that the right-hand side of the rightmost relation is always non-positive, i.e., $f$ is monotone non-decreasing. Since $f$ is injective, it is strictly monotone.
Step 3: There exist constants $a$ and $b$ such that $f(y)=a y+b$ for all $y \in \mathbb{R}^{+}$.
Since $f$ is monotone and bounded from below by 0 , for each $x_{0} \geqslant 0$, there exists a right limit $\lim _{x \backslash x_{0}} f(x) \geqslant 0$. Put $p=\lim _{x \backslash 0} f(x)$ and $q=\lim _{x \backslash p} f(x)$.

Fix an arbitrary $y$ and take the limit of $(*)$ as $x \searrow 0$. We have $f(x y) \searrow p$ and hence $f(x+f(x y)) \searrow q$; therefore, we obtain

$$
q+y=p f(y)+1, \quad \text { or } \quad f(y)=\frac{q+y-1}{p}
$$

(Notice that $p \neq 0$, otherwise $q+y=1$ for all $y$, which is absurd.) The claim is proved.
Step 4: $f(x)=x+1$ for all $x \in \mathbb{R}^{+}$.
Based on the previous step, write $f(x)=a x+b$. Putting this relation into (*) we get

$$
a(x+a x y+b)+b+y=(a x+b)(a y+b)+1,
$$

which can be rewritten as

$$
(a-a b) x+(1-a b) y+a b+b-b^{2}-1=0 \quad \text { for all } x, y \in \mathbb{R}^{+} .
$$

This identity may hold only if all the coefficients are 0 , i.e.,

$$
a-a b=1-a b=a b+b-b^{2}-1=0 .
$$

Hence, $a=b=1$.

Solution 2. We provide another proof that $f(x)=x+1$ is the only function satisfying (*).
Put $a=f(1)$. Define the function $\phi: \mathbb{R}^{+} \rightarrow \mathbb{R}$ by

$$
\phi(x)=f(x)-x-1
$$

Then equation (*) reads as

$$
\phi(x+f(x y))=f(x) f(y)-f(x y)-x-y
$$

Since the right-hand side of (1) is symmetric under swapping $x$ and $y$, we obtain

$$
\phi(x+f(x y))=\phi(y+f(x y))
$$

In particular, substituting $(x, y)=(t, 1 / t)$ we get

$$
\phi(a+t)=\phi\left(a+\frac{1}{t}\right), \quad t \in \mathbb{R}^{+} .
$$

Notice that the function $f$ is bounded from below by a positive constant. Indeed, for each $y \in \mathbb{R}^{+}$, the relation (*) yields $f(x) f(y)>y-1$, hence

$$
f(x)>\frac{y-1}{f(y)} \quad \text { for all } x \in \mathbb{R}^{+}
$$

If $y>1$, this provides a desired positive lower bound for $f(x)$.
Now, let $M=\inf _{x \in \mathbb{R}^{+}} f(x)>0$. Then, for all $y \in \mathbb{R}^{+}$,

$$
M \geqslant \frac{y-1}{f(y)}, \quad \text { or } \quad f(y) \geqslant \frac{y-1}{M}
$$

Lemma 1. The function $f(x)$ (and hence $\phi(x)$ ) is bounded on any segment $[p, q]$, where $0<p<q<+\infty$.
Proof. $f$ is bounded from below by $M$. It remains to show that $f$ is bounded from above on $[p, q]$. Substituting $y=1$ into (*), we get

$$
f(x+f(x))=a f(x)
$$

Take $z \in[p, q]$ and put $s=f(z)$. By (4), we have

$$
f(z+s)=a s \quad \text { and } \quad f(z+s+a s)=f(z+s+f(z+s))=a^{2} s
$$

Plugging in $(x, y)=\left(z, 1+\frac{s}{z}\right)$ to $(*)$ and using (3), we obtain

$$
f(z+a s)=f(z+f(z+s))=s f\left(1+\frac{s}{z}\right)-\frac{s}{z} \geqslant \frac{s^{2}}{M z}-\frac{s}{z}
$$

Now, substituting $(x, y)=\left(z+a s, \frac{z}{z+a s}\right)$ to $(*)$ and applying the above estimate and the estimate $f(y) \geqslant M$, we obtain

$$
\begin{aligned}
a^{2} s=f(z+s+a s)=f(z+a s+f(z))=f(z+a s) & f\left(\frac{z}{z+a s}\right)+1-\frac{z}{z+a s} \\
& \geqslant M f(z+a s) \geqslant \frac{s^{2}}{z}-\frac{M s}{z} \geqslant \frac{s^{2}}{q}-\frac{M s}{p}
\end{aligned}
$$

This yields $s \leqslant q\left(\frac{M}{p}+a^{2}\right)=: L$, and $f$ is bounded from above by $L$ on $[p, q]$.

Applying Lemma 1 to the segment $[a, a+1]$, we see that $\phi$ is bounded on it. By (2) we get that $\phi$ is also bounded on $[a+1,+\infty)$, and hence on $[a,+\infty)$. Put $C=\max \{a, 3\}$.
Lemma 2. For all $x \geqslant C$, we have $\phi(x)=0$ (and hence $f(x)=x+1$ ).
Proof. Substituting $y=x$ to (1), we obtain

$$
\phi\left(x+f\left(x^{2}\right)\right)=f(x)^{2}-f\left(x^{2}\right)-2 x
$$

hence,

$$
\phi\left(x+f\left(x^{2}\right)\right)+\phi\left(x^{2}\right)=f(x)^{2}-(x+1)^{2}=\phi(x)(f(x)+x+1)
$$

Since $f(x)+x+1 \geqslant C+1 \geqslant 4$, we obtain that

$$
|\phi(x)| \leqslant \frac{1}{4}\left(\left|\phi\left(x+f\left(x^{2}\right)\right)\right|+\left|\phi\left(x^{2}\right)\right|\right)
$$

Since $C \geqslant a$, there exists a finite supremum $S=\sup _{x \geqslant C}|\phi(x)|$. For each $x \in[C,+\infty)$, both $x+f\left(x^{2}\right)$ and $x^{2}$ are greater than $x$; hence they also lie in $[C,+\infty)$. Therefore, taking the supremum of the left-hand side of (6) over $x \in[C,+\infty$ ), we obtain $S \leqslant S / 2$ and hence $S=0$. Thus, $\phi(x)=0$ for all $x \geqslant C$.

It remains to show that $f(y)=y+1$ when $0<y<C$. For each $y$, choose $x>\max \left\{C, \frac{C}{y}\right\}$. Then all three numbers $x, x y$, and $x+f(x y)$ are greater than $C$, so (*) reads as

$$
(x+x y+1)+1+y=(x+1) f(y)+1, \text { hence } f(y)=y+1
$$

Comment 1. It may be useful to rewrite (*) in the form

$$
\phi(x+f(x y))+\phi(x y)=\phi(x) \phi(y)+x \phi(y)+y \phi(x)+\phi(x)+\phi(y)
$$

This general identity easily implies both (1) and (5).
Comment 2. There are other ways to prove that $f(x) \geqslant x+1$. Once one has proved this, they can use this stronger estimate instead of (3) in the proof of Lemma 1. Nevertheless, this does not make this proof simpler. So proving that $f(x) \geqslant x+1$ does not seem to be a serious progress towards the solution of the problem. In what follows, we outline one possible proof of this inequality.

First of all, we improve inequality (3) by noticing that, in fact, $f(x) f(y) \geqslant y-1+M$, and hence

$$
f(y) \geqslant \frac{y-1}{M}+1
$$

Now we divide the argument into two steps.
Step 1: We show that $M \leqslant 1$.
Suppose that $M>1$; recall the notation $a=f(1)$. Substituting $y=1 / x$ in (*), we get

$$
f(x+a)=f(x) f\left(\frac{1}{x}\right)+1-\frac{1}{x} \geqslant M f(x),
$$

provided that $x \geqslant 1$. By a straightforward induction on $\lceil(x-1) / a\rceil$, this yields

$$
f(x) \geqslant M^{(x-1) / a}
$$

Now choose an arbitrary $x_{0} \in \mathbb{R}^{+}$and define a sequence $x_{0}, x_{1}, \ldots$ by $x_{n+1}=x_{n}+f\left(x_{n}\right) \geqslant x_{n}+M$ for all $n \geqslant 0$; notice that the sequence is unbounded. On the other hand, by (4) we get

$$
a x_{n+1}>a f\left(x_{n}\right)=f\left(x_{n+1}\right) \geqslant M^{\left(x_{n+1}-1\right) / a},
$$

which cannot hold when $x_{n+1}$ is large enough.

Step 2: We prove that $f(y) \geqslant y+1$ for all $y \in \mathbb{R}^{+}$.
Arguing indirectly, choose $y \in \mathbb{R}^{+}$such that $f(y)<y+1$, and choose $\mu$ with $f(y)<\mu<y+1$. Define a sequence $x_{0}, x_{1}, \ldots$ by choosing a large $x_{0} \geqslant 1$ and setting $x_{n+1}=x_{n}+f\left(x_{n} y\right) \geqslant x_{n}+M$ for all $n \geqslant 0$ (this sequence is also unbounded). If $x_{0}$ is large enough, then (7) implies that $(\mu-f(y)) f\left(x_{n}\right) \geqslant 1-y$ for all $n$. Therefore,

$$
f\left(x_{n+1}\right)=f(y) f\left(x_{n}\right)+1-y \leqslant \mu f\left(x_{n}\right) .
$$

On the other hand, since $M \leqslant 1$, inequality (7) implies that $f(z) \geqslant z$, provided that $z \geqslant 1$. Hence, if $x_{0}$ is large enough, we have $x_{n+1} \geqslant x_{n}(1+y)$ for all $n$. Therefore,

$$
x_{0}(1+y)^{n} \leqslant x_{n} \leqslant f\left(x_{n}\right) \leqslant \mu^{n} f\left(x_{0}\right)
$$

which cannot hold when $n$ is large enough.

## Combinatorics

## C1. Let $n$ be a positive integer. Find the number of permutations $a_{1}, a_{2}, \ldots, a_{n}$ of the

sequence $1,2, \ldots, n$ satisfying

$$
a_{1} \leqslant 2 a_{2} \leqslant 3 a_{3} \leqslant \ldots \leqslant n a_{n}
$$

(United Kingdom)
Answer: The number of such permutations is $F_{n+1}$, where $F_{k}$ is the $k^{\text {th }}$ Fibonacci number: $F_{1}=F_{2}=1, F_{n+1}=F_{n}+F_{n-1}$.

Solution 1. Denote by $P_{n}$ the number of permutations that satisfy (*). It is easy to see that $P_{1}=1$ and $P_{2}=2$.
Lemma 1. Let $n \geqslant 3$. If a permutation $a_{1}, \ldots, a_{n}$ satisfies (*) then either $a_{n}=n$, or $a_{n-1}=n$ and $a_{n}=n-1$.
Proof. Let $k$ be the index for which $a_{k}=n$. If $k=n$ then we are done.
If $k=n-1$ then, by $(*)$, we have $n(n-1)=(n-1) a_{n-1} \leqslant n a_{n}$, so $a_{n} \geqslant n-1$. Since $a_{n} \neq a_{n-1}=n$, the only choice for $a_{n}$ is $a_{n}=n-1$.

Now suppose that $k \leqslant n-2$. For every $k<i<n$ we have $k n=k a_{k} \leqslant i a_{i}<n a_{i}$, so $a_{i} \geqslant k+1$. Moreover, $n a_{n} \geqslant(n-1) a_{n-1} \geqslant(n-1)(k+1)=n k+(n-1-k)>n k$, so $a_{n} \geqslant k+1$. Now the $n-k+1$ numbers $a_{k}, a_{k+1}, \ldots, a_{n}$ are all greater than $k$; but there are only $n-k$ such values; this is not possible.

If $a_{n}=n$ then $a_{1}, a_{2}, \ldots, a_{n-1}$ must be a permutation of the numbers $1, \ldots, n-1$ satisfying $a_{1} \leqslant 2 a_{2} \leqslant \ldots \leqslant(n-1) a_{n-1}$; there are $P_{n-1}$ such permutations. The last inequality in (*), $(n-1) a_{n-1} \leqslant n a_{n}=n^{2}$, holds true automatically.

If $\left(a_{n-1}, a_{n}\right)=(n, n-1)$, then $a_{1}, \ldots, a_{n-2}$ must be a permutation of $1, \ldots, n-2$ satisfying $a_{1} \leqslant \ldots \leqslant(n-2) a_{n-2}$; there are $P_{n-2}$ such permutations. The last two inequalities in (*) hold true automatically by $(n-2) a_{n-2} \leqslant(n-2)^{2}<n(n-1)=(n-1) a_{n-1}=n a_{n}$.

Hence, the sequence $\left(P_{1}, P_{2}, \ldots\right)$ satisfies the recurrence relation $P_{n}=P_{n-1}+P_{n-2}$ for $n \geqslant 3$. The first two elements are $P_{1}=F_{2}$ and $P_{2}=F_{3}$, so by a trivial induction we have $P_{n}=F_{n+1}$.

Solution 2. We claim that all sought permutations are of the following kind. Split $\{1,2, \ldots, n\}$ into singletons and pairs of adjacent numbers. In each pair, swap the two numbers and keep the singletons unchanged.

Such permutations correspond to tilings of a $1 \times n$ chessboard using dominoes and unit squares; it is well-known that the number of such tilings is the Fibonacci number $F_{n+1}$.

The claim follows by induction from
Lemma 2. Assume that $a_{1}, \ldots, a_{n}$ is a permutation satisfying (*), and $k$ is an integer such that $1 \leqslant k \leqslant n$ and $\left\{a_{1}, a_{2}, \ldots, a_{k-1}\right\}=\{1,2, \ldots, k-1\}$. (If $k=1$, the condition is empty.) Then either $a_{k}=k$, or $a_{k}=k+1$ and $a_{k+1}=k$.
Proof. Choose $t$ with $a_{t}=k$. Since $k \notin\left\{a_{1}, \ldots, a_{k-1}\right\}$, we have either $t=k$ or $t>k$. If $t=k$ then we are done, so assume $t>k$.

Notice that one of the numbers among the $t-k$ numbers $a_{k}, a_{k+1}, \ldots, a_{t-1}$ is at least $t$, because there are only $t-k-1$ values between $k$ and $t$. Let $i$ be an index with $k \leqslant i<t$ and $a_{i} \geqslant t$; then $k t=t a_{t} \geqslant i a_{i} \geqslant i t \geqslant k t$, so that all the inequalities turn into equalities, hence $i=k$ and $a_{k}=t$. If $t=k+1$, we are done.

Suppose that $t>k+1$. Then the chain of inequalities $k t=k a_{k} \leqslant \ldots \leqslant t a_{t}=k t$ should also turn into a chain of equalities. From this point we can find contradictions in several ways; for example by pointing to $a_{t-1}=\frac{k t}{t-1}=k+\frac{k}{t-1}$ which cannot be an integer, or considering
the product of the numbers $(k+1) a_{k+1}, \ldots,(t-1) a_{t-1}$; the numbers $a_{k+1}, \ldots, a_{t-1}$ are distinct and greater than $k$, so

$$
(k t)^{t-k-1}=(k+1) a_{k+1} \cdot(k+2) a_{k+2} \cdot \ldots \cdot(t-1) a_{t-1} \geqslant((k+1)(k+2) \cdot \ldots \cdot(t-1))^{2}
$$

Notice that $(k+i)(t-i)=k t+i(t-k-i)>k t$ for $1 \leqslant i<t-k$. This leads to the contradiction

$$
(k t)^{t-k-1} \geqslant((k+1)(k+2) \cdot \ldots \cdot(t-1))^{2}=\prod_{i=1}^{t-k-1}(k+i)(t-i)>(k t)^{t-k-1}
$$

Therefore, the case $t>k+1$ is not possible.

C2. In a regular 100-gon, 41 vertices are colored black and the remaining 59 vertices are colored white. Prove that there exist 24 convex quadrilaterals $Q_{1}, \ldots, Q_{24}$ whose corners are vertices of the 100 -gon, so that

- the quadrilaterals $Q_{1}, \ldots, Q_{24}$ are pairwise disjoint, and
- every quadrilateral $Q_{i}$ has three corners of one color and one corner of the other color.
(Austria)
Solution. Call a quadrilateral skew-colored, if it has three corners of one color and one corner of the other color. We will prove the following
Claim. If the vertices of a convex $(4 k+1)$-gon $P$ are colored black and white such that each color is used at least $k$ times, then there exist $k$ pairwise disjoint skew-colored quadrilaterals whose vertices are vertices of $P$. (One vertex of $P$ remains unused.)

The problem statement follows by removing 3 arbitrary vertices of the 100-gon and applying the Claim to the remaining 97 vertices with $k=24$.
Proof of the Claim. We prove by induction. For $k=1$ we have a pentagon with at least one black and at least one white vertex. If the number of black vertices is even then remove a black vertex; otherwise remove a white vertex. In the remaining quadrilateral, there are an odd number of black and an odd number of white vertices, so the quadrilateral is skew-colored.

For the induction step, assume $k \geqslant 2$. Let $b$ and $w$ be the numbers of black and white vertices, respectively; then $b, w \geqslant k$ and $b+w=4 k+1$. Without loss of generality we may assume $w \geqslant b$, so $k \leqslant b \leqslant 2 k$ and $2 k+1 \leqslant w \leqslant 3 k+1$.

We want to find four consecutive vertices such that three of them are white, the fourth one is black. Denote the vertices by $V_{1}, V_{2}, \ldots, V_{4 k+1}$ in counterclockwise order, such that $V_{4 k+1}$ is black, and consider the following $k$ groups of vertices:

$$
\left(V_{1}, V_{2}, V_{3}, V_{4}\right),\left(V_{5}, V_{6}, V_{7}, V_{8}\right), \ldots,\left(V_{4 k-3}, V_{4 k-2}, V_{4 k-1}, V_{4 k}\right)
$$

In these groups there are $w$ white and $b-1$ black vertices. Since $w>b-1$, there is a group, $\left(V_{i}, V_{i+1}, V_{i+2}, V_{i+3}\right)$ that contains more white than black vertices. If three are white and one is black in that group, we are done. Otherwise, if $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ are all white then let $V_{j}$ be the first black vertex among $V_{i+4}, \ldots, V_{4 k+1}$ (recall that $V_{4 k+1}$ is black); then $V_{j-3}, V_{j-2}$ and $V_{j-1}$ are white and $V_{j}$ is black.

Now we have four consecutive vertices $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ that form a skew-colored quadrilateral. The remaining vertices form a convex ( $4 k-3$ )-gon; $w-3$ of them are white and $b-1$ are black. Since $b-1 \geqslant k-1$ and $w-3 \geqslant(2 k+1)-3>k-1$, we can apply the Claim with $k-1$.

Comment. It is not true that the vertices of the 100 -gon can be split into 25 skew-colored quadrilaterals. A possible counter-example is when the vertices $V_{1}, V_{3}, V_{5}, \ldots, V_{81}$ are black and the other vertices, $V_{2}, V_{4}, \ldots, V_{80}$ and $V_{82}, V_{83}, \ldots, V_{100}$ are white. For having 25 skew-colored quadrilaterals, there should be 8 containing three black vertices. But such a quadrilateral splits the other 96 vertices into four sets in such a way that at least two sets contain odd numbers of vertices and therefore they cannot be grouped into disjoint quadrilaterals.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-34.jpg?height=318&width=552&top_left_y=2462&top_left_x=752)

C3. Let $n$ be an integer with $n \geqslant 2$. On a slope of a mountain, $n^{2}$ checkpoints are marked, numbered from 1 to $n^{2}$ from the bottom to the top. Each of two cable car companies, $A$ and $B$, operates $k$ cable cars numbered from 1 to $k$; each cable car provides a transfer from some checkpoint to a higher one. For each company, and for any $i$ and $j$ with $1 \leqslant i<j \leqslant k$, the starting point of car $j$ is higher than the starting point of car $i$; similarly, the finishing point of car $j$ is higher than the finishing point of car $i$. Say that two checkpoints are linked by some company if one can start from the lower checkpoint and reach the higher one by using one or more cars of that company (no movement on foot is allowed).

Determine the smallest $k$ for which one can guarantee that there are two checkpoints that are linked by each of the two companies.
(India)
Answer: $k=n^{2}-n+1$.
Solution. We start with showing that for any $k \leqslant n^{2}-n$ there may be no pair of checkpoints linked by both companies. Clearly, it suffices to provide such an example for $k=n^{2}-n$.

Let company $A$ connect the pairs of checkpoints of the form $(i, i+1)$, where $n \nmid i$. Then all pairs of checkpoints $(i, j)$ linked by $A$ satisfy $\lceil i / n\rceil=\lceil j / n\rceil$.

Let company $B$ connect the pairs of the form $(i, i+n)$, where $1 \leqslant i \leqslant n^{2}-n$. Then pairs of checkpoints $(i, j)$ linked by $B$ satisfy $i \equiv j(\bmod n)$. Clearly, no pair $(i, j)$ satisfies both conditions, so there is no pair linked by both companies.

Now we show that for $k=n^{2}-n+1$ there always exist two required checkpoints. Define an $A$-chain as a sequence of checkpoints $a_{1}<a_{2}<\ldots<a_{t}$ such that company $A$ connects $a_{i}$ with $a_{i+1}$ for all $1 \leqslant i \leqslant t-1$, but there is no $A$-car transferring from some checkpoint to $a_{1}$ and no $A$-car transferring from $a_{t}$ to any other checkpoint. Define $B$-chains similarly. Moving forth and back, one easily sees that any checkpoint is included in a unique $A$-chain (possibly consisting of that single checkpoint), as well as in a unique $B$-chain. Now, put each checkpoint into a correspondence to the pair of the $A$-chain and the $B$-chain it belongs to.

All finishing points of $A$-cars are distinct, so there are $n^{2}-k=n-1$ checkpoints that are not such finishing points. Each of them is a starting point of a unique $A$-chain, so the number of $A$-chains is $n-1$. Similarly, the number of $B$-chains also equals $n-1$. Hence, there are $(n-1)^{2}$ pairs consisting of an $A$ - and a $B$-chain. Therefore, two of the $n^{2}$ checkpoints correspond to the same pair, so that they belong to the same $A$-chain, as well as to the same $B$-chain. This means that they are linked by both companies, as required.

Comment 1. The condition that the $i^{\text {th }}$ car starts and finishes lower than the $j^{\text {th }}$ one is used only in the "moving forth and back" argument and in the counting of starting points of the chains. In both cases, the following weaker assumption suffices: No two cars of the same company start at the same checkpoint, and no two such cars finish at the same checkpoint.

Thus, the problem conditions could be weakened in this way,, with no affect on the solution.
Comment 2. If the number of checkpoints were $N$, then the answer would be $N-\lceil\sqrt{N}\rceil+1$. The solution above works verbatim for this generalization.

C4. The Fibonacci numbers $F_{0}, F_{1}, F_{2}, \ldots$ are defined inductively by $F_{0}=0, F_{1}=1$, and $F_{n+1}=F_{n}+F_{n-1}$ for $n \geqslant 1$. Given an integer $n \geqslant 2$, determine the smallest size of a set $S$ of integers such that for every $k=2,3, \ldots, n$ there exist some $x, y \in S$ such that $x-y=F_{k}$.
(Croatia)
Answer: $\lceil n / 2\rceil+1$.
Solution. First we show that if a set $S \subset \mathbb{Z}$ satisfies the conditions then $|S| \geqslant \frac{n}{2}+1$.
Let $d=\lceil n / 2\rceil$, so $n \leqslant 2 d \leqslant n+1$. In order to prove that $|S| \geqslant d+1$, construct a graph as follows. Let the vertices of the graph be the elements of $S$. For each $1 \leqslant k \leqslant d$, choose two elements $x, y \in S$ such that $x-y=F_{2 k-1}$, and add the pair $(x, y)$ to the graph as edge. (Note that by the problem's constraints, there must be a pair $(x, y)$ with $x-y=F_{2 k-1}$ for every $3 \leqslant 2 k-1 \leqslant 2 d-1 \leqslant n$; moreover, due to $F_{1}=F_{2}$ we have a pair with $x-y=F_{1}$ as well.) We will say that the length of the edge $(x, y)$ is $|x-y|$.

We claim that the graph contains no cycle. For the sake of contradiction, suppose that the graph contains a cycle $\left(x_{1}, \ldots, x_{\ell}\right)$, and let the longest edge in the cycle be $\left(x_{1}, x_{\ell}\right)$ with length $F_{2 m+1}$. The other edges $\left(x_{1}, x_{2}\right), \ldots,\left(x_{\ell-1}, x_{\ell}\right)$ in the cycle are shorter than $F_{2 m+1}$ and distinct, their lengths form a subset of $\left\{F_{1}, F_{3}, \ldots, F_{2 m-1}\right\}$. But this is not possible because

$$
\begin{aligned}
F_{2 m+1} & =\left|x_{\ell}-x_{1}\right| \leqslant \sum_{i=1}^{\ell-1}\left|x_{i+1}-x_{i}\right| \leqslant F_{1}+F_{3}+F_{5}+\ldots+F_{2 m-1} \\
& =F_{2}+\left(F_{4}-F_{2}\right)+\left(F_{6}-F_{4}\right)+\ldots+\left(F_{2 m}-F_{2 m-2}\right)=F_{2 m}<F_{2 m+1}
\end{aligned}
$$

Hence, the graph has $d$ edges and cannot contain a cycle, therefore it must contain at least $d+1$ vertices, so $|S| \geqslant d+1$.

Now we show a suitable set with $d+1$ elements. Let

$$
S=\left\{F_{0}, F_{2}, F_{4}, F_{5}, \ldots, F_{2 d}\right\}
$$

For $1 \leqslant k \leqslant d$ we have $F_{0}, F_{2 k-2}, F_{2 k} \in S$ with differences $F_{2 k}-F_{2 k-2}=F_{2 k-1}$ and $F_{2 k}-F_{0}=F_{2 k}$, so each of $F_{1}, F_{2}, \ldots, F_{2 d}$ occurs as difference between two elements in $S$. So this set containing $d+1$ numbers is suitable.

This page is intentionally left blank

C5. Let $p$ be an odd prime, and put $N=\frac{1}{4}\left(p^{3}-p\right)-1$. The numbers $1,2, \ldots, N$ are painted arbitrarily in two colors, red and blue. For any positive integer $n \leqslant N$, denote by $r(n)$ the fraction of integers in $\{1,2, \ldots, n\}$ that are red.

Prove that there exists a positive integer $a \in\{1,2, \ldots, p-1\}$ such that $r(n) \neq a / p$ for all $n=1,2, \ldots, N$.
(Netherlands)
Solution. Denote by $R(n)$ the number of red numbers in $\{1,2, \ldots, n\}$, i.e., $R(n)=n r(n)$. Similarly, denote by $B(n)$ and $b(n)=B(n) / n$ the number and proportion of blue numbers in $\{1,2, \ldots, n\}$, respectively. Notice that $B(n)+R(n)=n$ and $b(n)+r(n)=1$. Therefore, the statement of the problem does not change after swapping the colors.

Arguing indirectly, for every $a \in\{1,2, \ldots, p-1\}$ choose some positive integer $n_{a}$ such that $r\left(n_{a}\right)=a / p$ and, hence, $R\left(n_{a}\right)=a n_{a} / p$. Clearly, $p \mid n_{a}$, so that $n_{a}=p m_{a}$ for some positive integer $m_{a}$, and $R\left(n_{a}\right)=a m_{a}$. Without loss of generality, we assume that $m_{1}<m_{p-1}$, as otherwise one may swap the colors. Notice that

$$
m_{a} \leqslant \frac{N}{p}<\frac{p^{2}-1}{4} \quad \text { for all } a=1,2, \ldots, p-1
$$

The solution is based on a repeated application of the following simple observation.
Claim. Assume that $m_{a}<m_{b}$ for some $a, b \in\{1,2, \ldots, p-1\}$. Then

$$
m_{b} \geqslant \frac{a}{b} m_{a} \quad \text { and } \quad m_{b} \geqslant \frac{p-a}{p-b} m_{a}
$$

Proof. The first inequality follows from $b m_{b}=R\left(n_{b}\right) \geqslant R\left(n_{a}\right)=a m_{a}$. The second inequality is obtained by swapping colors .

Let $q=(p-1) / 2$. We distinguish two cases.
Case 1: All $q$ numbers $m_{1}, m_{2}, \ldots, m_{q}$ are smaller than $m_{p-1}$.
Let $m_{a}$ be the maximal number among $m_{1}, m_{2}, \ldots, m_{q}$; then $m_{a} \geqslant q \geqslant a$. Applying the Claim, we get

$$
m_{p-1} \geqslant \frac{p-a}{p-(p-1)} m_{a} \geqslant(p-q) q=\frac{p^{2}-1}{4}
$$

which contradicts (1).
Case 2: There exists $k \leqslant q$ such that $m_{k}>m_{p-1}$.
Choose $k$ to be the smallest index satisfying $m_{k}>m_{p-1}$; by our assumptions, we have $1<k \leqslant$ $q<p-1$.

Let $m_{a}$ be the maximal number among $m_{1}, m_{2}, \ldots, m_{k-1}$; then $a \leqslant k-1 \leqslant m_{a}<m_{p-1}$. Applying the Claim, we get

$$
\begin{aligned}
m_{k} \geqslant \frac{p-1}{k} m_{p-1} \geqslant \frac{p-1}{k} & \cdot \frac{p-a}{p-(p-1)} m_{a} \\
& \geqslant \frac{p-1}{k} \cdot(p-k+1)(k-1) \geqslant \frac{k-1}{k} \cdot(p-1)(p-q) \geqslant \frac{1}{2} \cdot \frac{p^{2}-1}{2}
\end{aligned}
$$

which contradicts (1) again.
Comment 1. The argument in Case 2, after a slight modification of estimates at the end, applies as soon as there exists $k<\frac{3(p+1)}{4}$ with $a_{k}<a_{p-1}$. However, this argument does not seem to work if there is no such $k$.

Comment 2. If $p$ is small enough, then one can color $\{1,2, \ldots, N+1\}$ so that there exist numbers $m_{1}$, $m_{2}, \ldots, m_{p-1}$ satisfying $r\left(p m_{a}\right)=a / p$. For $p=3,5,7$, one can find colorings providing the following sequences:

$$
\left(m_{1}, m_{2}\right)=(1,2), \quad\left(m_{1}, m_{2}, m_{3}, m_{4}\right)=(1,2,3,6), \quad \text { and } \quad\left(m_{1}, \ldots, m_{6}\right)=(1,2,3,4,6,12)
$$

respectively.
Thus, for small values of $p$, the number $N$ in the problem statement cannot be increased. However, a careful analysis of the estimates shows that this number can be slightly increased for $p \geqslant 11$.

C6. $4 n$ coins of weights $1,2,3, \ldots, 4 n$ are given. Each coin is colored in one of $n$ colors and there are four coins of each color. Show that all these coins can be partitioned into two sets with the same total weight, such that each set contains two coins of each color.
(Hungary)
Solution 1. Let us pair the coins with weights summing up to $4 n+1$, resulting in the set $S$ of $2 n$ pairs: $\{1,4 n\},\{2,4 n-1\}, \ldots,\{2 n, 2 n+1\}$. It suffices to partition $S$ into two sets, each consisting of $n$ pairs, such that each set contains two coins of each color.

Introduce a multi-graph $G$ (i.e., a graph with loops and multiple edges allowed) on $n$ vertices, so that each vertex corresponds to a color. For each pair of coins from $S$, we add an edge between the vertices corresponding to the colors of those coins. Note that each vertex has degree 4. Also, a desired partition of the coins corresponds to a coloring of the edges of $G$ in two colors, say red and blue, so that each vertex has degree 2 with respect to each color (i.e., each vertex has equal red and blue degrees).

To complete the solution, it suffices to provide such a coloring for each component $G^{\prime}$ of $G$. Since all degrees of the vertices are even, in $G^{\prime}$ there exists an Euler circuit $C$ (i.e., a circuit passing through each edge of $G^{\prime}$ exactly once). Note that the number of edges in $C$ is even (it equals twice the number of vertices in $G^{\prime}$ ). Hence all the edges can be colored red and blue so that any two edges adjacent in $C$ have different colors (one may move along $C$ and color the edges one by one alternating red and blue colors). Thus in $G^{\prime}$ each vertex has equal red and blue degrees, as desired.

Comment 1. To complete Solution 1, any partition of the edges of $G$ into circuits of even lengths could be used. In the solution above it was done by the reference to the well-known Euler Circuit Lemma: Let $G$ be a connected graph with all its vertices of even degrees. Then there exists a circuit passing through each edge of $G$ exactly once.

Solution 2. As in Solution 1, we will show that it is possible to partition $2 n$ pairs $\{1,4 n\}$, $\{2,4 n-1\}, \ldots,\{2 n, 2 n+1\}$ into two sets, each consisting of $n$ pairs, such that each set contains two coins of each color.

Introduce a multi-graph (i.e., a graph with multiple edges allowed) $\Gamma$ whose vertices correspond to coins; thus we have $4 n$ vertices of $n$ colors so that there are four vertices of each color. Connect pairs of vertices $\{1,4 n\},\{2,4 n-1\}, \ldots,\{2 n, 2 n+1\}$ by $2 n$ black edges.

Further, for each monochromatic quadruple of vertices $i, j, k, \ell$ we add a pair of grey edges forming a matching, e.g., $(i, j)$ and $(k, \ell)$. In each of $n$ colors of coins we can choose one of three possible matchings; this results in $3^{n}$ ways of constructing grey edges. Let us call each of $3^{n}$ possible graphs $\Gamma$ a cyclic graph. Note that in a cyclic graph $\Gamma$ each vertex has both black and grey degrees equal to 1 . Hence $\Gamma$ is a union of disjoint cycles, and in each cycle black and grey edges alternate (in particular, all cycles have even lengths).

It suffices to find a cyclic graph with all its cycle lengths divisible by 4 . Indeed, in this case, for each cycle we start from some vertex, move along the cycle and recolor the black edges either to red or to blue, alternating red and blue colors. Now blue and red edges define the required partition, since for each monochromatic quadruple of vertices the grey edges provide a bijection between the endpoints of red and blue edges.

Among all possible cyclic graphs, let us choose graph $\Gamma_{0}$ having the minimal number of components (i.e., cycles). The following claim completes the solution.
Claim. In $\Gamma_{0}$, all cycle lengths are divisible by 4.
Proof. Assuming the contrary, choose a cycle $C_{1}$ with an odd number of grey edges. For some color $c$ the cycle $C_{1}$ contains exactly one grey edge joining two vertices $i, j$ of color $c$, while the other edge joining two vertices $k, \ell$ of color $c$ lies in another cycle $C_{2}$. Now delete edges $(i, j)$ and $(k, \ell)$ and add edges $(i, k)$ and $(j, \ell)$. By this switch we again obtain a cyclic graph $\Gamma_{0}^{\prime}$ and decrease the number of cycles by 1 . This contradicts the choice of $\Gamma_{0}$.

Comment 2. Use of an auxiliary graph and reduction to a new problem in terms of this graph is one of the crucial steps in both solutions presented. In fact, graph $G$ from Solution 1 could be obtained from any graph $\Gamma$ from Solution 2 by merging the vertices of the same color.

C7. Consider any rectangular table having finitely many rows and columns, with a real number $a(r, c)$ in the cell in row $r$ and column $c$. A pair $(R, C)$, where $R$ is a set of rows and $C$ a set of columns, is called a saddle pair if the following two conditions are satisfied:
(i) For each row $r^{\prime}$, there is $r \in R$ such that $a(r, c) \geqslant a\left(r^{\prime}, c\right)$ for all $c \in C$;
(ii) For each column $c^{\prime}$, there is $c \in C$ such that $a(r, c) \leqslant a\left(r, c^{\prime}\right)$ for all $r \in R$.

A saddle pair $(R, C)$ is called a minimal pair if for each saddle pair ( $R^{\prime}, C^{\prime}$ ) with $R^{\prime} \subseteq R$ and $C^{\prime} \subseteq C$, we have $R^{\prime}=R$ and $C^{\prime}=C$.

Prove that any two minimal pairs contain the same number of rows.
(Thailand)
Solution 1. We say that a pair $\left(R^{\prime}, C^{\prime}\right)$ of nonempty sets is a subpair of a pair $(R, C)$ if $R^{\prime} \subseteq R$ and $C^{\prime} \subseteq C$. The subpair is proper if at least one of the inclusions is strict.

Let $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ be two saddle pairs with $\left|R_{1}\right|>\left|R_{2}\right|$. We will find a saddle subpair ( $R^{\prime}, C^{\prime}$ ) of ( $R_{1}, C_{1}$ ) with $\left|R^{\prime}\right| \leqslant\left|R_{2}\right|$; clearly, this implies the desired statement.
Step 1: We construct maps $\rho: R_{1} \rightarrow R_{1}$ and $\sigma: C_{1} \rightarrow C_{1}$ such that $\left|\rho\left(R_{1}\right)\right| \leqslant\left|R_{2}\right|$, and $a\left(\rho\left(r_{1}\right), c_{1}\right) \geqslant a\left(r_{1}, \sigma\left(c_{1}\right)\right)$ for all $r_{1} \in R_{1}$ and $c_{1} \in C_{1}$.

Since $\left(R_{1}, C_{1}\right)$ is a saddle pair, for each $r_{2} \in R_{2}$ there is $r_{1} \in R_{1}$ such that $a\left(r_{1}, c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right)$ for all $c_{1} \in C_{1}$; denote one such an $r_{1}$ by $\rho_{1}\left(r_{2}\right)$. Similarly, we define four functions

$$
\begin{array}{llllll}
\rho_{1}: R_{2} \rightarrow R_{1} & \text { such that } & a\left(\rho_{1}\left(r_{2}\right), c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right) & \text { for all } & r_{2} \in R_{2}, & c_{1} \in C_{1} ; \\
\rho_{2}: R_{1} \rightarrow R_{2} & \text { such that } & a\left(\rho_{2}\left(r_{1}\right), c_{2}\right) \geqslant a\left(r_{1}, c_{2}\right) & \text { for all } & r_{1} \in R_{1}, & c_{2} \in C_{2} ; \\
\sigma_{1}: C_{2} \rightarrow C_{1} & \text { such that } & a\left(r_{1}, \sigma_{1}\left(c_{2}\right)\right) \leqslant a\left(r_{1}, c_{2}\right) & \text { for all } & r_{1} \in R_{1}, & c_{2} \in C_{2} ; \\
\sigma_{2}: C_{1} \rightarrow C_{2} & \text { such that } & a\left(r_{2}, \sigma_{2}\left(c_{1}\right)\right) \leqslant a\left(r_{2}, c_{1}\right) & \text { for all } & r_{2} \in R_{2}, & c_{1} \in C_{1} .
\end{array}
$$

Set now $\rho=\rho_{1} \circ \rho_{2}: R_{1} \rightarrow R_{1}$ and $\sigma=\sigma_{1} \circ \sigma_{2}: C_{1} \rightarrow C_{1}$. We have

$$
\left|\rho\left(R_{1}\right)\right|=\left|\rho_{1}\left(\rho_{2}\left(R_{1}\right)\right)\right| \leqslant\left|\rho_{1}\left(R_{2}\right)\right| \leqslant\left|R_{2}\right| .
$$

Moreover, for all $r_{1} \in R_{1}$ and $c_{1} \in C_{1}$, we get

$$
\begin{aligned}
a\left(\rho\left(r_{1}\right), c_{1}\right)=a\left(\rho_{1}\left(\rho_{2}\left(r_{1}\right)\right), c_{1}\right) \geqslant a\left(\rho_{2}\left(r_{1}\right), c_{1}\right) & \geqslant a\left(\rho_{2}\left(r_{1}\right), \sigma_{2}\left(c_{1}\right)\right) \\
& \geqslant a\left(r_{1}, \sigma_{2}\left(c_{1}\right)\right) \geqslant a\left(r_{1}, \sigma_{1}\left(\sigma_{2}\left(c_{1}\right)\right)\right)=a\left(r_{1}, \sigma\left(c_{1}\right)\right)
\end{aligned}
$$

as desired.
Step 2: Given maps $\rho$ and $\sigma$, we construct a proper saddle subpair $\left(R^{\prime}, C^{\prime}\right)$ of $\left(R_{1}, C_{1}\right)$.
The properties of $\rho$ and $\sigma$ yield that

$$
a\left(\rho^{i}\left(r_{1}\right), c_{1}\right) \geqslant a\left(\rho^{i-1}\left(r_{1}\right), \sigma\left(c_{1}\right)\right) \geqslant \ldots \geqslant a\left(r_{1}, \sigma^{i}\left(c_{1}\right)\right)
$$

for each positive integer $i$ and all $r_{1} \in R_{1}, c_{1} \in C_{1}$.
Consider the images $R^{i}=\rho^{i}\left(R_{1}\right)$ and $C^{i}=\sigma^{i}\left(C_{1}\right)$. Clearly, $R_{1}=R^{0} \supseteq R^{1} \supseteq R^{2} \supseteq \ldots$ and $C_{1}=C^{0} \supseteq C^{1} \supseteq C^{2} \supseteq \ldots$. Since both chains consist of finite sets, there is an index $n$ such that $R^{n}=R^{n+1}=\ldots$ and $C^{n}=C^{n+1}=\ldots$. Then $\rho^{n}\left(R^{n}\right)=R^{2 n}=R^{n}$, so $\rho^{n}$ restricted to $R^{n}$ is a bijection. Similarly, $\sigma^{n}$ restricted to $C^{n}$ is a bijection from $C^{n}$ to itself. Therefore, there exists a positive integer $k$ such that $\rho^{n k}$ acts identically on $R^{n}$, and $\sigma^{n k}$ acts identically on $C^{n}$.

We claim now that $\left(R^{n}, C^{n}\right)$ is a saddle subpair of $\left(R_{1}, C_{1}\right)$, with $\left|R^{n}\right| \leqslant\left|R^{1}\right|=\left|\rho\left(R_{1}\right)\right| \leqslant$ $\left|R_{2}\right|$, which is what we needed. To check that this is a saddle pair, take any row $r^{\prime}$; since $\left(R_{1}, C_{1}\right)$ is a saddle pair, there exists $r_{1} \in R_{1}$ such that $a\left(r_{1}, c_{1}\right) \geqslant a\left(r^{\prime}, c_{1}\right)$ for all $c_{1} \in C_{1}$. Set now $r_{*}=\rho^{n k}\left(r_{1}\right) \in R^{n}$. Then, for each $c \in C^{n}$ we have $c=\sigma^{n k}(c)$ and hence

$$
a\left(r_{*}, c\right)=a\left(\rho^{n k}\left(r_{1}\right), c\right) \geqslant a\left(r_{1}, \sigma^{n k}(c)\right)=a\left(r_{1}, c\right) \geqslant a\left(r^{\prime}, c\right)
$$

which establishes condition $(i)$. Condition (ii) is checked similarly.

Solution 2. Denote by $\mathcal{R}$ and $\mathcal{C}$ the set of all rows and the set of all columns of the table, respectively. Let $\mathcal{T}$ denote the given table; for a set $R$ of rows and a set $C$ of columns, let $\mathcal{T}[R, C]$ denote the subtable obtained by intersecting rows from $R$ and columns from $C$.

We say that row $r_{1}$ exceeds row $r_{2}$ in range of columns $C$ (where $C \subseteq \mathcal{C}$ ) and write $r_{1} \succeq_{C} r_{2}$ or $r_{2} \leq_{C} r_{1}$, if $a\left(r_{1}, c\right) \geqslant a\left(r_{2}, c\right)$ for all $c \in C$. We say that a row $r_{1}$ is equal to a row $r_{2}$ in range of columns $C$ and write $r_{1} \equiv_{C} r_{2}$, if $a\left(r_{1}, c\right)=a\left(r_{2}, c\right)$ for all $c \in C$. We introduce similar notions, and use the same notation, for columns. Then conditions ( $i$ ) and (ii) in the definition of a saddle pair can be written as $(i)$ for each $r^{\prime} \in \mathcal{R}$ there exists $r \in R$ such that $r \geq_{C} r^{\prime}$; and (ii) for each $c^{\prime} \in \mathcal{C}$ there exists $c \in C$ such that $c \leq_{R} c^{\prime}$.

Lemma. Suppose that $(R, C)$ is a minimal pair. Remove from the table several rows outside of $R$ and/or several columns outside of $C$. Then $(R, C)$ remains a minimal pair in the new table.
Proof. Obviously, $(R, C)$ remains a saddle pair. Suppose $\left(R^{\prime}, C^{\prime}\right)$ is a proper subpair of $(R, C)$. Since $(R, C)$ is a saddle pair, for each row $r^{*}$ of the initial table, there is a row $r \in R$ such that $r \geq_{C} r^{*}$. If ( $R^{\prime}, C^{\prime}$ ) became saddle after deleting rows not in $R$ and/or columns not in $C$, there would be a row $r^{\prime} \in R^{\prime}$ satisfying $r^{\prime} \geq_{C^{\prime}} r$. Therefore, we would obtain that $r^{\prime} \geq_{C^{\prime \prime}} r^{*}$, which is exactly condition $(i)$ for the pair ( $R^{\prime}, C^{\prime}$ ) in the initial table; condition (ii) is checked similarly. Thus, ( $\left.R^{\prime}, C^{\prime}\right)$ was saddle in the initial table, which contradicts the hypothesis that $(R, C)$ was minimal. Hence, $(R, C)$ remains minimal after deleting rows and/or columns.

By the Lemma, it suffices to prove the statement of the problem in the case $\mathcal{R}=R_{1} \cup R_{2}$ and $\mathcal{C}=C_{1} \cup C_{2}$. Further, suppose that there exist rows that belong both to $R_{1}$ and $R_{2}$. Duplicate every such row, and refer one copy of it to the set $R_{1}$, and the other copy to the set $R_{2}$. Then $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ will remain minimal pairs in the new table, with the same numbers of rows and columns, but the sets $R_{1}$ and $R_{2}$ will become disjoint. Similarly duplicating columns in $C_{1} \cap C_{2}$, we make $C_{1}$ and $C_{2}$ disjoint. Thus it is sufficient to prove the required statement in the case $R_{1} \cap R_{2}=\varnothing$ and $C_{1} \cap C_{2}=\varnothing$.

The rest of the solution is devoted to the proof of the following claim including the statement of the problem.
Claim. Suppose that $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are minimal pairs in table $\mathcal{T}$ such that $R_{2}=\mathcal{R} \backslash R_{1}$ and $C_{2}=\mathcal{C} \backslash C_{1}$. Then $\left|R_{1}\right|=\left|R_{2}\right|,\left|C_{1}\right|=\left|C_{2}\right| ;$ moreover, there are four bijections

$$
\begin{array}{llllll}
\rho_{1}: R_{2} \rightarrow R_{1} & \text { such that } & \rho_{1}\left(r_{2}\right) \equiv_{C_{1}} r_{2} & \text { for all } & r_{2} \in R_{2} ; \\
\rho_{2}: R_{1} \rightarrow R_{2} & \text { such that } & \rho_{2}\left(r_{1}\right) \equiv_{C_{2}} r_{1} & \text { for all } & r_{1} \in R_{1} ; \\
\sigma_{1}: C_{2} \rightarrow C_{1} & \text { such that } & \sigma_{1}\left(c_{2}\right) \equiv_{R_{1}} c_{2} & \text { for all } & c_{2} \in C_{2} ; \\
\sigma_{2}: C_{1} \rightarrow C_{2} & \text { such that } & \sigma_{2}\left(c_{1}\right) \equiv_{R_{2}} c_{1} & \text { for all } & c_{1} \in C_{1} .
\end{array}
$$

We prove the Claim by induction on $|\mathcal{R}|+|\mathcal{C}|$. In the base case we have $\left|R_{1}\right|=\left|R_{2}\right|=$ $\left|C_{1}\right|=\left|C_{2}\right|=1$; let $R_{i}=\left\{r_{i}\right\}$ and $C_{i}=\left\{c_{i}\right\}$. Since $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are saddle pairs, we have $a\left(r_{1}, c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right) \geqslant a\left(r_{2}, c_{2}\right) \geqslant a\left(r_{1}, c_{2}\right) \geqslant a\left(r_{1}, c_{1}\right)$, hence, the table consists of four equal numbers, and the statement follows.

To prove the inductive step, introduce the maps $\rho_{1}, \rho_{2}, \sigma_{1}$, and $\sigma_{2}$ as in Solution 1 , see (1). Suppose first that all four maps are surjective. Then, in fact, we have $\left|R_{1}\right|=\left|R_{2}\right|,\left|C_{1}\right|=\left|C_{2}\right|$, and all maps are bijective. Moreover, for all $r_{2} \in R_{2}$ and $c_{2} \in C_{2}$ we have

$$
\begin{aligned}
a\left(r_{2}, c_{2}\right) \leqslant a\left(r_{2}, \sigma_{2}^{-1}\left(c_{2}\right)\right) \leqslant a\left(\rho_{1}\left(r_{2}\right), \sigma_{2}^{-1}\left(c_{2}\right)\right) \leqslant a\left(\rho_{1}\left(r_{2}\right)\right. & \left., \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right) \\
& \leqslant a\left(\rho_{2} \circ \rho_{1}\left(r_{2}\right), \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right)
\end{aligned}
$$

Summing up, we get

$$
\sum_{\substack{r_{2} \in R_{2} \\ c_{2} \in C_{2}}} a\left(r_{2}, c_{2}\right) \leqslant \sum_{\substack{r_{2} \in R_{2} \\ c_{2} \in C_{2}}} a\left(\rho_{2} \circ \rho_{1}\left(r_{2}\right), \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right) .
$$

Since $\rho_{1} \circ \rho_{2}$ and $\sigma_{1}^{-1} \circ \sigma_{2}^{-1}$ are permutations of $R_{2}$ and $C_{2}$, respectively, this inequality is in fact equality. Therefore, all inequalities in (4) turn into equalities, which establishes the inductive step in this case.

It remains to show that all four maps are surjective. For the sake of contradiction, we assume that $\rho_{1}$ is not surjective. Now let $R_{1}^{\prime}=\rho_{1}\left(R_{2}\right)$ and $C_{1}^{\prime}=\sigma_{1}\left(C_{2}\right)$, and set $R^{*}=R_{1} \backslash R_{1}^{\prime}$ and $C^{*}=C_{1} \backslash C_{1}^{\prime}$. By our assumption, $R^{*} \neq \varnothing$.

Let $\mathcal{Q}$ be the table obtained from $\mathcal{T}$ by removing the rows in $R^{*}$ and the columns in $C^{*}$; in other words, $\mathcal{Q}=\mathcal{T}\left[R_{1}^{\prime} \cup R_{2}, C_{1}^{\prime} \cup C_{2}\right]$. By the definition of $\rho_{1}$, for each $r_{2} \in R_{2}$ we have $\rho_{1}\left(r_{2}\right) \geq_{C_{1}} r_{2}$, so a fortiori $\rho_{1}\left(r_{2}\right) \geq_{C_{1}^{\prime}} r_{2}$; moreover, $\rho_{1}\left(r_{2}\right) \in R_{1}^{\prime}$. Similarly, $C_{1}^{\prime} \ni \sigma_{1}\left(c_{2}\right) \leq_{R_{1}^{\prime}} c_{2}$ for each $c_{2} \in C_{2}$. This means that $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a saddle pair in $\mathcal{Q}$. Recall that $\left(R_{2}, C_{2}\right)$ remains a minimal pair in $\mathcal{Q}$, due to the Lemma.

Therefore, $\mathcal{Q}$ admits a minimal pair $\left(\bar{R}_{1}, \bar{C}_{1}\right)$ such that $\bar{R}_{1} \subseteq R_{1}^{\prime}$ and $\bar{C}_{1} \subseteq C_{1}^{\prime}$. For a minute, confine ourselves to the subtable $\overline{\mathcal{Q}}=\mathcal{Q}\left[\bar{R}_{1} \cup R_{2}, \bar{C}_{1} \cup C_{2}\right]$. By the Lemma, the pairs $\left(\bar{R}_{1}, \bar{C}_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are also minimal in $\overline{\mathcal{Q}}$. By the inductive hypothesis, we have $\left|R_{2}\right|=\left|\bar{R}_{1}\right| \leqslant\left|R_{1}^{\prime}\right|=\left|\rho_{1}\left(R_{2}\right)\right| \leqslant\left|R_{2}\right|$, so all these inequalities are in fact equalities. This implies that $\bar{R}_{2}=R_{2}^{\prime}$ and that $\rho_{1}$ is a bijection $R_{2} \rightarrow R_{1}^{\prime}$. Similarly, $\bar{C}_{1}=C_{1}^{\prime}$, and $\sigma_{1}$ is a bijection $C_{2} \rightarrow C_{1}^{\prime}$. In particular, $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a minimal pair in $\mathcal{Q}$.

Now, by inductive hypothesis again, we have $\left|R_{1}^{\prime}\right|=\left|R_{2}\right|,\left|C_{1}^{\prime}\right|=\left|C_{2}\right|$, and there exist four bijections

$$
\begin{array}{ccccc}
\rho_{1}^{\prime}: R_{2} \rightarrow R_{1}^{\prime} & \text { such that } & \rho_{1}^{\prime}\left(r_{2}\right) \equiv_{C_{1}^{\prime}} r_{2} & \text { for all } & r_{2} \in R_{2} ; \\
\rho_{2}^{\prime}: R_{1}^{\prime} \rightarrow R_{2} & \text { such that } & \rho_{2}^{\prime}\left(r_{1}\right) \equiv_{C_{2}} r_{1} & \text { for all } & r_{1} \in R_{1}^{\prime} ; \\
\sigma_{1}^{\prime}: C_{2} \rightarrow C_{1}^{\prime} & \text { such that } & \sigma_{1}^{\prime}\left(c_{2}\right) \equiv_{R_{1}^{\prime}} c_{2} & \text { for all } & c_{2} \in C_{2} ; \\
\sigma_{2}^{\prime}: C_{1}^{\prime} \rightarrow C_{2} & \text { such that } & \sigma_{2}^{\prime}\left(c_{1}\right) \equiv_{R_{2}} c_{1} & \text { for all } & c_{1} \in C_{1}^{\prime} .
\end{array}
$$

Notice here that $\sigma_{1}$ and $\sigma_{1}^{\prime}$ are two bijections $C_{2} \rightarrow C_{1}^{\prime}$ satisfying $\sigma_{1}^{\prime}\left(c_{2}\right) \equiv_{R_{1}^{\prime}} c_{2} \geq_{R_{1}} \sigma_{1}\left(c_{2}\right)$ for all $c_{2} \in C_{2}$. Now, if $\sigma_{1}^{\prime}\left(c_{2}\right) \neq \sigma_{1}\left(c_{2}\right)$ for some $c_{2} \in C_{2}$, then we could remove column $\sigma_{1}^{\prime}\left(c_{2}\right)$ from $C_{1}^{\prime}$ obtaining another saddle pair $\left(R_{1}^{\prime}, C_{1}^{\prime} \backslash\left\{\sigma_{1}^{\prime}\left(c_{2}\right)\right\}\right)$ in $\mathcal{Q}$. This is impossible for a minimal pair $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$; hence the maps $\sigma_{1}$ and $\sigma_{1}^{\prime}$ coincide.

Now we are prepared to show that $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a saddle pair in $\mathcal{T}$, which yields a desired contradiction (since ( $R_{1}, C_{1}$ ) is not minimal). By symmetry, it suffices to find, for each $r^{\prime} \in \mathcal{R}$, a row $r_{1} \in R_{1}^{\prime}$ such that $r_{1} \geq_{C_{1}^{\prime}} r^{\prime}$. If $r^{\prime} \in R_{2}$, then we may put $r_{1}=\rho_{1}\left(r^{\prime}\right)$; so, in the sequel we assume $r^{\prime} \in R_{1}$.

There exists $r_{2} \in R_{2}$ such that $r^{\prime} \leq_{C_{2}} r_{2}$; set $r_{1}=\left(\rho_{2}^{\prime}\right)^{-1}\left(r_{2}\right) \in R_{1}^{\prime}$ and recall that $r_{1} \equiv_{C_{2}}$ $r_{2} \geq_{C_{2}} r^{\prime}$. Therefore, implementing the bijection $\sigma_{1}=\sigma_{1}^{\prime}$, for each $c_{1} \in C_{1}^{\prime}$ we get

$$
a\left(r^{\prime}, c_{1}\right) \leqslant a\left(r^{\prime}, \sigma_{1}^{-1}\left(c_{1}\right)\right) \leqslant a\left(r_{1}, \sigma_{1}^{-1}\left(c_{1}\right)\right)=a\left(r_{1}, \sigma_{1}^{\prime} \circ \sigma_{1}^{-1}\left(c_{1}\right)\right)=a\left(r_{1}, c_{1}\right)
$$

which shows $r^{\prime} \leq_{C_{1}^{\prime}} r_{1}$, as desired. The inductive step is completed.
Comment 1. For two minimal pairs $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$, Solution 2 not only proves the required equalities $\left|R_{1}\right|=\left|R_{2}\right|$ and $\left|C_{1}\right|=\left|C_{2}\right|$, but also shows the existence of bijections (3). In simple words, this means that the four subtables $\mathcal{T}\left[R_{1}, C_{1}\right], \mathcal{T}\left[R_{1}, C_{2}\right], \mathcal{T}\left[R_{2}, C_{1}\right]$, and $\mathcal{T}\left[R_{2}, C_{2}\right]$ differ only by permuting rows/columns. Notice that the existence of such bijections immediately implies that $\left(R_{1}, C_{2}\right)$ and $\left(R_{2}, C_{1}\right)$ are also minimal pairs.

This stronger claim may also be derived directly from the arguments in Solution 1, even without the assumptions $R_{1} \cap R_{2}=\varnothing$ and $C_{1} \cap C_{2}=\varnothing$. Indeed, if $\left|R_{1}\right|=\left|R_{2}\right|$ and $\left|C_{1}\right|=\left|C_{2}\right|$, then similar arguments show that $R^{n}=R_{1}, C^{n}=C_{1}$, and for any $r \in R^{n}$ and $c \in C^{n}$ we have

$$
a(r, c)=a\left(\rho^{n k}(r), c\right) \geqslant a\left(\rho^{n k-1}(r), \sigma(c)\right) \geqslant \ldots \geqslant a\left(r, \sigma^{n k}(c)\right)=a(r, c) .
$$

This yields that all above inequalities turn into equalities. Moreover, this yields that all inequalities in (2) turn into equalities. Hence $\rho_{1}, \rho_{2}, \sigma_{1}$, and $\sigma_{2}$ satisfy (3).

It is perhaps worth mentioning that one cannot necessarily find the maps in (3) so as to satisfy $\rho_{1}=\rho_{2}^{-1}$ and $\sigma_{1}=\sigma_{2}^{-1}$, as shown by the table below.

| 1 | 0 | 0 | 1 |
| :--- | :--- | :--- | :--- |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |

Comment 2. One may use the following, a bit more entertaining formulation of the same problem.
On a specialized market, a finite number of products are being sold, and there are finitely many retailers each selling all the products by some prices. Say that retailer $r_{1}$ dominates retailer $r_{2}$ with respect to a set of products $P$ if $r_{1}$ 's price of each $p \in P$ does not exceed $r_{2}$ 's price of $p$. Similarly, product $p_{1}$ exceeds product $p_{2}$ with respect to a set of retailers $R$, if $r$ 's price of $p_{1}$ is not less than $r$ 's price of $p_{2}$, for each $r \in R$.

Say that a set $R$ of retailers and a set $P$ of products form a saddle pair if for each retailer $r^{\prime}$ there is $r \in R$ dominating $r^{\prime}$ with respect to $P$, and for each product $p^{\prime}$ there is $p \in P$ exceeding $p^{\prime}$ with respect to $R$. A saddle pair $(R, P)$ is called a minimal pair if for each saddle pair $\left(R^{\prime}, P^{\prime}\right)$ with $R^{\prime} \subseteq R$ and $P^{\prime} \subseteq P$, we have $R^{\prime}=R$ and $P^{\prime}=P$.

Prove that any two minimal pairs contain the same number of retailers.

## C8. Players $A$ and $B$ play a game on a blackboard that initially contains 2020 copies

of the number 1. In every round, player $A$ erases two numbers $x$ and $y$ from the blackboard, and then player $B$ writes one of the numbers $x+y$ and $|x-y|$ on the blackboard. The game terminates as soon as, at the end of some round, one of the following holds:
(1) one of the numbers on the blackboard is larger than the sum of all other numbers;
(2) there are only zeros on the blackboard.

Player $B$ must then give as many cookies to player $A$ as there are numbers on the blackboard. Player $A$ wants to get as many cookies as possible, whereas player $B$ wants to give as few as possible. Determine the number of cookies that $A$ receives if both players play optimally.
(Austria)

## Answer: 7.

Solution. For a positive integer $n$, we denote by $S_{2}(n)$ the sum of digits in its binary representation. We prove that, in fact, if a board initially contains an even number $n>1$ of ones, then A can guarantee to obtain $S_{2}(n)$, but not more, cookies. The binary representation of 2020 is $2020=\overline{11111100100}_{2}$, so $S_{2}(2020)=7$, and the answer follows.

A strategy for $A$. At any round, while possible, A chooses two equal nonzero numbers on the board. Clearly, while $A$ can make such choice, the game does not terminate. On the other hand, $A$ can follow this strategy unless the game has already terminated. Indeed, if $A$ always chooses two equal numbers, then each number appearing on the board is either 0 or a power of 2 with non-negative integer exponent, this can be easily proved using induction on the number of rounds. At the moment when $A$ is unable to follow the strategy all nonzero numbers on the board are distinct powers of 2 . If the board contains at least one such power, then the largest of those powers is greater than the sum of the others. Otherwise there are only zeros on the blackboard, in both cases the game terminates.

For every number on the board, define its range to be the number of ones it is obtained from. We can prove by induction on the number of rounds that for any nonzero number $k$ written by $B$ its range is $k$, and for any zero written by $B$ its range is a power of 2 . Thus at the end of each round all the ranges are powers of two, and their sum is $n$. Since $S_{2}(a+b) \leqslant S_{2}(a)+S_{2}(b)$ for any positive integers $a$ and $b$, the number $n$ cannot be represented as a sum of less than $S_{2}(n)$ powers of 2 . Thus at the end of each round the board contains at least $S_{2}(n)$ numbers, while $A$ follows the above strategy. So $A$ can guarantee at least $S_{2}(n)$ cookies for himself.

Comment. There are different proofs of the fact that the presented strategy guarantees at least $S_{2}(n)$ cookies for $A$. For instance, one may denote by $\Sigma$ the sum of numbers on the board, and by $z$ the number of zeros. Then the board contains at least $S_{2}(\Sigma)+z$ numbers; on the other hand, during the game, the number $S_{2}(\Sigma)+z$ does not decrease, and its initial value is $S_{2}(n)$. The claim follows.

A strategy for $B$. Denote $s=S_{2}(n)$.
Let $x_{1}, \ldots, x_{k}$ be the numbers on the board at some moment of the game after $B$ 's turn or at the beginning of the game. Say that a collection of $k$ signs $\varepsilon_{1}, \ldots, \varepsilon_{k} \in\{+1,-1\}$ is balanced if

$$
\sum_{i=1}^{k} \varepsilon_{i} x_{i}=0
$$

We say that a situation on the board is good if $2^{s+1}$ does not divide the number of balanced collections. An appropriate strategy for $B$ can be explained as follows: Perform a move so that the situation remains good, while it is possible. We intend to show that in this case $B$ will not lose more than $S_{2}(n)$ cookies. For this purpose, we prove several lemmas.

For a positive integer $k$, denote by $\nu_{2}(k)$ the exponent of the largest power of 2 that divides $k$. Recall that, by Legendre's formula, $\nu_{2}(n!)=n-S_{2}(n)$ for every positive integer $n$.

Lemma 1. The initial situation is good.
Proof. In the initial configuration, the number of balanced collections is equal to $\binom{n}{n / 2}$. We have

$$
\nu_{2}\left(\binom{n}{n / 2}\right)=\nu_{2}(n!)-2 \nu_{2}((n / 2)!)=\left(n-S_{2}(n)\right)-2\left(\frac{n}{2}-S_{2}(n / 2)\right)=S_{2}(n)=s
$$

Hence $2^{\text {s+1 }}$ does not divide the number of balanced collections, as desired.
Lemma 2. B may play so that after each round the situation remains good.
Proof. Assume that the situation $\left(x_{1}, \ldots, x_{k}\right)$ before a round is good, and that $A$ erases two numbers, $x_{p}$ and $x_{q}$.

Let $N$ be the number of all balanced collections, $N_{+}$be the number of those having $\varepsilon_{p}=\varepsilon_{q}$, and $N_{-}$be the number of other balanced collections. Then $N=N_{+}+N_{-}$. Now, if $B$ replaces $x_{p}$ and $x_{q}$ by $x_{p}+x_{q}$, then the number of balanced collections will become $N_{+}$. If $B$ replaces $x_{p}$ and $x_{q}$ by $\left|x_{p}-x_{q}\right|$, then this number will become $N_{-}$. Since $2^{s+1}$ does not divide $N$, it does not divide one of the summands $N_{+}$and $N_{-}$, hence $B$ can reach a good situation after the round.
Lemma 3. Assume that the game terminates at a good situation. Then the board contains at most $s$ numbers.
Proof. Suppose, one of the numbers is greater than the sum of the other numbers. Then the number of balanced collections is 0 and hence divisible by $2^{s+1}$. Therefore, the situation is not good.

Then we have only zeros on the blackboard at the moment when the game terminates. If there are $k$ of them, then the number of balanced collections is $2^{k}$. Since the situation is good, we have $k \leqslant s$.

By Lemmas 1 and 2, $B$ may act in such way that they keep the situation good. By Lemma 3, when the game terminates, the board contains at most $s$ numbers. This is what we aimed to prove.

Comment 1. If the initial situation had some odd number $n>1$ of ones on the blackboard, player $A$ would still get $S_{2}(n)$ cookies, provided that both players act optimally. The proof of this fact is similar to the solution above, after one makes some changes in the definitions. Such changes are listed below.

Say that a collection of $k$ signs $\varepsilon_{1}, \ldots, \varepsilon_{k} \in\{+1,-1\}$ is positive if

$$
\sum_{i=1}^{k} \varepsilon_{i} x_{i}>0
$$

For every index $i=1,2, \ldots, k$, we denote by $N_{i}$ the number of positive collections such that $\varepsilon_{i}=1$. Finally, say that a situation on the board is good if $2^{s-1}$ does not divide at least one of the numbers $N_{i}$. Now, a strategy for $B$ again consists in preserving the situation good, after each round.

Comment 2. There is an easier strategy for $B$, allowing, in the game starting with an even number $n$ of ones, to lose no more than $d=\left\lfloor\log _{2}(n+2)\right\rfloor-1$ cookies. If the binary representation of $n$ contains at most two zeros, then $d=S_{2}(n)$, and hence the strategy is optimal in that case. We outline this approach below.

First of all, we can assume that $A$ never erases zeros from the blackboard. Indeed, $A$ may skip such moves harmlessly, ignoring the zeros in the further process; this way, $A$ 's win will just increase.

We say that a situation on the blackboard is pretty if the numbers on the board can be partitioned into two groups with equal sums. Clearly, if the situation before some round is pretty, then $B$ may play so as to preserve this property after the round. The strategy for $B$ is as follows:

- $B$ always chooses a move that leads to a pretty situation.
- If both possible moves of $B$ lead to pretty situations, then $B$ writes the sum of the two numbers erased by $A$.
Since the situation always remains pretty, the game terminates when all numbers on the board are zeros.

Suppose that, at the end of the game, there are $m \geqslant d+1=\left\lfloor\log _{2}(n+2)\right\rfloor$ zeros on the board; then $2^{m}-1>n / 2$.

Now we analyze the whole process of the play. Let us number the zeros on the board in order of appearance. During the play, each zero had appeared after subtracting two equal numbers. Let $n_{1}, \ldots, n_{m}$ be positive integers such that the first zero appeared after subtracting $n_{1}$ from $n_{1}$, the second zero appeared after subtracting $n_{2}$ from $n_{2}$, and so on. Since the sum of the numbers on the blackboard never increases, we have $2 n_{1}+\ldots+2 n_{m} \leqslant n$, hence

$$
n_{1}+\ldots+n_{m} \leqslant n / 2<2^{m}-1
$$

There are $2^{m}$ subsets of the set $\{1,2, \ldots, m\}$. For $I \subseteq\{1,2, \ldots, m\}$, denote by $f(I)$ the sum $\sum_{i \in I} n_{i}$. There are less than $2^{m}$ possible values for $f(I)$, so there are two distinct subsets $I$ and $J$ with $f(I)=f(J)$. Replacing $I$ and $J$ with $I \backslash J$ and $J \backslash I$, we assume that $I$ and $J$ are disjoint.

Let $i_{0}$ be the smallest number in $I \cup J$; without loss of generality, $i_{0} \in I$. Consider the round when $A$ had erased two numbers equal to $n_{i_{0}}$, and $B$ had put the $i_{0}{ }^{\text {th }}$ zero instead, and the situation before that round.

For each nonzero number $z$ which is on the blackboard at this moment, we can keep track of it during the further play until it enters one of the numbers $n_{i}, i \geqslant i_{0}$, which then turn into zeros. For every $i=i_{0}, i_{0}+1, \ldots, m$, we denote by $X_{i}$ the collection of all numbers on the blackboard that finally enter the first copy of $n_{i}$, and by $Y_{i}$ the collection of those finally entering the second copy of $n_{i}$. Thus, each of $X_{i_{0}}$ and $Y_{i_{0}}$ consists of a single number. Since $A$ never erases zeros, the 2(m-iol $i_{0}$ ) defined sets are pairwise disjoint.

Clearly, for either of the collections $X_{i}$ and $Y_{i}$, a signed sum of its elements equals $n_{i}$, for a proper choice of the signs. Therefore, for every $i=i_{0}, i_{0}+1, \ldots, m$ one can endow numbers in $X_{i} \cup Y_{i}$ with signs so that their sum becomes any of the numbers $-2 n_{i}, 0$, or $2 n_{i}$. Perform such endowment so as to get $2 n_{i}$ from each collection $X_{i} \cup Y_{i}$ with $i \in I,-2 n_{j}$ from each collection $X_{j} \cup Y_{j}$ with $j \in J$, and 0 from each remaining collection. The obtained signed sum of all numbers on the blackboard equals

$$
\sum_{i \in I} 2 n_{i}-\sum_{i \in J} 2 n_{i}=0
$$

and the numbers in $X_{i_{0}}$ and $Y_{i_{0}}$ have the same (positive) sign.
This means that, at this round, $B$ could add up the two numbers $n_{i_{0}}$ to get a pretty situation. According to the strategy, $B$ should have performed that, instead of subtracting the numbers. This contradiction shows that $m \leqslant d$, as desired.

This page is intentionally left blank

## Geometry

G1. Let $A B C$ be an isosceles triangle with $B C=C A$, and let $D$ be a point inside side $A B$ such that $A D<D B$. Let $P$ and $Q$ be two points inside sides $B C$ and $C A$, respectively, such that $\angle D P B=\angle D Q A=90^{\circ}$. Let the perpendicular bisector of $P Q$ meet line segment $C Q$ at $E$, and let the circumcircles of triangles $A B C$ and $C P Q$ meet again at point $F$, different from $C$.

Suppose that $P, E, F$ are collinear. Prove that $\angle A C B=90^{\circ}$.
(Luxembourg)
Solution 1. Let $\ell$ be the perpendicular bisector of $P Q$, and denote by $\omega$ the circle $C F P Q$. By $D P \perp B C$ and $D Q \perp A C$, the circle $\omega$ passes through $D$; moreover, $C D$ is a diameter of $\omega$.

The lines $Q E$ and $P E$ are symmetric about $\ell$, and $\ell$ is a symmetry axis of $\omega$ as well; it follows that the chords $C Q$ and $F P$ are symmetric about $\ell$, hence $C$ and $F$ are symmetric about $\ell$. Therefore, the perpendicular bisector of $C F$ coincides with $\ell$. Thus $\ell$ passes through the circumcenter $O$ of $A B C$.

Let $M$ be the midpoint of $A B$. Since $C M \perp D M, M$ also lies on $\omega$. By $\angle A C M=\angle B C M$, the chords $M P$ and $M Q$ of $\omega$ are equal. Then, from $M P=M Q$ it follows that $\ell$ passes through $M$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-50.jpg?height=661&width=1206&top_left_y=1223&top_left_x=428)

Finally, both $O$ and $M$ lie on lines $\ell$ and $C M$, therefore $O=M$, and $\angle A C B=90^{\circ}$ follows.
Solution 2. Like in the first solution, we conclude that points $C, P, Q, D, F$ and the midpoint $M$ of $A B$ lie on one circle $\omega$ with diameter $C D$, and $M$ lies on $\ell$, the perpendicular bisector of $P Q$.

Let $B F$ and $C M$ meet at $G$ and let $\alpha=\angle A B F$. Then, since $E$ lies on $\ell$, and the quadrilaterals $F C B A$ and $F C P Q$ are cyclic, we have

$$
\angle C Q P=\angle F P Q=\angle F C Q=\angle F C A=\angle F B A=\alpha .
$$

Since points $P, E, F$ are collinear, we have

$$
\angle F E M=\angle F E Q+\angle Q E M=2 \alpha+\left(90^{\circ}-\alpha\right)=90^{\circ}+\alpha
$$

But $\angle F G M=90^{\circ}+\alpha$, so $F E G M$ is cyclic. Hence

$$
\angle E G C=\angle E F M=\angle P F M=\angle P C M
$$

Thus $G E \| B C$. It follows that $\angle F A C=\angle C B F=\angle E G F$, so $F E G A$ is cyclic, too. Hence $\angle A C B=\angle A F B=\angle A F G=180^{\circ}-\angle A M G=90^{\circ}$, that completes the proof.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-51.jpg?height=658&width=1209&top_left_y=202&top_left_x=429)

Comment 1. The converse statement is true: if $\angle A C B=90^{\circ}$ then points $P, E$ and $F$ are collinear. This direction is easier to prove.

Comment 2. The statement of the problem remains true if the projection $P$ of $D$ onto $B C$ lies outside line segment $B C$. The restriction that $P$ lies inside line segment $B C$ is given to reduce case-sensitivity.

G2. Let $A B C D$ be a convex quadrilateral. Suppose that $P$ is a point in the interior of $A B C D$ such that

$$
\angle P A D: \angle P B A: \angle D P A=1: 2: 3=\angle C B P: \angle B A P: \angle B P C .
$$

The internal bisectors of angles $A D P$ and $P C B$ meet at a point $Q$ inside the triangle $A B P$. Prove that $A Q=B Q$.
(Poland)
Solution 1. Let $\varphi=\angle P A D$ and $\psi=\angle C B P$; then we have $\angle P B A=2 \varphi, \angle D P A=3 \varphi$, $\angle B A P=2 \psi$ and $\angle B P C=3 \psi$. Let $X$ be the point on segment $A D$ with $\angle X P A=\varphi$. Then

$$
\angle P X D=\angle P A X+\angle X P A=2 \varphi=\angle D P A-\angle X P A=\angle D P X .
$$

It follows that triangle $D P X$ is isosceles with $D X=D P$ and therefore the internal angle bisector of $\angle A D P$ coincides with the perpendicular bisector of $X P$. Similarly, if $Y$ is a point on $B C$ such that $\angle B P Y=\psi$, then the internal angle bisector of $\angle P C B$ coincides with the perpendicular bisector of $P Y$. Hence, we have to prove that the perpendicular bisectors of $X P$, $P Y$, and $A B$ are concurrent.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-52.jpg?height=652&width=704&top_left_y=1162&top_left_x=679)

Notice that

$$
\angle A X P=180^{\circ}-\angle P X D=180^{\circ}-2 \varphi=180^{\circ}-\angle P B A .
$$

Hence the quadrilateral $A X P B$ is cyclic; in other words, $X$ lies on the circumcircle of triangle $A P B$. Similarly, $Y$ lies on the circumcircle of triangle $A P B$. It follows that the perpendicular bisectors of $X P, P Y$, and $A B$ all pass through the center of circle $(A B Y P X)$. This finishes the proof.

Comment. Introduction of points $X$ and $Y$ seems to be the key step in the solution above. Note that the same point $X$ could be introduced in different ways, e.g., as the point on the ray $C P$ beyond $P$ such that $\angle P B X=\varphi$, or as a point where the circle $(A P B)$ meets again $A B$. Different definitions of $X$ could lead to different versions of the further solution.

Solution 2. We define the angles $\varphi=\angle P A D, \psi=\angle C B P$ and use $\angle P B A=2 \varphi, \angle D P A=$ $3 \varphi, \angle B A P=2 \psi$ and $\angle B P C=3 \psi$ again. Let $O$ be the circumcenter of $\triangle A P B$.

Notice that $\angle A D P=180^{\circ}-\angle P A D-\angle D P A=180^{\circ}-4 \varphi$, which, in particular, means that $4 \varphi<180^{\circ}$. Further, $\angle P O A=2 \angle P B A=4 \varphi=180^{\circ}-\angle A D P$, therefore the quadrilateral $A D P O$ is cyclic. By $A O=O P$, it follows that $\angle A D O=\angle O D P$. Thus $D O$ is the internal bisector of $\angle A D P$. Similarly, $C O$ is the internal bisector of $\angle P C B$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-53.jpg?height=678&width=1026&top_left_y=192&top_left_x=515)

Finally, $O$ lies on the perpendicular bisector of $A B$ as it is the circumcenter of $\triangle A P B$. Therefore the three given lines in the problem statement concur at point $O$.

## G3. Let $A B C D$ be a convex quadrilateral with $\angle A B C>90^{\circ}, \angle C D A>90^{\circ}$, and

$\angle D A B=\angle B C D$. Denote by $E$ and $F$ the reflections of $A$ in lines $B C$ and $C D$, respectively. Suppose that the segments $A E$ and $A F$ meet the line $B D$ at $K$ and $L$, respectively. Prove that the circumcircles of triangles $B E K$ and $D F L$ are tangent to each other.
(Slovakia)
Solution 1. Denote by $A^{\prime}$ the reflection of $A$ in $B D$. We will show that that the quadrilaterals $A^{\prime} B K E$ and $A^{\prime} D L F$ are cyclic, and their circumcircles are tangent to each other at point $A^{\prime}$.

From the symmetry about line $B C$ we have $\angle B E K=\angle B A K$, while from the symmetry in $B D$ we have $\angle B A K=\angle B A^{\prime} K$. Hence $\angle B E K=\angle B A^{\prime} K$, which implies that the quadrilateral $A^{\prime} B K E$ is cyclic. Similarly, the quadrilateral $A^{\prime} D L F$ is also cyclic.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-54.jpg?height=632&width=1229&top_left_y=818&top_left_x=419)

For showing that circles $A^{\prime} B K E$ and $A^{\prime} D L F$ are tangent it suffices to prove that

$$
\angle A^{\prime} K B+\angle A^{\prime} L D=\angle B A^{\prime} D .
$$

Indeed, by $A K \perp B C$, $A L \perp C D$, and again the symmetry in $B D$ we have

$$
\angle A^{\prime} K B+\angle A^{\prime} L D=180^{\circ}-\angle K A^{\prime} L=180^{\circ}-\angle K A L=\angle B C D=\angle B A D=\angle B A^{\prime} D,
$$

as required.
Comment 1. The key to the solution above is introducing the point $A^{\prime}$; then the angle calculations can be done in many different ways.

Solution 2. Note that $\angle K A L=180^{\circ}-\angle B C D$, since $A K$ and $A L$ are perpendicular to $B C$ and $C D$, respectively. Reflect both circles $(B E K)$ and $(D F L)$ in $B D$. Since $\angle K E B=\angle K A B$ and $\angle D F L=\angle D A L$, the images are the circles $(K A B)$ and $(L A D)$, respectively; so they meet at $A$. We need to prove that those two reflections are tangent at $A$.

For this purpose, we observe that

$$
\angle A K B+\angle A L D=180^{\circ}-\angle K A L=\angle B C D=\angle B A D .
$$

Thus, there exists a ray $A P$ inside angle $\angle B A D$ such that $\angle B A P=\angle A K B$ and $\angle D A P=$ $\angle D L A$. Hence the line $A P$ is a common tangent to the circles $(K A B)$ and $(L A D)$, as desired.

Comment 2. The statement of the problem remains true for a more general configuration, e.g., if line $B D$ intersect the extension of segment $A E$ instead of the segment itself, etc. The corresponding restrictions in the statement are given to reduce case sensitivity.

G4. In the plane, there are $n \geqslant 6$ pairwise disjoint disks $D_{1}, D_{2}, \ldots, D_{n}$ with radii $R_{1} \geqslant R_{2} \geqslant \ldots \geqslant R_{n}$. For every $i=1,2, \ldots, n$, a point $P_{i}$ is chosen in disk $D_{i}$. Let $O$ be an arbitrary point in the plane. Prove that

$$
O P_{1}+O P_{2}+\ldots+O P_{n} \geqslant R_{6}+R_{7}+\ldots+R_{n}
$$

(A disk is assumed to contain its boundary.)
(Iran)
Solution. We will make use of the following lemma.
Lemma. Let $D_{1}, \ldots, D_{6}$ be disjoint disks in the plane with radii $R_{1}, \ldots, R_{6}$. Let $P_{i}$ be a point in $D_{i}$, and let $O$ be an arbitrary point. Then there exist indices $i$ and $j$ such that $O P_{i} \geqslant R_{j}$. Proof. Let $O_{i}$ be the center of $D_{i}$. Consider six rays $O O_{1}, \ldots, O O_{6}$ (if $O=O_{i}$, then the ray $O O_{i}$ may be assumed to have an arbitrary direction). These rays partition the plane into six angles (one of which may be non-convex) whose measures sum up to $360^{\circ}$; hence one of the angles, say $\angle O_{i} O O_{j}$, has measure at most $60^{\circ}$. Then $O_{i} O_{j}$ cannot be the unique largest side in (possibly degenerate) triangle $O O_{i} O_{j}$, so, without loss of generality, $O O_{i} \geqslant O_{i} O_{j} \geqslant R_{i}+R_{j}$. Therefore, $O P_{i} \geqslant O O_{i}-R_{i} \geqslant\left(R_{i}+R_{j}\right)-R_{i}=R_{j}$, as desired.

Now we prove the required inequality by induction on $n \geqslant 5$. The base case $n=5$ is trivial. For the inductive step, apply the Lemma to the six largest disks, in order to find indices $i$ and $j$ such that $1 \leqslant i, j \leqslant 6$ and $O P_{i} \geqslant R_{j} \geqslant R_{6}$. Removing $D_{i}$ from the configuration and applying the inductive hypothesis, we get

$$
\sum_{k \neq i} O P_{k} \geqslant \sum_{\ell \geqslant 7} R_{\ell} .
$$

Adding up this inequality with $O P_{i} \geqslant R_{6}$ we establish the inductive step.
Comment 1. It is irrelevant to the problem whether the disks contain their boundaries or not. This condition is included for clarity reasons only. The problem statement remains true, and the solution works verbatim, if the disks are assumed to have disjoint interiors.

Comment 2. There are several variations of the above solution. In particular, while performing the inductive step, one may remove the disk with the largest value of $O P_{i}$ and apply the inductive hypothesis to the remaining disks (the Lemma should still be applied to the six largest disks).

Comment 3. While proving the Lemma, one may reduce it to a particular case when the disks are congruent, as follows: Choose the smallest radius $r$ of the disks in the Lemma statement, and then replace, for each $i$, the $i^{\text {th }}$ disk with its homothetic copy, using the homothety centered at $P_{i}$ with ratio $r / R_{i}$.

This argument shows that the Lemma is tightly connected to a circle packing problem, see, e.g., https://en.wikipedia.org/wiki/Circle_packing_in_a_circle. The known results on that problem provide versions of the Lemma for different numbers of disks, which lead to different inequalities of the same kind. E.g., for 4 disks the best possible estimate in the Lemma is $O P_{i} \geqslant(\sqrt{2}-1) R_{j}$, while for 13 disks it has the form $O P_{i} \geqslant \sqrt{5} R_{j}$. Arguing as in the above solution, one obtains the inequalities

$$
\sum_{i=1}^{n} O P_{i} \geqslant(\sqrt{2}-1) \sum_{j=4}^{n} R_{j} \quad \text { and } \quad \sum_{i=1}^{n} O P_{i} \geqslant \sqrt{5} \sum_{j=13}^{n} R_{j} .
$$

However, there are some harder arguments which allow to improve these inequalities, meaning that the $R_{j}$ with large indices may be taken with much greater factors.

## G5. Let $A B C D$ be a cyclic quadrilateral with no two sides parallel. Let $K, L, M$, and $N$

be points lying on sides $A B, B C, C D$, and $D A$, respectively, such that $K L M N$ is a rhombus with $K L \| A C$ and $L M \| B D$. Let $\omega_{1}, \omega_{2}, \omega_{3}$, and $\omega_{4}$ be the incircles of triangles $A N K$, $B K L, C L M$, and $D M N$, respectively. Prove that the internal common tangents to $\omega_{1}$ and $\omega_{3}$ and the internal common tangents to $\omega_{2}$ and $\omega_{4}$ are concurrent.
(Poland)
Solution 1. Let $I_{i}$ be the center of $\omega_{i}$, and let $r_{i}$ be its radius for $i=1,2,3,4$. Denote by $T_{1}$ and $T_{3}$ the points of tangency of $\omega_{1}$ and $\omega_{3}$ with $N K$ and $L M$, respectively. Suppose that the internal common tangents to $\omega_{1}$ and $\omega_{3}$ meet at point $S$, which is the center of homothety $h$ with negative ratio (namely, with ratio $-\frac{r_{3}}{r_{1}}$ ) mapping $\omega_{1}$ to $\omega_{3}$. This homothety takes $T_{1}$ to $T_{3}$ (since the tangents to $\omega_{1}$ and $\omega_{3}$ at $T_{1}$ to $T_{3}$ are parallel), hence $S$ is a point on the segment $T_{1} T_{3}$ with $T_{1} S: S T_{3}=r_{1}: r_{3}$.

Construct segments $S_{1} S_{3} \| K L$ and $S_{2} S_{4} \| L M$ through $S$ with $S_{1} \in N K, S_{2} \in K L$, $S_{3} \in L M$, and $S_{4} \in M N$. Note that $h$ takes $S_{1}$ to $S_{3}$, hence $I_{1} S_{1} \| I_{3} S_{3}$, and $S_{1} S: S S_{3}=r_{1}: r_{3}$. We will prove that $S_{2} S: S S_{4}=r_{2}: r_{4}$ or, equivalently, $K S_{1}: S_{1} N=r_{2}: r_{4}$. This will yield the problem statement; indeed, applying similar arguments to the intersection point $S^{\prime}$ of the internal common tangents to $\omega_{2}$ and $\omega_{4}$, we see that $S^{\prime}$ satisfies similar relations, and there is a unique point inside $K L M N$ satisfying them. Therefore, $S^{\prime}=S$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-56.jpg?height=670&width=1409&top_left_y=1207&top_left_x=326)

Further, denote by $I_{A}, I_{B}, I_{C}, I_{D}$ and $r_{A}, r_{B}, r_{C}, r_{D}$ the incenters and inradii of triangles $D A B, A B C, B C D$, and $C D A$, respectively. One can shift triangle $C L M$ by $\overrightarrow{L K}$ to glue it with triangle $A K N$ into a quadrilateral $A K C^{\prime} N$ similar to $A B C D$. In particular, this shows that $r_{1}: r_{3}=r_{A}: r_{C}$; similarly, $r_{2}: r_{4}=r_{B}: r_{D}$. Moreover, the same shift takes $S_{3}$ to $S_{1}$, and it also takes $I_{3}$ to the incenter $I_{3}^{\prime}$ of triangle $K C^{\prime} N$. Since $I_{1} S_{1} \| I_{3} S_{3}$, the points $I_{1}, S_{1}, I_{3}^{\prime}$ are collinear. Thus, in order to complete the solution, it suffices to apply the following Lemma to quadrilateral $A K C^{\prime} N$.
Lemma 1. Let $A B C D$ be a cyclic quadrilateral, and define $I_{A}, I_{C}, r_{B}$, and $r_{D}$ as above. Let $I_{A} I_{C}$ meet $B D$ at $X$; then $B X: X D=r_{B}: r_{D}$.
Proof. Consider an inversion centered at $X$; the images under that inversion will be denoted by primes, e.g., $A^{\prime}$ is the image of $A$.

By properties of inversion, we have

$$
\angle I_{C}^{\prime} I_{A}^{\prime} D^{\prime}=\angle X I_{A}^{\prime} D^{\prime}=\angle X D I_{A}=\angle B D A / 2=\angle B C A / 2=\angle A C I_{B}
$$

We obtain $\angle I_{A}^{\prime} I_{C}^{\prime} D^{\prime}=\angle C A I_{B}$ likewise; therefore, $\triangle I_{C}^{\prime} I_{A}^{\prime} D^{\prime} \sim \triangle A C I_{B}$. In the same manner, we get $\triangle I_{C}^{\prime} I_{A}^{\prime} B^{\prime} \sim \triangle A C I_{D}$, hence the quadrilaterals $I_{C}^{\prime} B^{\prime} I_{A}^{\prime} D^{\prime}$ and $A I_{D} C I_{B}$ are also similar. But the diagonals $A C$ and $I_{B} I_{D}$ of quadrilateral $A I_{D} C I_{B}$ meet at a point $Y$ such that $I_{B} Y$ :
$Y I_{D}=r_{B}: r_{D}$. By similarity, we get $D^{\prime} X: B^{\prime} X=r_{B}: r_{D}$ and hence $B X: X D=D^{\prime} X:$ $B^{\prime} X=r_{B}: r_{D}$.

Comment 1. The solution above shows that the problem statement holds also for any parallelogram $K L M N$ whose sides are parallel to the diagonals of $A B C D$, as no property specific for a rhombus has been used. This solution works equally well when two sides of quadrilateral $A B C D$ are parallel.

Comment 2. The problem may be reduced to Lemma 1 by using different tools, e.g., by using mass point geometry, linear motion of $K, L, M$, and $N$, etc.

Lemma 1 itself also can be proved in different ways. We present below one alternative proof.
Proof. In the circumcircle of $A B C D$, let $K^{\prime}, L^{\prime} . M^{\prime}$, and $N^{\prime}$ be the midpoints of arcs $A B, B C$, $C D$, and $D A$ containing no other vertices of $A B C D$, respectively. Thus, $K^{\prime}=C I_{B} \cap D I_{A}$, etc. In the computations below, we denote by $[P]$ the area of a polygon $P$. We use similarities $\triangle I_{A} B K^{\prime} \sim$ $\triangle I_{A} D N^{\prime}, \triangle I_{B} K^{\prime} L^{\prime} \sim \triangle I_{B} A C$, etc., as well as congruences $\triangle I_{B} K^{\prime} L^{\prime}=\triangle B K^{\prime} L^{\prime}$ and $\triangle I_{D} M^{\prime} N^{\prime}=$ $\triangle D M^{\prime} N^{\prime}$ (e.g., the first congruence holds because $K^{\prime} L^{\prime}$ is a common internal bisector of angles $B K^{\prime} I_{B}$ and $B L^{\prime} I_{B}$ ).

We have

$$
\begin{aligned}
& \frac{B X}{D X}=\frac{\left[I_{A} B I_{C}\right]}{\left[I_{A} D I_{C}\right]}=\frac{B I_{A} \cdot B I_{C} \cdot \sin I_{A} B I_{C}}{D I_{A} \cdot D I_{C} \cdot \sin I_{A} D I_{C}}=\frac{B I_{A}}{D I_{A}} \cdot \frac{B I_{C}}{D I_{C}} \cdot \frac{\sin N^{\prime} B M^{\prime}}{\sin K^{\prime} D L^{\prime}} \\
& =\frac{B K^{\prime}}{D N^{\prime}} \cdot \frac{B L^{\prime}}{D M^{\prime}} \cdot \frac{\sin N^{\prime} D M^{\prime}}{\sin K^{\prime} B L^{\prime}}=\frac{B K^{\prime} \cdot B L^{\prime} \cdot \sin K^{\prime} B L^{\prime}}{D N^{\prime} \cdot D M^{\prime} \cdot \sin N^{\prime} D M^{\prime}} \cdot \frac{\sin ^{2} N^{\prime} D M^{\prime}}{\sin ^{2} K^{\prime} B L^{\prime}} \\
& \quad=\frac{\left[K^{\prime} B L^{\prime}\right]}{\left[M^{\prime} D N^{\prime}\right]} \cdot \frac{N^{\prime} M^{\prime 2}}{K^{\prime} L^{\prime 2}}=\frac{\left[K^{\prime} I_{B} L^{\prime}\right] \cdot \frac{A^{\prime} C^{\prime 2}}{K^{\prime} L^{\prime 2}}}{\left[M^{\prime} I_{D} N^{\prime}\right] \cdot \frac{A^{\prime} C^{\prime 2}}{N^{\prime} M^{\prime 2}}}=\frac{\left[A I_{B} C\right]}{\left[A I_{D} C\right]}=\frac{r_{B}}{r_{D}},
\end{aligned}
$$

as required.
Solution 2. This solution is based on the following general Lemma.
Lemma 2. Let $E$ and $F$ be distinct points, and let $\omega_{i}, i=1,2,3,4$, be circles lying in the same halfplane with respect to $E F$. For distinct indices $i, j \in\{1,2,3,4\}$, denote by $O_{i j}^{+}$ (respectively, $O_{i j}^{-}$) the center of homothety with positive (respectively, negative) ratio taking $\omega_{i}$ to $\omega_{j}$. Suppose that $E=O_{12}^{+}=O_{34}^{+}$and $F=O_{23}^{+}=O_{41}^{+}$. Then $O_{13}^{-}=O_{24}^{-}$.
Proof. Applying Monge's theorem to triples of circles $\omega_{1}, \omega_{2}, \omega_{4}$ and $\omega_{1}, \omega_{3}, \omega_{4}$, we get that both points $O_{24}^{-}$and $O_{13}^{-}$lie on line $E O_{14}^{-}$. Notice that this line is distinct from $E F$. Similarly we obtain that both points $O_{24}^{-}$and $O_{13}^{-}$lie on $F O_{34}^{-}$. Since the lines $E O_{14}^{-}$and $F O_{34}^{-}$are distinct, both points coincide with the meeting point of those lines.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-57.jpg?height=716&width=1837&top_left_y=2073&top_left_x=108)

Turning back to the problem, let $A B$ intersect $C D$ at $E$ and let $B C$ intersect $D A$ at $F$. Assume, without loss of generality, that $B$ lies on segments $A E$ and $C F$. We will show that the points $E$ and $F$, and the circles $\omega_{i}$ satisfy the conditions of Lemma 2 , so the problem statement follows. In the sequel, we use the notation of $O_{i j}^{ \pm}$from the statement of Lemma 2, applied to circles $\omega_{1}, \omega_{2}, \omega_{3}$, and $\omega_{4}$.

Using the relations $\triangle E C A \sim \triangle E B D, K N \| B D$, and $M N \| A C$. we get

$$
\frac{A N}{N D}=\frac{A N}{A D} \cdot \frac{A D}{N D}=\frac{K N}{B D} \cdot \frac{A C}{N M}=\frac{A C}{B D}=\frac{A E}{E D}
$$

Therefore, by the angle bisector theorem, point $N$ lies on the internal angle bisector of $\angle A E D$. We prove similarly that $L$ also lies on that bisector, and that the points $K$ and $M$ lie on the internal angle bisector of $\angle A F B$.

Since $K L M N$ is a rhombus, points $K$ and $M$ are symmetric in line $E L N$. Hence, the convex quadrilateral determined by the lines $E K, E M, K L$, and $M L$ is a kite, and therefore it has an incircle $\omega_{0}$. Applying Monge's theorem to $\omega_{0}, \omega_{2}$, and $\omega_{3}$, we get that $O_{23}^{+}$lies on $K M$. On the other hand, $O_{23}^{+}$lies on $B C$, as $B C$ is an external common tangent to $\omega_{2}$ and $\omega_{3}$. It follows that $F=O_{23}^{+}$. Similarly, $E=O_{12}^{+}=O_{34}^{+}$, and $F=O_{41}^{+}$.

Comment 3. The reduction to Lemma 2 and the proof of Lemma 2 can be performed with the use of different tools, e.g., by means of Menelaus theorem, by projecting harmonic quadruples, by applying Monge's theorem in some other ways, etc.

This page is intentionally left blank

## G6. Let $I$ and $I_{A}$ be the incenter and the $A$-excenter of an acute-angled triangle $A B C$

with $A B<A C$. Let the incircle meet $B C$ at $D$. The line $A D$ meets $B I_{A}$ and $C I_{A}$ at $E$ and $F$, respectively. Prove that the circumcircles of triangles $A I D$ and $I_{A} E F$ are tangent to each other.
(Slovakia)
Solution 1. Let $\Varangle(p, q)$ denote the directed angle between lines $p$ and $q$.
The points $B, C, I$, and $I_{A}$ lie on the circle $\Gamma$ with diameter $I I_{A}$. Let $\omega$ and $\Omega$ denote the circles $\left(I_{A} E F\right)$ and $(A I D)$, respectively. Let $T$ be the second intersection point of $\omega$ and $\Gamma$. Then $T$ is the Miquel point of the complete quadrilateral formed by the lines $B C, B I_{A}, C I_{A}$, and $D E F$, so $T$ also lies on circle $(B D E)$ (as well as on circle $(C D F)$ ). We claim that $T$ is a desired tangency point of $\omega$ and $\Omega$.

In order to show that $T$ lies on $\Omega$, use cyclic quadrilaterals $B D E T$ and $B I I_{A} T$ to write

$$
\Varangle(D T, D A)=\Varangle(D T, D E)=\Varangle(B T, B E)=\Varangle\left(B T, B I_{A}\right)=\Varangle\left(I T, I I_{A}\right)=\Varangle(I T, I A) .
$$

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-60.jpg?height=1121&width=794&top_left_y=1047&top_left_x=651)

To show that $\omega$ and $\Omega$ are tangent at $T$, let $\ell$ be the tangent to $\omega$ at $T$, so that $\Varangle\left(T I_{A}, \ell\right)=$ $\Varangle\left(E I_{A}, E T\right)$. Using circles $(B D E T)$ and $\left(B I C I_{A}\right)$, we get

$$
\Varangle\left(E I_{A}, E T\right)=\Varangle(E B, E T)=\Varangle(D B, D T) .
$$

Therefore,

$$
\Varangle(T I, \ell)=90^{\circ}+\Varangle\left(T I_{A}, \ell\right)=90^{\circ}+\Varangle(D B, D T)=\Varangle(D I, D T),
$$

which shows that $\ell$ is tangent to $\Omega$ at $T$.
Solution 2. We use the notation of circles $\Gamma, \omega$, and $\Omega$ as in the previous solution.
Let $L$ be the point opposite to $I$ in circle $\Omega$. Then $\angle I A L=\angle I D L=90^{\circ}$, which means that $L$ is the foot of the external bisector of $\angle A$ in triangle $A B C$. Let $L I$ cross $\Gamma$ again at $M$.

Let $T$ be the foot of the perpendicular from $I$ onto $I_{A} L$. Then $T$ is the second intersection point of $\Gamma$ and $\Gamma$. We will show that $T$ is the desired tangency point.

First, we show that $T$ lies on circle $\omega$. Notice that

$$
\Varangle(L T, L M)=\Varangle(A T, A I) \quad \text { and } \quad \Varangle(M T, M L)=\Varangle(M T, M I)=\Varangle\left(I_{A} T, I_{A} I\right),
$$

which shows that triangles $T M L$ and $T I_{A} A$ are similar and equioriented. So there exists a rotational homothety $\tau$ mapping $T M L$ to $T I_{A} A$.

Since $\Varangle(M L, L D)=\Varangle(A I, A D)$, we get $\tau(B C)=A D$. Next, since

$$
\Varangle(M B, M L)=\Varangle(M B, M I)=\Varangle\left(I_{A} B, I_{A} I\right)=\Varangle\left(I_{A} E, I_{A} A\right),
$$

we get $\tau(B)=E$. Similarly, $\tau(C)=F$. Since the points $M, B, C$, and $T$ are concyclic, so are their $\tau$-images, which means that $T$ lies on $\omega=\tau(\Gamma)$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-61.jpg?height=1055&width=1400&top_left_y=909&top_left_x=334)

Finally, since $\tau(L)=A$ and $\tau(B)=E$, triangles $A T L$ and $E T B$ are similar so that

$$
\Varangle(A T, A L)=\Varangle(E T, E B)=\Varangle\left(E I_{A}, E T\right) .
$$

This means that the tangents to $\Omega$ and $\omega$ at $T$ make the same angle with the line $I_{A} T L$, so the circles are indeed tangent at $T$.

Comment. In both solutions above, a crucial step is a guess that the desired tangency point lies on $\Gamma$. There are several ways to recognize this helpful property.
E.g. one may perform some angle chasing to see that the tangents to $\Omega$ at $L$ and to $\omega$ at $I_{A}$ are parallel (and the circles lie on different sides of the tangents). This yields that, under the assumption that the circles are tangent externally, the tangency point must lie on $I_{A} L$. Since $I L$ is a diameter in $\Omega$, this, in turn, implies that $T$ is the projection of $I$ onto $I_{A} L$.

Another way to see the same fact is to perform a homothety centered at $A$ and mapping $I$ to $I_{A}$ (and $D$ to some point $D^{\prime}$ ). The image $\Omega^{\prime}$ of $\Omega$ is tangent to $\omega$ at $I_{A}$, because $\angle B I_{A} A+\angle C I_{A} D^{\prime}=180^{\circ}$. This yields that the tangents to $\Omega$ at $I$ and to $\omega$ at $I_{A}$ are parallel.

There are other ways to describe the tangency point. The next solution presents one of them.

Solution 3. We also use the notation of circles $\omega$, and $\Omega$ from the previous solutions.
Perform an inversion centered at $D$. The images of the points will be denoted by primes, e.g., $A^{\prime}$ is the image of $A$.

For convenience, we use the notation $\angle B I D=\beta, \angle C I D=\gamma$, and $\alpha=180^{\circ}-\beta-\gamma=$ $90^{\circ}-\angle B A I$. We start with computing angles appearing after inversion. We get

$$
\begin{gathered}
\angle D B^{\prime} I^{\prime}=\beta, \quad \angle D C^{\prime} I^{\prime}=\gamma, \quad \text { and hence } \angle B^{\prime} I^{\prime} C^{\prime}=\alpha ; \\
\angle E^{\prime} I_{A}^{\prime} F^{\prime}=\angle E^{\prime} I_{A}^{\prime} D-\angle F^{\prime} I_{A}^{\prime} D=\angle I_{A} E D-\angle I_{A} F D=\angle E I_{A} F=180^{\circ}-\alpha .
\end{gathered}
$$

Next, we have

$$
\angle A^{\prime} E^{\prime} B^{\prime}=\angle D E^{\prime} B^{\prime}=\angle D B E=\beta=90^{\circ}-\frac{\angle D B A}{2}=90^{\circ}-\frac{\angle E^{\prime} A^{\prime} B^{\prime}}{2}
$$

which yields that triangle $A^{\prime} B^{\prime} E^{\prime}$ is isosceles with $A^{\prime} B^{\prime}=A^{\prime} E^{\prime}$. Similarly, $A^{\prime} F^{\prime}=A^{\prime} C^{\prime}$.
Finally, we get

$$
\begin{aligned}
\angle A^{\prime} B^{\prime} I^{\prime}=\angle I^{\prime} B^{\prime} D-\angle A^{\prime} B^{\prime} D=\beta- & \angle B A D=\beta-\left(90^{\circ}-\alpha\right)+\angle I A D \\
& =\angle I C D+\angle I A D=\angle C^{\prime} I^{\prime} D+\angle A^{\prime} I^{\prime} D=\angle C^{\prime} I^{\prime} A^{\prime}
\end{aligned}
$$

similarly, $\angle A^{\prime} C^{\prime} I^{\prime}=\angle A^{\prime} I^{\prime} B^{\prime}$, so that triangles $A^{\prime} B^{\prime} I^{\prime}$ and $A^{\prime} I^{\prime} C^{\prime}$ are similar. Therefore, $A^{\prime} I^{\prime 2}=A^{\prime} B^{\prime} \cdot A^{\prime} C^{\prime}$.

Recall that we need to prove the tangency of line $A^{\prime} I^{\prime}=\Omega^{\prime}$ with circle $\left(E^{\prime} F^{\prime} I_{A}^{\prime}\right)=\omega^{\prime}$. A desired tangency point $T^{\prime}$ must satisfy $A^{\prime} T^{\prime 2}=A^{\prime} E^{\prime} \cdot A^{\prime} F^{\prime}$; the relations obtained above yield

$$
A^{\prime} E^{\prime} \cdot A^{\prime} F^{\prime}=A^{\prime} B^{\prime} \cdot A^{\prime} C^{\prime}=A^{\prime} I^{\prime 2}
$$

so that $T^{\prime}$ should be symmetric to $I^{\prime}$ with respect to $A^{\prime}$.
Thus, let us define a point $T^{\prime}$ as the reflection of $I^{\prime}$ in $A^{\prime}$, and show that $T^{\prime}$ lies on circle $\Omega^{\prime}$; the equalities above will then imply that $A^{\prime} T^{\prime}$ is tangent to $\Omega^{\prime}$, as desired.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-62.jpg?height=734&width=1156&top_left_y=1569&top_left_x=451)

The property that triangles $B^{\prime} A^{\prime} I^{\prime}$ and $I^{\prime} A^{\prime} C^{\prime}$ are similar means that quadrilateral $B^{\prime} I^{\prime} C^{\prime} T^{\prime}$ is harmonic. Indeed, let $C^{*}$ be the reflection of $C^{\prime}$ in the perpendicular bisector of $I^{\prime} T^{\prime}$; then $C^{*}$ lies on $B^{\prime} A^{\prime}$ by $\angle B^{\prime} A^{\prime} I^{\prime}=\angle A^{\prime} I^{\prime} C^{\prime}=\angle T^{\prime} I^{\prime} C^{*}$, and then $C^{*}$ lies on circle ( $I^{\prime} B^{\prime} T^{\prime}$ ) since $A^{\prime} B^{\prime} \cdot A^{\prime} C^{*}=A^{\prime} B^{\prime} \cdot A^{\prime} C^{\prime}=A^{\prime} I^{\prime 2}=A^{\prime} I^{\prime} \cdot A^{\prime} T^{\prime}$. Therefore, $C^{\prime}$ also lies on that circle (and the circle is $\left.\left(B^{\prime} I^{\prime} C^{\prime}\right)=\Gamma^{\prime}\right)$. Moreover, $B^{\prime} C^{*}$ is a median in triangle $B^{\prime} I^{\prime} T^{\prime}$, so $B^{\prime} C^{\prime}$ is its symmedian, which establishes harmonicity.

Now we have $\angle A^{\prime} B^{\prime} T^{\prime}=\angle I^{\prime} B^{\prime} C^{\prime}=\beta=\angle A^{\prime} B^{\prime} E^{\prime}$; which shows that $E^{\prime}$ lies on $B^{\prime} T^{\prime}$. Similarly, $F^{\prime}$ lies on $C^{\prime} T^{\prime}$. Hence, $\angle E^{\prime} T^{\prime} F^{\prime}=\angle B^{\prime} I^{\prime} C^{\prime}=180^{\circ}-\angle E^{\prime} I_{A}^{\prime} F^{\prime}$, which establishes $T^{\prime} \in \omega^{\prime}$.

Comment 2. The solution above could be finished without use of harmonicity. E.g., one may notice that both triangles $A^{\prime} T^{\prime} F^{\prime}$ and $A^{\prime} E^{\prime} T^{\prime}$ are similar to triangle $B^{\prime} I^{\prime} J$, where $J$ is the point symmetric to $I^{\prime}$ in the perpendicular bisector of $B^{\prime} C^{\prime}$; indeed, we have $\angle T^{\prime} A^{\prime} E^{\prime}=\gamma-\beta=\angle I^{\prime} B^{\prime} J^{\prime}$ and $\frac{B^{\prime} I^{\prime}}{B^{\prime} J}=\frac{B^{\prime} I^{\prime}}{C^{\prime} I}=$ $\frac{B^{\prime} A^{\prime}}{A^{\prime} I^{\prime}}=\frac{A^{\prime} E^{\prime}}{A^{\prime} T^{\prime}}$. This also allows to compute $\angle E^{\prime} T^{\prime} F^{\prime}=\angle E^{\prime} T^{\prime} A^{\prime}-\angle F^{\prime} T^{\prime} A^{\prime}=\angle I^{\prime} J B^{\prime}-\angle J I^{\prime} B^{\prime}=\alpha$.

Comment 3. Here we list several properties of the configuration in the problem, which can be derived from the solutions above.

The quadrilateral $I B T C$ (as well as $I^{\prime} B^{\prime} T^{\prime} C^{\prime}$ ) is harmonic. Hence, line $I T$ contains the meeting point of tangents to $\Gamma$ at $B$ and $C$, i.e., the midpoint $N$ of $\operatorname{arc} B A C$ in the circumcircle of $\triangle A B C$.

## G7. Let $P$ be a point on the circumcircle of an acute-angled triangle $A B C$. Let $D$,

$E$, and $F$ be the reflections of $P$ in the midlines of triangle $A B C$ parallel to $B C, C A$, and $A B$, respectively. Denote by $\omega_{A}, \omega_{B}$, and $\omega_{C}$ the circumcircles of triangles $A D P, B E P$, and $C F P$, respectively. Denote by $\omega$ the circumcircle of the triangle formed by the perpendicular bisectors of segments $A D, B E$ and $C F$.

Show that $\omega_{A}, \omega_{B}, \omega_{C}$, and $\omega$ have a common point.
(Denmark)
Solution. Let $A A_{1}, B B_{1}$, and $C C_{1}$ be the altitudes in triangle $A B C$, and let $m_{A}, m_{B}$, and $m_{C}$ be the midlines parallel to $B C, C A$, and $A B$, respectively. We always denote by $\Varangle(p, q)$ the directed angle from a line $p$ to a line $q$, taken modulo $180^{\circ}$.

Step 1: Circles $\omega_{A}, \omega_{B}$, and $\omega_{C}$ share a common point $Q$ different from $P$.
Notice that $m_{A}$ is the perpendicular bisector of $P D$, so $\omega_{A}$ is symmetric with respect to $m_{A}$. Since $A$ and $A_{1}$ are also symmetric to each other in $m_{A}$, the point $A_{1}$ lies on $\omega_{A}$. Similarly, $B_{1}$ and $C_{1}$ lie on $\omega_{B}$ and $\omega_{C}$, respectively.

Let $H$ be the orthocenter of $\triangle A B C$. Quadrilaterals $A B A_{1} B_{1}$ and $B C B_{1} C_{1}$ are cyclic, so $A H \cdot H A_{1}=B H \cdot H B_{1}=C H \cdot H C_{1}$. This means that $H$ lies on pairwise radical axes of $\omega_{A}$, $\omega_{B}$, and $\omega_{C}$. Point $P$ also lies on those radical axes; hence the three circles have a common radical axis $\ell=P H$, and the second meeting point $Q$ of $\ell$ with $\omega_{A}$ is the second common point of the three circles. Notice here that $H$ lies inside all three circles, hence $Q \neq P$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-64.jpg?height=931&width=1634&top_left_y=1282&top_left_x=215)

Step 2: Point $Q$ lies on $\omega$.
Let $p_{A}, p_{B}$, and $p_{C}$ denote the perpendicular bisectors of $A D, B E$, and $C F$, respectively; denote by $\Delta$ the triangle formed by those perpendicular bisectors. By Simson's theorem, in order to show that $Q$ lies on the circumcircle $\omega$ of $\Delta$, it suffices to prove that the projections of $Q$ onto the sidelines $p_{A}, p_{B}$, and $p_{C}$ are collinear. Alternatively, but equivalently, it suffices to prove that the reflections $Q_{A}, Q_{B}$, and $Q_{C}$ of $Q$ in those lines, respectively, are collinear. In fact, we will show that four points $P, Q_{A}, Q_{B}$, and $Q_{C}$ are collinear.

Since $p_{A}$ is the common perpendicular bisector of $A D$ and $Q Q_{A}$, the point $Q_{A}$ lies on $\omega_{A}$, and, moreover, $\Varangle\left(D A, D Q_{A}\right)=\Varangle(A Q, A D)$. Therefore,

$$
\Varangle\left(P A, P Q_{A}\right)=\Varangle\left(D A, D Q_{A}\right)=\Varangle(A Q, A D)=\Varangle(P Q, P D)=\Varangle(P Q, B C)+90^{\circ} .
$$

Similarly, we get $\Varangle\left(P B, P Q_{B}\right)=\Varangle(P Q, C A)+90^{\circ}$. Therefore,

$$
\begin{aligned}
\Varangle\left(P Q_{A}, P Q_{B}\right)=\Varangle\left(P Q_{A}, P A\right) & +\Varangle(P A, P B)+\Varangle\left(P B, P Q_{B}\right) \\
& =\Varangle(B C, P Q)+90^{\circ}+\Varangle(C A, C B)+\Varangle(P Q, C A)+90^{\circ}=0,
\end{aligned}
$$

which shows that $P, Q_{A}$, and $Q_{B}$ are collinear. Similarly, $Q_{C}$ also lies on $P Q_{A}$.
Comment 1. There are several variations of Step 2. In particular, let $O_{A}, O_{B}$, and $O_{C}$ denote the centers of $\omega_{A}, \omega_{B}$, and $\omega_{C}$, respectively; they lie on $p_{A}, p_{B}$, and $p_{C}$, respectively. Moreover, all those centers lie on the perpendicular bisector $p$ of $P Q$. Now one can show that $\Varangle\left(Q O_{A}, p_{A}\right)=$ $\Varangle\left(Q O_{B}, p_{B}\right)=\Varangle\left(Q O_{C}, p_{C}\right)$, and then finish by applying generalized Simson's theorem, Alternatively, but equivalently, those relations show that $Q$ is the Miquel point of the lines $p_{A}, p_{B}, p_{C}$, and $p$.

To establish $\Varangle\left(Q O_{A}, p_{A}\right)=\Varangle\left(Q O_{C}, p_{C}\right)$, notice that it is equivalent to $\Varangle\left(Q O_{A}, Q O_{C}\right)=\Varangle\left(p_{A}, p_{C}\right)$ which may be obtained, e.g., as follows:

$$
\begin{aligned}
& \Varangle\left(Q O_{A}, Q O_{C}\right)=\Varangle\left(Q O_{A}, p\right)+\Varangle\left(p, Q O_{C}\right)=\Varangle(A Q, A P)+\Varangle(C P, C Q) \\
& =\Varangle(A Q, C Q)+\Varangle(C P, A P)=\Varangle(A Q, P Q)+\Varangle(P Q, C Q)+\Varangle(C B, A B) \\
& \quad=\Varangle\left(A D, A A_{1}\right)+\Varangle\left(C C_{1}, C F\right)+\Varangle\left(A A_{1}, C C_{1}\right)=\Varangle(A D, C F)=\Varangle\left(p_{A}, p_{C}\right) .
\end{aligned}
$$

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-65.jpg?height=949&width=843&top_left_y=1145&top_left_x=612)

Comment 2. The inversion at $H$ with (negative) power $-A H \cdot H A_{1}$ maps $P$ to $Q$, and the circumcircle of $\triangle A B C$ to its Euler circle. Therefore, $Q$ lies on that Euler circle.

## G8. Let $\Gamma$ and $I$ be the circumcircle and the incenter of an acute-angled triangle $A B C$.

Two circles $\omega_{B}$ and $\omega_{C}$ passing through $B$ and $C$, respectively, are tangent at $I$. Let $\omega_{B}$ meet the shorter arc $A B$ of $\Gamma$ and segment $A B$ again at $P$ and $M$, respectively. Similarly, let $\omega_{C}$ meet the shorter arc $A C$ of $\Gamma$ and segment $A C$ again at $Q$ and $N$, respectively. The rays $P M$ and $Q N$ meet at $X$, and the tangents to $\omega_{B}$ and $\omega_{C}$ at $B$ and $C$, respectively, meet at $Y$.

Prove that the points $A, X$, and $Y$ are collinear.
(Netherlands)
Solution 1. Let $A I, B I$, and $C I$ meet $\Gamma$ again at $D, E$, and $F$, respectively. Let $\ell$ be the common tangent to $\omega_{B}$ and $\omega_{C}$ at $I$. We always denote by $\Varangle(p, q)$ the directed angle from a line $p$ to a line $q$, taken modulo $180^{\circ}$.

Step 1: We show that $Y$ lies on $\Gamma$.
Recall that any chord of a circle makes complementary directed angles with the tangents to the circle at its endpoints. Hence,

$$
\Varangle(B Y, B I)+\Varangle(C I, C Y)=\Varangle(I B, \ell)+\Varangle(\ell, I C)=\Varangle(I B, I C) .
$$

Therefore,

$$
\begin{aligned}
\Varangle(B Y, B A)+\Varangle(C A, C Y)=\Varangle(B I, B A)+ & \Varangle(B Y, B I)+\Varangle(C I, C Y)+\Varangle(C A, C I) \\
& =\Varangle(B C, B I)+\Varangle(I B, I C)+\Varangle(C I, C B)=0,
\end{aligned}
$$

which yields $Y \in \Gamma$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-66.jpg?height=932&width=1029&top_left_y=1481&top_left_x=519)

Step 2: We show that $X=\ell \cap E F$.
Let $X_{*}=\ell \cap E F$. To prove our claim, it suffices to show that $X_{*}$ lies on both $P M$ and $Q N$; this will yield $X_{*}=X$. Due to symmetry, it suffices to show $X_{*} \in Q N$.

Notice that

$$
\Varangle\left(I X_{*}, I Q\right)=\Varangle(C I, C Q)=\Varangle(C F, C Q)=\Varangle(E F, E Q)=\Varangle\left(E X_{*}, E Q\right) ;
$$

therefore, the points $X_{*}, I, Q$, and $E$ are concyclic (if $Q=E$, then the direction of $E Q$ is supposed to be the direction of a tangent to $\Gamma$ at $Q$; in this case, the equality means that the circle $\left(X_{*} I Q\right)$ is tangent to $\Gamma$ at $\left.Q\right)$. Then we have

$$
\Varangle\left(Q X_{*}, Q I\right)=\Varangle\left(E X_{*}, E I\right)=\Varangle(E F, E B)=\Varangle(C A, C F)=\Varangle(C N, C I)=\Varangle(Q N, Q I),
$$

which shows that $X_{*} \in Q N$.
Step 3: We finally show that $A, X$, and $Y$ are collinear.
Recall that $I$ is the orthocenter of triangle $D E F$, and $A$ is symmetric to $I$ with respect to $E F$. Therefore,

$$
\Varangle(A X, A E)=\Varangle(I E, I X)=\Varangle(B I, \ell)=\Varangle(B Y, B I)=\Varangle(B Y, B E)=\Varangle(A Y, A E),
$$

which yields the desired collinearity.
Comment 1. Step 2 in the above solution seems to be crucial. After it has been performed (even without Step 1), there are different ways of finishing the solution.
E.g., one may involve the notion of isogonal conjugacy. Let $X_{1}$ and $Y_{1}$ be isogonal conjugates of $X$ and $Y$, respectively, with respect to triangle $A B C$. Since $X A=X I$, triangle $A I X$ is isosceles, and hence the lines $A X$ and $X I$ form equal angles with the internal bisector $A I$ of $\angle B A C$. This means that $A X_{1} \| X I$, or $A X_{1} \| \ell$.

On the other hand, the lines $B Y$ and $\ell$ form equal angles with $B I$, so that $B Y_{1} \| \ell$. Similarly, $C Y_{1} \| \ell$. This means that $Y_{1}$ is an ideal point, and $A Y_{1} \| \ell$ as well. Therefore, points $A, X_{1}$, and $Y_{1}$ are collinear, and hence $A, X$, and $Y$ are such.

Solution 2. Perform an inversion centered at $I$; the images of the points are denoted by primes, e.g., $A^{\prime}$ is the image of $A$.

On the inverted figure, $I$ and $\Gamma^{\prime}$ are the orthocenter and the circumcircle of triangle $A^{\prime} B^{\prime} C^{\prime}$, respectively. The points $P^{\prime}$ and $Q^{\prime}$ lie on $\Gamma^{\prime}$ such that $B^{\prime} P^{\prime} \| C^{\prime} Q^{\prime}$ (since $B^{\prime} P^{\prime}=\omega_{B}^{\prime}$ and $C^{\prime} Q^{\prime}=\omega_{C}^{\prime}$ ). The points $M^{\prime}$ and $N^{\prime}$ are the second intersections of lines $B^{\prime} P^{\prime}$ and $C^{\prime} Q^{\prime}$ with the circumcircles $\gamma_{B}$ and $\gamma_{C}$ of triangles $A^{\prime} I B^{\prime}$ and $A^{\prime} I C^{\prime}$, respectively. Notice here that $\gamma_{C}$ is obtained from $\gamma_{B}$ by the translation at $\overrightarrow{B^{\prime} C^{\prime}}$; the same translation maps line $B^{\prime} P^{\prime}$ to $C^{\prime} Q^{\prime}$, and hence $M^{\prime}$ to $N^{\prime}$. In other words, $B^{\prime} M^{\prime} N^{\prime} C^{\prime}$ is a parallelogram, and $P^{\prime} Q^{\prime}$ partitions it into two isosceles trapezoids.

Point $X^{\prime}$ is the second intersection point of circles $\left(I P^{\prime} M^{\prime}\right)$ and $\left(I Q^{\prime} N^{\prime}\right)$ that is - the reflection of $I$ in their line of centers. But the centers lie on the common perpendicular bisector $p$ of $P^{\prime} M^{\prime}$ and $Q^{\prime} N^{\prime}$, so $p$ is that line of centers. Hence, $I X^{\prime} \| B^{\prime} P^{\prime}$, as both lines are perpendicular to $p$.

Finally, the point $Y$ satisfies $\Varangle(B Y, B I)=\Varangle(P B, P I)$ and $\Varangle(C Y, C I)=\Varangle(Q C, Q I)$, which yields $\Varangle\left(Y^{\prime} B^{\prime}, Y^{\prime} I\right)=\Varangle\left(B^{\prime} P^{\prime}, B^{\prime} I\right)$ and $\Varangle\left(Y^{\prime} C^{\prime}, Y^{\prime} I\right)=\Varangle\left(C^{\prime} Q^{\prime}, C^{\prime} I\right)$. Therefore,

$$
\Varangle\left(Y^{\prime} B^{\prime}, Y^{\prime} C^{\prime}\right)=\Varangle\left(B^{\prime} P^{\prime}, B^{\prime} I\right)+\Varangle\left(C^{\prime} I, C^{\prime} Q^{\prime}\right)=\Varangle\left(C^{\prime} I, B^{\prime} I\right)=\Varangle\left(A^{\prime} B^{\prime}, A^{\prime} C^{\prime}\right),
$$

which shows that $Y^{\prime} \in \Gamma^{\prime}$.
In congruent circles $\Gamma^{\prime}$ and $\gamma_{B}$, the chords $A^{\prime} P^{\prime}$ and $A^{\prime} M^{\prime}$ subtend the same angle $\angle A^{\prime} B^{\prime} P^{\prime}$; therefore, $A^{\prime} P^{\prime}=A^{\prime} M^{\prime}$, and hence $A^{\prime} \in p$. This yields $A^{\prime} X^{\prime}=A^{\prime} I$, and hence $\Varangle\left(I A^{\prime}, I X^{\prime}\right)=$ $\Varangle\left(X^{\prime} I, X^{\prime} A^{\prime}\right)$ 。

Finally, we have

$$
\begin{aligned}
\Varangle\left(Y^{\prime} I, Y^{\prime} A^{\prime}\right) & =\Varangle\left(Y^{\prime} I, Y^{\prime} B^{\prime}\right)+\Varangle\left(Y^{\prime} B^{\prime}, Y^{\prime} A^{\prime}\right) \\
& =\Varangle\left(B^{\prime} I, B^{\prime} P^{\prime}\right)+\Varangle\left(I A^{\prime}, I B^{\prime}\right)=\Varangle\left(I A^{\prime}, B^{\prime} P^{\prime}\right)=\Varangle\left(I A^{\prime}, I X^{\prime}\right)=\Varangle\left(X^{\prime} I, X^{\prime} A^{\prime}\right),
\end{aligned}
$$

which yields that the points $A^{\prime}, X^{\prime}, Y^{\prime}$, and $I$ are concyclic. This means exactly that $A, X$, and $Y$ are collinear.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-68.jpg?height=967&width=1560&top_left_y=199&top_left_x=248)

Comment 2. An inversion at $I$ may also help in establishing Step 2 in Solution 1. Indeed, relation $A^{\prime} X^{\prime}=A^{\prime} I$ yields $X A=X I$, so that $X \in E F$. On the other hand, $I X^{\prime} \| B^{\prime} P^{\prime}$ yields $I X \| \ell$, i.e., $X \in \ell$.

## G9.

Prove that there exists a positive constant $c$ such that the following statement is true:

Assume that $n$ is an integer with $n \geqslant 2$, and let $\mathcal{S}$ be a set of $n$ points in the plane such that the distance between any two distinct points in $\mathcal{S}$ is at least 1 . Then there is a line $\ell$ separating $\mathcal{S}$ such that the distance from any point of $\mathcal{S}$ to $\ell$ is at least $c n^{-1 / 3}$.
(A line $\ell$ separates a point set $\mathcal{S}$ if some segment joining two points in $\mathcal{S}$ crosses $\ell$.)
(Taiwan)
Solution. We prove that the desired statement is true with $c=\frac{1}{8}$. Set $\delta=\frac{1}{8} n^{-1 / 3}$. For any line $\ell$ and any point $X$, let $X_{\ell}$ denote the projection of $X$ to $\ell$; a similar notation applies to sets of points.

Suppose that, for some line $\ell$, the set $\mathcal{S}_{\ell}$ contains two adjacent points $X$ and $Y$ with $X Y=2 d$. Then the line perpendicular to $\ell$ and passing through the midpoint of segment $X Y$ separates $\mathcal{S}$, and all points in $\mathcal{S}$ are at least $d$ apart from $\ell$. Thus, if $d \geqslant \delta$, then a desired line has been found. For the sake of contradiction, we assume that no such points exist, in any projection.

Choose two points $A$ and $B$ in $\mathcal{S}$ with the maximal distance $M=A B$ (i.e., $A B$ is a diameter of $\mathcal{S}$ ); by the problem condition, $M \geqslant 1$. Denote by $\ell$ the line $A B$. The set $\mathcal{S}$ is contained in the intersection of two disks $D_{A}$ and $D_{B}$ of radius $M$ centered at $A$ and $B$, respectively. Hence, the projection $\mathcal{S}_{\ell}$ is contained in the segment $A B$. Moreover, the points in $\mathcal{S}_{\ell}$ divide that segment into at most $n-1$ parts, each of length less than $2 \delta$. Therefore,

$$
M<n \cdot 2 \delta
$$

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-69.jpg?height=418&width=924&top_left_y=1404&top_left_x=566)

Choose a point $H$ on segment $A B$ with $A H=\frac{1}{2}$. Let $P$ be a strip between the lines $a$ and $h$ perpendicular to $A B$ and passing through $A$ and $H$, respectively; we assume that $P$ contains its boundary, which consists of lines $a$ and $h$. Set $\mathcal{T}=P \cap \mathcal{S}$ and let $t=|\mathcal{T}|$. By our assumption, segment $A H$ contains at least $\left\lceil\frac{1}{2}:(2 \delta)\right\rceil$ points of $S_{\ell}$, which yields

$$
t \geqslant \frac{1}{4 \delta}
$$

Notice that $\mathcal{T}$ is contained in $Q=P \cap D_{B}$. The set $Q$ is a circular segment, and its projection $Q_{a}$ is a line segment of length

$$
2 \sqrt{M^{2}-\left(M-\frac{1}{2}\right)^{2}}<2 \sqrt{M}
$$

On the other hand, for any two points $X, Y \in \mathcal{T}$, we have $X Y \geqslant 1$ and $X_{\ell} Y_{\ell} \leqslant \frac{1}{2}$, so $X_{a} Y_{a}=$ $\sqrt{X Y^{2}-X_{\ell} Y_{\ell}^{2}} \geqslant \frac{\sqrt{3}}{2}$. To summarize, $t$ points constituting $\mathcal{T}_{a}$ lie on the segment of length less than $2 \sqrt{M}$, and are at least $\frac{\sqrt{3}}{2}$ apart from each other. This yields $2 \sqrt{M}>(t-1) \frac{\sqrt{3}}{2}$, or

$$
t<1+\frac{4 \sqrt{M}}{\sqrt{3}}<4 \sqrt{M}
$$

as $M \geqslant 1$.
Combining the estimates (1), (2), and (3), we finally obtain

$$
\frac{1}{4 \delta} \leqslant t<4 \sqrt{M}<4 \sqrt{2 n \delta}, \quad \text { or } \quad 512 n \delta^{3}>1
$$

which does not hold for the chosen value of $\delta$.
Comment 1. As the proposer mentions, the exponent $-1 / 3$ in the problem statement is optimal. In fact, for any $n \geqslant 2$, there is a configuration $\mathcal{S}$ of $n$ points in the plane such that any two points in $\mathcal{S}$ are at least 1 apart, but every line $\ell$ separating $\mathcal{S}$ is at most $c^{\prime} n^{-1 / 3} \log n$ apart from some point in $\mathcal{S}$; here $c^{\prime}$ is some absolute constant.

The original proposal suggested to prove the estimate of the form $\mathrm{cn}^{-1 / 2}$. That version admits much easier solutions. E.g., setting $\delta=\frac{1}{16} n^{-1 / 2}$ and applying (1), we see that $\mathcal{S}$ is contained in a disk $D$ of radius $\frac{1}{8} n^{1 / 2}$. On the other hand, for each point $X$ of $\mathcal{S}$, let $D_{X}$ be the disk of radius $\frac{1}{2}$ centered at $X$; all these disks have disjoint interiors and lie within the disk concentric to $D$, of radius $\frac{1}{16} n^{1 / 2}+\frac{1}{2}<\frac{1}{2} n^{1 / 2}$. Comparing the areas, we get

$$
n \cdot \frac{\pi}{4} \leqslant \pi\left(\frac{n^{1 / 2}}{16}+\frac{1}{2}\right)^{2}<\frac{\pi n}{4}
$$

which is a contradiction.
The Problem Selection Committee decided to choose a harder version for the Shortlist.
Comment 2. In this comment, we discuss some versions of the solution above, which avoid concentrating on the diameter of $\mathcal{S}$. We start with introducing some terminology suitable for those versions.

Put $\delta=c n^{-1 / 3}$ for a certain sufficiently small positive constant $c$. For the sake of contradiction, suppose that, for some set $\mathcal{S}$ satisfying the conditions in the problem statement, there is no separating line which is at least $\delta$ apart from each point of $\mathcal{S}$.

Let $C$ be the convex hull of $\mathcal{S}$. A line is separating if and only if it meets $C$ (we assume that a line passing through a point of $\mathcal{S}$ is always separating). Consider a strip between two parallel separating lines $a$ and $a^{\prime}$ which are, say, $\frac{1}{4}$ apart from each other. Define a slice determined by the strip as the intersection of $\mathcal{S}$ with the strip. The length of the slice is the diameter of the projection of the slice to $a$.

In this terminology, the arguments used in the proofs of (2) and (3) show that for any slice $\mathcal{T}$ of length $L$, we have

$$
\frac{1}{8 \delta} \leqslant|\mathcal{T}| \leqslant 1+\frac{4}{\sqrt{15}} L
$$

The key idea of the solution is to apply these estimates to a peel slice, where line $a$ does not cross the interior of $C$. In the above solution, this idea was applied to one carefully chosen peel slice. Here, we outline some different approach involving many of them. We always assume that $n$ is sufficiently large.

Consider a peel slice determined by lines $a$ and $a^{\prime}$, where $a$ contains no interior points of $C$. We orient $a$ so that $C$ lies to the left of $a$. Line $a$ is called a supporting line of the slice, and the obtained direction is the direction of the slice; notice that the direction determines uniquely the supporting line and hence the slice. Fix some direction $\mathbf{v}_{0}$, and for each $\alpha \in[0,2 \pi)$ denote by $\mathcal{T}_{\alpha}$ the peel slice whose direction is $\mathbf{v}_{0}$ rotated by $\alpha$ counterclockwise.

When speaking about the slice, we always assume that the figure is rotated so that its direction is vertical from the bottom to the top; then the points in $\mathcal{T}$ get a natural order from the bottom to the top. In particular, we may speak about the top half $\mathrm{T}(\mathcal{T})$ consisting of $\lfloor|\mathcal{T}| / 2\rfloor$ topmost points in $\mathcal{T}$, and similarly about its bottom half $\mathrm{B}(\mathcal{T})$. By (4), each half contains at least 10 points when $n$ is large. Claim. Consider two angles $\alpha, \beta \in[0, \pi / 2]$ with $\beta-\alpha \geqslant 40 \delta=: \phi$. Then all common points of $\mathcal{T}_{\alpha}$ and $\mathcal{T}_{\beta}$ lie in $\mathrm{T}\left(\mathcal{T}_{\alpha}\right) \cap \mathrm{B}\left(\mathcal{T}_{\beta}\right)$.
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-71.jpg?height=738&width=1338&top_left_y=201&top_left_x=366)

Proof. By symmetry, it suffices to show that all those points lie in $\mathrm{T}\left(\mathcal{T}_{\alpha}\right)$. Let $a$ be the supporting line of $\mathcal{T}_{\alpha}$, and let $\ell$ be a line perpendicular to the direction of $\mathcal{T}_{\beta}$. Let $P_{1}, \ldots, P_{k}$ list all points in $\mathcal{T}_{\alpha}$, numbered from the bottom to the top; by (4), we have $k \geqslant \frac{1}{8} \delta^{-1}$.

Introduce the Cartesian coordinates so that the (oriented) line $a$ is the $y$-axis. Let $P_{i}$ be any point in $\mathrm{B}\left(\mathcal{T}_{\alpha}\right)$. The difference of ordinates of $P_{k}$ and $P_{i}$ is at least $\frac{\sqrt{15}}{4}(k-i)>\frac{1}{3} k$, while their abscissas differ by at most $\frac{1}{4}$. This easily yields that the projections of those points to $\ell$ are at least

$$
\frac{k}{3} \sin \phi-\frac{1}{4} \geqslant \frac{1}{24 \delta} \cdot 20 \delta-\frac{1}{4}>\frac{1}{4}
$$

apart from each other, and $P_{k}$ is closer to the supporting line of $\mathcal{T}_{\beta}$ than $P_{i}$, so that $P_{i}$ does not belong to $\mathcal{T}_{\beta}$.

Now, put $\alpha_{i}=40 \delta i$, for $i=0,1, \ldots,\left\lfloor\frac{1}{40} \delta^{-1} \cdot \frac{\pi}{2}\right\rfloor$, and consider the slices $\mathcal{T}_{\alpha_{i}}$. The Claim yields that each point in $\mathcal{S}$ is contained in at most two such slices. Hence, the union $\mathcal{U}$ of those slices contains at least

$$
\frac{1}{2} \cdot \frac{1}{8 \delta} \cdot \frac{1}{40 \delta} \cdot \frac{\pi}{2}=\frac{\lambda}{\delta^{2}}
$$

points (for some constant $\lambda$ ), and each point in $\mathcal{U}$ is at most $\frac{1}{4}$ apart from the boundary of $C$.
It is not hard now to reach a contradiction with (1). E.g., for each point $X \in \mathcal{U}$, consider a closest point $f(X)$ on the boundary of $C$. Obviously, $f(X) f(Y) \geqslant X Y-\frac{1}{2} \geqslant \frac{1}{2} X Y$ for all $X, Y \in \mathcal{U}$. This yields that the perimeter of $C$ is at least $\mu \delta^{-2}$, for some constant $\mu$, and hence the diameter of $\mathcal{S}$ is of the same order.

Alternatively, one may show that the projection of $\mathcal{U}$ to the line at the angle of $\pi / 4$ with $\mathbf{v}_{0}$ has diameter at least $\mu \delta^{-2}$ for some constant $\mu$.

## Number Theory

N1. Given a positive integer $k$, show that there exists a prime $p$ such that one can choose distinct integers $a_{1}, a_{2}, \ldots, a_{k+3} \in\{1,2, \ldots, p-1\}$ such that $p$ divides $a_{i} a_{i+1} a_{i+2} a_{i+3}-i$ for all $i=1,2, \ldots, k$.
(South Africa)
Solution. First we choose distinct positive rational numbers $r_{1}, \ldots, r_{k+3}$ such that

$$
r_{i} r_{i+1} r_{i+2} r_{i+3}=i \quad \text { for } 1 \leqslant i \leqslant k
$$

Let $r_{1}=x, r_{2}=y, r_{3}=z$ be some distinct primes greater than $k$; the remaining terms satisfy $r_{4}=\frac{1}{r_{1} r_{2} r_{3}}$ and $r_{i+4}=\frac{i+1}{i} r_{i}$. It follows that if $r_{i}$ are represented as irreducible fractions, the numerators are divisible by $x$ for $i \equiv 1(\bmod 4)$, by $y$ for $i \equiv 2(\bmod 4)$, by $z$ for $i \equiv 3(\bmod 4)$ and by none for $i \equiv 0(\bmod 4)$. Notice that $r_{i}<r_{i+4}$; thus the sequences $r_{1}<r_{5}<r_{9}<\ldots$, $r_{2}<r_{6}<r_{10}<\ldots, r_{3}<r_{7}<r_{11}<\ldots, r_{4}<r_{8}<r_{12}<\ldots$ are increasing and have no common terms, that is, all $r_{i}$ are distinct.

If each $r_{i}$ is represented by an irreducible fraction $\frac{u_{i}}{v_{i}}$, choose a prime $p$ which divides neither $v_{i}, 1 \leqslant i \leqslant k+1$, nor $v_{i} v_{j}\left(r_{i}-r_{j}\right)=v_{j} u_{i}-v_{i} u_{j}$ for $i<j$, and define $a_{i}$ by the congruence $a_{i} v_{i} \equiv u_{i}(\bmod p)$. Since $r_{i} r_{i+1} r_{i+2} r_{i+3}=i$, we have

$$
\begin{aligned}
i v_{i} v_{i+1} v_{i+2} v_{i+3}=r_{i} v_{i} r_{i+1} v_{i+1} r_{i+2} & v_{i+2} r_{i+3} v_{i+3} \\
& =u_{i} u_{i+1} u_{i+2} u_{i+3} \equiv a_{i} v_{i} a_{i+1} v_{i+1} a_{i+2} v_{i+2} a_{i+3} v_{i+3} \quad(\bmod p)
\end{aligned}
$$

and therefore $a_{i} a_{i+1} a_{i+2} a_{i+3} \equiv i(\bmod p)$ for $1 \leqslant i \leqslant k$.
If $a_{i} \equiv a_{j}(\bmod p)$, then $u_{i} v_{j} \equiv a_{i} v_{i} v_{j} \equiv u_{j} v_{i}(\bmod p)$, a contradiction.
Comment. One can explicitly express residues $b_{i} \equiv a_{1} a_{2} \cdot \ldots \cdot a_{i}(\bmod p)$ in terms of $b_{1}, b_{2}, b_{3}$ and $b_{0}=1$ :

$$
b_{i+3}=i(i-4)(i-8) \cdot \ldots \cdot(i-4 k+4) b_{r}
$$

where $i+3=4 k+r, 0 \leqslant r<4$. Then the numbers $a_{i}$ are found from the congruences $b_{i-1} a_{i} \equiv b_{i}$ $(\bmod p)$, and choosing $p$ so that $a_{i}$ are not congruent modulo $p$ is done in a way very similar to the above solution.

This page is intentionally left blank

N2. For each prime $p$, there is a kingdom of $p$-Landia consisting of $p$ islands numbered $1,2, \ldots, p$. Two distinct islands numbered $n$ and $m$ are connected by a bridge if and only if $p$ divides $\left(n^{2}-m+1\right)\left(m^{2}-n+1\right)$. The bridges may pass over each other, but cannot cross. Prove that for infinitely many $p$ there are two islands in $p$-Landia not connected by a chain of bridges.
(Denmark)
Solution 1. We prove that for each prime $p>3$ dividing a number of the form $x^{2}-x+1$ with integer $x$ there are two unconnected islands in $p$-Landia.

For brevity's sake, when a bridge connects the islands numbered $m$ and $n$, we shall speak simply that it connects $m$ and $n$.

A bridge connects $m$ and $n$ if $n \equiv m^{2}+1(\bmod p)$ or $m \equiv n^{2}+1(\bmod p)$. If $m^{2}+1 \equiv n$ $(\bmod p)$, we draw an arrow starting at $m$ on the bridge connecting $m$ and $n$. Clearly only one arrow starts at $m$ if $m^{2}+1 \not \equiv m(\bmod p)$, and no arrows otherwise. The total number of bridges does not exceed the total number of arrows.

Suppose $x^{2}-x+1 \equiv 0(\bmod p)$. We may assume that $1 \leqslant x \leqslant p$; then there is no arrow starting at $x$. Since $(1-x)^{2}-(1-x)+1=x^{2}-x+1,(p+1-x)^{2}+1 \equiv(p+1-x)(\bmod p)$, and there is also no arrow starting at $p+1-x$. If $x=p+1-x$, that is, $x=\frac{p+1}{2}$, then $4\left(x^{2}-x+1\right)=p^{2}+3$ and therefore $x^{2}-x+1$ is not divisible by $p$. Thus the islands $x$ and $p+1-x$ are different, and no arrows start at either of them. It follows that the total number of bridges in $p$-Landia does not exceed $p-2$.

Let $1,2, \ldots, p$ be the vertices of a graph $G_{p}$, where an edge connects $m$ and $n$ if and only if there is a bridge between $m$ and $n$. The number of vertices of $G_{p}$ is $p$ and the number of edges is less than $p-1$. This means that the graph is not connected, which means that there are two islands not connected by a chain of bridges.

It remains to prove that there are infinitely many primes $p$ dividing $x^{2}-x+1$ for some integer $x$. Let $p_{1}, p_{2}, \ldots, p_{k}$ be any finite set of such primes. The number $\left(p_{1} p_{2} \cdot \ldots \cdot p_{k}\right)^{2}-p_{1} p_{2} \cdot \ldots \cdot p_{k}+1$ is greater than 1 and not divisible by any $p_{i}$; therefore it has another prime divisor with the required property.

Solution 2. One can show, by using only arithmetical methods, that for infinitely many $p$, the kingdom of $p$-Ladia contains two islands connected to no other island, except for each other.

Let arrows between islands have the same meaning as in the previous solution. Suppose that positive $a<p$ satisfies the congruence $x^{2}-x+1 \equiv 0(\bmod p)$. We have seen in the first solution that $b=p+1-a$ satisfies it too, and $b \neq a$ when $p>3$. It follows that $a b \equiv a(1-a) \equiv 1$ $(\bmod p)$. If an arrow goes from $t$ to $a$, then $t$ must satisfy the congruence $t^{2}+1 \equiv a \equiv a^{2}+1$ $(\bmod p)$; the only such $t \neq a$ is $p-a$. Similarly, the only arrow going to $b$ goes from $p-b$. If one of the numbers $p-a$ and $p-b$, say, $p-a$, is not at the end of any arrow, the pair $a, p-a$ is not connected with the rest of the islands. This is true if at least one of the congruences $x^{2}+1 \equiv-a, x^{2}+1 \equiv-b$ has no solutions, that is, either $-a-1$ or $-b-1$ is a quadratic non-residue modulo $p$.

Note that $x^{2}-x+1 \equiv x^{2}-(a+b) x+a b \equiv(x-a)(x-b)(\bmod p)$. Substituting $x=-1$ we get $(-1-a)(-1-b) \equiv 3(\bmod p)$. If 3 is a quadratic non-residue modulo $p$, so is one of the numbers $-1-a$ and $-1-b$.

Thus it is enough to find infinitely many primes $p>3$ dividing $x^{2}-x+1$ for some integer $x$ and such that 3 is a quadratic non-residue modulo $p$.

If $x^{2}-x+1 \equiv 0(\bmod p)$ then $(2 x-1)^{2} \equiv-3(\bmod p)$, that is, -3 is a quadratic residue modulo $p$, so 3 is a quadratic non-residue if and only if -1 is also a non-residue, in other words, $p \equiv-1(\bmod 4)$.

Similarly to the first solution, let $p_{1}, \ldots, p_{k}$ be primes congruent to -1 modulo 4 and dividing numbers of the form $x^{2}-x+1$. The number $\left(2 p_{1} \cdot \ldots \cdot p_{k}\right)^{2}-2 p_{1} \cdot \ldots \cdot p_{k}+1$ is
not divisible by any $p_{i}$ and is congruent to -1 modulo 4 , therefore, it has some prime divisor $p \equiv-1(\bmod 4)$ which has the required properties.

N3. Let $n$ be an integer with $n \geqslant 2$. Does there exist a sequence $\left(a_{1}, \ldots, a_{n}\right)$ of positive integers with not all terms being equal such that the arithmetic mean of every two terms is equal to the geometric mean of some (one or more) terms in this sequence?
(Estonia)
Answer: No such sequence exists.
Solution 1. Suppose that $a_{1}, \ldots, a_{n}$ satisfy the required properties. Let $d=\operatorname{gcd}\left(a_{1} \ldots, a_{n}\right)$. If $d>1$ then replace the numbers $a_{1}, \ldots, a_{n}$ by $\frac{a_{1}}{d}, \ldots, \frac{a_{n}}{d}$; all arithmetic and all geometric means will be divided by $d$, so we obtain another sequence satisfying the condition. Hence, without loss of generality, we can assume that $\operatorname{gcd}\left(a_{1} \ldots, a_{n}\right)=1$.

We show two numbers, $a_{m}$ and $a_{k}$ such that their arithmetic mean, $\frac{a_{m}+a_{k}}{2}$ is different from the geometric mean of any (nonempty) subsequence of $a_{1} \ldots, a_{n}$. That proves that there cannot exist such a sequence.

Choose the index $m \in\{1, \ldots, n\}$ such that $a_{m}=\max \left(a_{1}, \ldots, a_{n}\right)$. Note that $a_{m} \geqslant 2$, because $a_{1}, \ldots, a_{n}$ are not all equal. Let $p$ be a prime divisor of $a_{m}$.

Let $k \in\{1, \ldots, n\}$ be an index such that $a_{k}=\max \left\{a_{i}: p \nmid a_{i}\right\}$. Due to $\operatorname{gcd}\left(a_{1} \ldots, a_{n}\right)=1$, not all $a_{i}$ are divisible by $p$, so such a $k$ exists. Note that $a_{m}>a_{k}$ because $a_{m} \geqslant a_{k}, p \mid a_{m}$ and $p \nmid a_{k}$.

Let $b=\frac{a_{m}+a_{k}}{2}$; we will show that $b$ cannot be the geometric mean of any subsequence of $a_{1}, \ldots, a_{n}$.

Consider the geometric mean, $g=\sqrt[t]{a_{i_{1}} \cdot \ldots \cdot a_{i_{t}}}$ of an arbitrary subsequence of $a_{1}, \ldots, a_{n}$.
If none of $a_{i_{1}}, \ldots, a_{i_{t}}$ is divisible by $p$, then they are not greater than $a_{k}$, so

$$
g=\sqrt[t]{a_{i_{1}} \cdot \ldots \cdot a_{i_{t}}} \leqslant a_{k}<\frac{a_{m}+a_{k}}{2}=b
$$

and therefore $g \neq b$.
Otherwise, if at least one of $a_{i_{1}}, \ldots, a_{i_{t}}$ is divisible by $p$, then $2 g=2 \sqrt{t} \sqrt{a_{i_{1}} \cdot \ldots \cdot a_{i_{t}}}$ is either not an integer or is divisible by $p$, while $2 b=a_{m}+a_{k}$ is an integer not divisible by $p$, so $g \neq b$ again.

Solution 2. Like in the previous solution, we assume that the numbers $a_{1}, \ldots, a_{n}$ have no common divisor greater than 1 . The arithmetic mean of any two numbers in the sequence is half of an integer; on the other hand, it is a (some integer order) root of an integer. This means each pair's mean is an integer, so all terms in the sequence must be of the same parity; hence they all are odd. Let $d=\min \left\{\operatorname{gcd}\left(a_{i}, a_{j}\right): a_{i} \neq a_{j}\right\}$. By reordering the sequence we can assume that $\operatorname{gcd}\left(a_{1}, a_{2}\right)=d$, the sum $a_{1}+a_{2}$ is maximal among such pairs, and $a_{1}>a_{2}$.

We will show that $\frac{a_{1}+a_{2}}{2}$ cannot be the geometric mean of any subsequence of $a_{1} \ldots, a_{n}$.
Let $a_{1}=x d$ and $a_{2}=y d$ where $x, y$ are coprime, and suppose that there exist some $b_{1}, \ldots, b_{t} \in\left\{a_{1}, \ldots, a_{n}\right\}$ whose geometric mean is $\frac{a_{1}+a_{2}}{2}$. Let $d_{i}=\operatorname{gcd}\left(a_{1}, b_{i}\right)$ for $i=1,2, \ldots, t$ and let $D=d_{1} d_{2} \cdot \ldots \cdot d_{t}$. Then

$$
D=d_{1} d_{2} \cdot \ldots \cdot d_{t} \left\lvert\, b_{1} b_{2} \cdot \ldots \cdot b_{t}=\left(\frac{a_{1}+a_{2}}{2}\right)^{t}=\left(\frac{x+y}{2}\right)^{t} d^{t}\right.
$$

We claim that $D \mid d^{t}$. Consider an arbitrary prime divisor $p$ of $D$. Let $\nu_{p}(x)$ denote the exponent of $p$ in the prime factorization of $x$. If $p \left\lvert\, \frac{x+y}{2}\right.$, then $p \nmid x, y$, so $p$ is coprime with $x$; hence, $\nu_{p}\left(d_{i}\right) \leqslant \nu_{p}\left(a_{1}\right)=\nu_{p}(x d)=\nu_{p}(d)$ for every $1 \leqslant i \leqslant t$, therefore $\nu_{p}(D)=\sum_{i} \nu_{p}\left(d_{i}\right) \leqslant$ $t \nu_{p}(d)=\nu_{p}\left(d^{t}\right)$. Otherwise, if $p$ is coprime to $\frac{x+y}{2}$, we have $\nu_{p}(D) \leqslant \nu_{p}\left(d^{t}\right)$ trivially. The claim has been proved.

Notice that $d_{i}=\operatorname{gcd}\left(b_{i}, a_{1}\right) \geqslant d$ for $1 \leqslant i \leqslant t$ : if $b_{i} \neq a_{1}$ then this follows from the definition of $d$; otherwise we have $b_{i}=a_{1}$, so $d_{i}=a_{1} \geqslant d$. Hence, $D=d_{1} \cdot \ldots \cdot d_{t} \geqslant d^{t}$, and the claim forces $d_{1}=\ldots=d_{t}=d$.

Finally, by $\frac{a_{1}+a_{2}}{2}>a_{2}$ there must be some $b_{k}$ which is greater than $a_{2}$. From $a_{1}>a_{2} \geqslant$ $d=\operatorname{gcd}\left(a_{1}, b_{k}\right)$ it follows that $a_{1} \neq b_{k}$. Now the have a pair $a_{1}, b_{k}$ such that $\operatorname{gcd}\left(a_{1}, b_{k}\right)=d$ but $a_{1}+b_{k}>a_{1}+a_{2}$; that contradicts the choice of $a_{1}$ and $a_{2}$.

Comment. The original problem proposal contained a second question asking if there exists a nonconstant sequence $\left(a_{1}, \ldots, a_{n}\right)$ of positive integers such that the geometric mean of every two terms is equal the arithmetic mean of some terms.

For $n \geqslant 3$ such a sequence is $(4,1,1, \ldots, 1)$. The case $n=2$ can be done by the trivial estimates

$$
\min \left(a_{1}, a_{2}\right)<\sqrt{a_{1} a_{2}}<\frac{a_{1}+a_{2}}{2}<\max \left(a_{1}, a_{2}\right)
$$

The Problem Selection Committee found this variant less interesting and suggests using only the first question.

N4. For any odd prime $p$ and any integer $n$, let $d_{p}(n) \in\{0,1, \ldots, p-1\}$ denote the remainder when $n$ is divided by $p$. We say that $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ is a $p$-sequence, if $a_{0}$ is a positive integer coprime to $p$, and $a_{n+1}=a_{n}+d_{p}\left(a_{n}\right)$ for $n \geqslant 0$.
(a) Do there exist infinitely many primes $p$ for which there exist $p$-sequences $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ and $\left(b_{0}, b_{1}, b_{2}, \ldots\right)$ such that $a_{n}>b_{n}$ for infinitely many $n$, and $b_{n}>a_{n}$ for infinitely many $n$ ?
(b) Do there exist infinitely many primes $p$ for which there exist $p$-sequences $\left(a_{0}, a_{1}, a_{2}, \ldots\right)$ and $\left(b_{0}, b_{1}, b_{2}, \ldots\right)$ such that $a_{0}<b_{0}$, but $a_{n}>b_{n}$ for all $n \geqslant 1$ ?
(United Kingdom)
Answer: Yes, for both parts.
Solution. Fix some odd prime $p$, and let $T$ be the smallest positive integer such that $p \mid 2^{T}-1$; in other words, $T$ is the multiplicative order of 2 modulo $p$.

Consider any $p$-sequence $\left(x_{n}\right)=\left(x_{0}, x_{1}, x_{2}, \ldots\right)$. Obviously, $x_{n+1} \equiv 2 x_{n}(\bmod p)$ and therefore $x_{n} \equiv 2^{n} x_{0}(\bmod p)$. This yields $x_{n+T} \equiv x_{n}(\bmod p)$ and therefore $d\left(x_{n+T}\right)=d\left(x_{n}\right)$ for all $n \geqslant 0$. It follows that the sum $d\left(x_{n}\right)+d\left(x_{n+1}\right)+\ldots+d\left(x_{n+T-1}\right)$ does not depend on $n$ and is thus a function of $x_{0}$ (and $p$ ) only; we shall denote this sum by $S_{p}\left(x_{0}\right)$, and extend the function $S_{p}(\cdot)$ to all (not necessarily positive) integers. Therefore, we have $x_{n+k T}=x_{n}+k S_{p}\left(x_{0}\right)$ for all positive integers $n$ and $k$. Clearly, $S_{p}\left(x_{0}\right)=S_{p}\left(2^{t} x_{0}\right)$ for every integer $t \geqslant 0$.

In both parts, we use the notation

$$
S_{p}^{+}=S_{p}(1)=\sum_{i=0}^{T-1} d_{p}\left(2^{i}\right) \quad \text { and } \quad S_{p}^{-}=S_{p}(-1)=\sum_{i=0}^{T-1} d_{p}\left(p-2^{i}\right)
$$

(a) Let $q>3$ be a prime and $p$ a prime divisor of $2^{q}+1$ that is greater than 3 . We will show that $p$ is suitable for part (a). Notice that $9 \nmid 2^{q}+1$, so that such a $p$ exists. Moreover, for any two odd primes $q<r$ we have $\operatorname{gcd}\left(2^{q}+1,2^{r}+1\right)=2^{\operatorname{gcd}(q, r)}+1=3$, thus there exist infinitely many such primes $p$.

For the chosen $p$, we have $T=2 q$. Since $2^{q} \equiv-1(\bmod p)$, we have $S_{p}^{+}=S_{p}^{-}$. Now consider the $p$-sequences $\left(a_{n}\right)$ and $\left(b_{n}\right)$ with $a_{0}=p+1$ and $b_{0}=p-1$; we claim that these sequences satisfy the required conditions. We have $a_{0}>b_{0}$ and $a_{1}=p+2<b_{1}=2 p-2$. It follows then that

$$
a_{k \cdot 2 q}=a_{0}+k S_{p}^{+}>b_{0}+k S_{p}^{+}=b_{k \cdot 2 q} \quad \text { and } \quad a_{k \cdot 2 q+1}=a_{1}+k S_{p}^{+}<b_{1}+k S_{p}^{+}=b_{k \cdot 2 q+1}
$$

for all $k=0,1, \ldots$, as desired.
(b) Let $q$ be an odd prime and $p$ a prime divisor of $2^{q}-1$; thus we have $T=q$. We will show that $p$ is suitable for part (b). Notice that the numbers of the form $2^{q}-1$ are pairwise coprime (since $\operatorname{gcd}\left(2^{q}-1,2^{r}-1\right)=2^{\operatorname{gcd}(q, r)}-1=1$ for any two distinct primes $q$ and $r$ ), thus there exist infinitely many such primes $p$. Notice that $d_{p}(x)+d_{p}(p-x)=p$ for all $x$ with $p \nmid x$, so that the sum $S_{p}^{+}+S_{p}^{-}=p q$ is odd, which yields $S_{p}^{+}=S_{p}(1) \neq S_{p}(-1)=S_{p}^{-}$.

Assume that $\left(x_{n}\right)$ and $\left(y_{n}\right)$ are two $p$-sequences with $S_{p}\left(x_{0}\right)>S_{p}\left(y_{0}\right)$ but $x_{0}<y_{0}$. The first condition yields that

$$
x_{M q+r}-y_{M q+r}=\left(x_{r}-y_{r}\right)+M\left(S_{p}\left(x_{0}\right)-S_{p}\left(y_{0}\right)\right) \geqslant\left(x_{r}-y_{r}\right)+M
$$

for all nonnegative integers $M$ and every $r=0,1, \ldots, q-1$. Thus, we have $x_{n}>y_{n}$ for every $n \geqslant q+q \cdot \max \left\{y_{r}-x_{r}: r=0,1, \ldots, q-1\right\}$. Now, since $x_{0}<y_{0}$, there exists the largest $n_{0}$ with $x_{n_{0}}<y_{n_{0}}$. In this case the $p$-sequences $a_{n}=x_{n-n_{0}}$ and $b_{n}=y_{n-n_{0}}$ possess the desired property (notice here that $x_{n} \neq y_{n}$ for all $n \geqslant 0$, as otherwise we would have $\left.S_{p}\left(x_{0}\right)=S_{p}\left(x_{n}\right)=S_{p}\left(y_{n}\right)=S_{p}\left(y_{0}\right)\right)$.

It remains to find $p$-sequences $\left(x_{n}\right)$ and $\left(y_{n}\right)$ satisfying the two conditions. Recall that $S_{p}^{+} \neq S_{p}^{-}$. Now, if $S_{p}^{+}>S_{p}^{-}$, then we can put $x_{0}=1$ and $y_{0}=p-1$. Otherwise, if $S_{p}^{+}<S_{p}^{-}$, then we put $x_{0}=p-1$ and $y_{0}=p+1$.

This page is intentionally left blank

N5. Determine all functions $f$ defined on the set of all positive integers and taking non-negative integer values, satisfying the three conditions:
(i) $f(n) \neq 0$ for at least one $n$;
(ii) $f(x y)=f(x)+f(y)$ for every positive integers $x$ and $y$;
(iii) there are infinitely many positive integers $n$ such that $f(k)=f(n-k)$ for all $k<n$.
(Croatia)
Answer: The sought functions are those of the form $f(n)=c \cdot \nu_{p}(n)$, where $p$ is some prime, $c$ is a nonnegative integer, and $\nu_{p}(n)$ denotes the exponent of $p$ in the prime decomposition of $n$.

Solution 1. If a number $n$ is a product of primes, $n=p_{1} p_{2} \cdot \ldots \cdot p_{k}$, then

$$
f(n)=f\left(p_{1}\right)+\ldots+f\left(p_{k}\right)
$$

in particular, $f(1)=0($ since $f(1)=f(1)+f(1))$.
It is also clear that $f(n)=0$ implies $f(p)=0$ for all primes $p$ dividing $n$.
Let us call positive integer $n \operatorname{good}$ if $f(k)=f(n-k)$ for $0<k<n$. If $n$ is good then each its divisor $d$ is also good; indeed, if $n=d m$ then

$$
f(k)=f(m k)-f(m)=f(n-m k)-f(m)=f(m(d-k))-f(m)=f(d-k)
$$

for $0<k<d$. Thus, good numbers are products of good primes.
It follows immediately from (i) that there exists a prime $p$ such that $f(p) \neq 0$; let $p$ be the smallest such prime. Then $f(r)=0$ for all $r<p$ (since all prime divisors of $r<p$ are less than $p$ ). Now every good number $n>p$ must be divisible by $p$. Indeed, if $n=p k+r$ is a good number, $k>0,0<r<p$, then $f(p) \leqslant f(p k)=f(n-p k)=f(r)=0$, a contradiction. Since any divisor of a good number is also good, this means that if a divisor $r$ of a good number is not divisible by $p$, it is less than $p$. Thus all good numbers have the form $r \cdot p^{k}$ with $r<p$. The condition (iii) implies that $k$ can be arbitrarily large, consequently all powers of $p$ are good.

If $q \neq p$ is a prime, $p^{q-1}-1$ is divisible by $q$ and $p^{q-1}$ is good. Then $f(q) \leqslant f\left(p^{q-1}-1\right)=$ $f(1)=0$, that is, $f(q)=0$.

Now we see that $f(n)=\nu_{p}(n) \cdot c$, where $c=f(p)$. The conditions (i) and (ii) for all such functions with $c \neq 0$ are obvious; the condition (iii) holds for all $n=p^{m}$, since $\nu_{p}\left(p^{m}-k\right)=\nu_{p}(k)$ when $0<k<p^{m}$.

Solution 2. We use the notion of a good number from the previous solution. As above, we also denote by $\nu_{p}(n)$ the exponent of a prime $p$ in the prime decomposition of $n$.

Say that a positive integer $k$ is big if $f(k)>0$. Let $\mathcal{B}$ be the set of big primes, and let $p_{1}<p_{2}<\ldots$ list the elements of $\mathcal{B}$ (this set might be either finite or infinite). By the problem conditions, we have

$$
f(n)=\sum_{i} \nu_{p_{i}}(n) f\left(p_{i}\right)
$$

thus, the big numbers are those divisible by at least one big prime.
For a positive integer $k$, define its essence $e(k)$ to be the largest product $e$ of (not necessarily different) big primes such that $e \mid k$. In other words,

$$
e(n)=\prod_{p_{i} \in \mathcal{B}} p_{i}^{\nu_{p_{i}}(n)}
$$

This yields that $k / e(k)$ is not big, so $f(k)=f(e(k))+f(k / e(k))=f(e(k))$.
Lemma. Assume that $n$ is a good number. Then $e(k)=e(n-k)$ for all $k<n$.

Proof. Arguing indirectly, choose a minimal $k$ for which the claim of the lemma is violated. Clearly, $k$ is big, as otherwise $f(k)=f(n-k)=0$ and hence $e(k)=e(n-k)=1$.

There are $t=k / e(k)$ multiples of $e(k)$ in each of the segments $[1, k]$ and $[n-k, n-1]$. On the other hand, there are $t-1$ such multiples on $[1, k-1]$ - and, by minimality of $k$, on $[n-k+1, n-1]$ as well. This yields that $n-k$ is a multiple of $e(k)$. Therefore,

$$
f(e(k))=f(k)=f(n-k)=f(e(k))+f\left(\frac{n-k}{e(k)}\right),
$$

so the last summand vanishes, hence $\frac{n-k}{e(k)}$ has no big prime divisors, that is, $e(n-k)=e(k)$. This contradicts our choice.

Back to the problem, assume that $|\mathcal{B}| \geqslant 2$. Take any good number $n>p_{1} p_{2}$, and let $p_{1}^{\alpha}$ be the largest power of $p_{1}$ smaller than $n$, so that $n \leqslant p_{1}^{\alpha+1}<p_{1}^{\alpha} p_{2}$. By the lemma, $e\left(n-p_{1}^{\alpha}\right)=e\left(p_{1}^{\alpha}\right)=p_{1}^{\alpha}$, which yields $p_{1}^{\alpha} \mid n$. Similarly, $p_{2} \mid n$, so that $n \geqslant p_{1}^{\alpha} p_{2}$. This contradiction shows that $|\mathcal{B}| \leqslant 1$, which by (1) yields that $f$ is listed in the answer.

Solution 3. We have $f\left(\prod p_{i}^{\alpha_{i}}\right)=\sum \alpha_{i} f\left(p_{i}\right)$. Note that

$$
f(n-1)+f(n-2)+\ldots+\ldots f(n-k) \geqslant f(1)+\ldots+f(k)
$$

for all $k=1,2, \ldots, n-1$, since the difference LHS-RHS is just $\left.f\binom{n-1}{k}\right)$. Assume that $f(p)>0$. If $f(k)=f(n-k)$ for all $k$, it implies that $\binom{n-1}{k}$ is not divisible by $p$ for all $k=1,2, \ldots, n-2$. It is well known that it implies $n=a \cdot p^{s}, a<p$. If there are two primes $p, q$ such that $f(p)>0, f(q)>0$, there exist only finitely many $n$ which are equal both to $a \cdot p^{s}, a<p$, and $b \cdot q^{t}, b<q$. So there exists at most one such $p$, and therefore $f(n)=C \cdot \nu_{p}(n)$ for some constant $C$.

Solution 4. We call a function $f: \mathbb{N} \rightarrow \mathbb{N}_{0}$ satisfying (ii) additive. We call a pair $(f, n)$, where $f$ is an additive function and $n \in \mathbb{N}$, good, if for all $k<n$ it holds $f(k)=f(n-k)$. For an additive function $f$ and a prime number $p$ the number $\frac{f(p)}{\ln p}$ is denoted by $g(f, p)$.

Let $(f, n)$ be a good pair such that $f(p)>0$ for at least two primes less than $n$. Let $p_{0}$ be the prime with maximal $g(f, p)$ among all primes $p<n$. Let $a_{0}$ be the maximal exponent such that $p_{0}^{a_{0}}<n$. Then $f(k)<f\left(p_{0}^{a_{0}}\right)$ for all $k<p_{0}^{a_{0}}$. Indeed, if $k=p_{1}^{a_{1}} \ldots p_{m}^{a_{m}}<p_{0}^{a_{0}}$, then

$$
\begin{aligned}
f(k) & =a_{1} f\left(p_{1}\right)+\ldots+a_{m} f\left(p_{m}\right)=g\left(f, p_{1}\right) a_{1} \ln p_{1}+\ldots+g\left(f, p_{m}\right) a_{m} \ln a_{m} \\
& <g\left(f, p_{0}\right) a_{0} \ln p_{0}=f\left(p_{0}^{a_{0}}\right) .
\end{aligned}
$$

Let $n=b p_{0}^{a_{0}}+r$, where $0<r<p_{0}^{a_{0}}$. Then $f(r)=f\left(b p_{0}^{a_{0}}\right) \geqslant f\left(p_{0}^{a_{0}}\right)$. This contradiction shows that $p_{0}^{a_{0}} \mid n$. Then $n=p_{0}^{\nu_{p_{0}}(n)} n^{\prime}$, where $n^{\prime} \leqslant p_{0}$.

The functions $f_{1}(m):=f\left(p_{0}\right) \nu_{p_{0}}(m)$ and $f_{2}:=f-f_{1}$ are additive (obviously $f(m) \geqslant$ $f\left(p_{0}^{\nu_{p_{0}}(m)}\right)=f_{1}(m)$, since $p_{0}^{\nu_{p_{0}}(m)}$ divides $\left.m\right)$. For $k<n, \nu_{p}(k)=\nu_{p}(n-k)$. Hence the pair $\left(f_{2}, n\right)$ is also good. Note that $f_{2}\left(p_{0}\right)=0$.

Choose among all primes $p<n$ the prime $q_{0}$ with maximal $g\left(f_{2}, p\right)$. As above we can prove that $n=q_{0}^{\nu_{0}(n)} n^{\prime \prime}$ with $n^{\prime \prime}<q_{0}$. Since $p_{0} \neq q_{0}$, we get a contradiction. Thus $f(n)=f(p) \cdot \nu_{p}(n)$.

N6. For a positive integer $n$, let $d(n)$ be the number of positive divisors of $n$, and let $\varphi(n)$ be the number of positive integers not exceeding $n$ which are coprime to $n$. Does there exist a constant $C$ such that

$$
\frac{\varphi(d(n))}{d(\varphi(n))} \leqslant C
$$

for all $n \geqslant 1$ ?
(Cyprus)
Answer: No, such constant does not exist.
Solution 1. Fix $N>1$, let $p_{1}, \ldots, p_{k}$ be all primes between 1 and $N$ and $p_{k+1}, \ldots, p_{k+s}$ be all primes between $N+1$ and $2 N$. Since for $j \leqslant k+s$ all prime divisors of $p_{j}-1$ do not exceed $N$, we have

$$
\prod_{j=1}^{k+s}\left(p_{j}-1\right)=\prod_{i=1}^{k} p_{i}^{c_{i}}
$$

with some fixed exponents $c_{1}, \ldots, c_{k}$. Choose a huge prime number $q$ and consider a number

$$
n=\left(p_{1} \cdot \ldots \cdot p_{k}\right)^{q-1} \cdot\left(p_{k+1} \cdot \ldots \cdot p_{k+s}\right)
$$

Then

$$
\varphi(d(n))=\varphi\left(q^{k} \cdot 2^{s}\right)=q^{k-1}(q-1) 2^{s-1}
$$

and

$$
d(\varphi(n))=d\left(\left(p_{1} \cdot \ldots \cdot p_{k}\right)^{q-2} \prod_{i=1}^{k+s}\left(p_{i}-1\right)\right)=d\left(\prod_{i=1}^{k} p_{i}^{q-2+c_{i}}\right)=\prod_{i=1}^{k}\left(q-1+c_{i}\right)
$$

so

$$
\frac{\varphi(d(n))}{d(\varphi(n))}=\frac{q^{k-1}(q-1) 2^{s-1}}{\prod_{i=1}^{k}\left(q-1+c_{i}\right)}=2^{s-1} \cdot \frac{q-1}{q} \cdot \prod_{i=1}^{k} \frac{q}{q-1+c_{i}}
$$

which can be made arbitrarily close to $2^{s-1}$ by choosing $q$ large enough. It remains to show that $s$ can be arbitrarily large, i.e. that there can be arbitrarily many primes between $N$ and $2 N$.

This follows, for instance, from the well-known fact that $\sum \frac{1}{p}=\infty$, where the sum is taken over the set $\mathbb{P}$ of prime numbers. Indeed, if, for some constant $\stackrel{p}{C}$, there were always at most $C$ primes between $2^{\ell}$ and $2^{\ell+1}$, we would have

$$
\sum_{p \in \mathbb{P}} \frac{1}{p}=\sum_{\ell=0}^{\infty} \sum_{\substack{p \in \mathbb{P} \\ p \in\left[2^{\ell}, 2^{\ell+1}\right)}} \frac{1}{p} \leqslant \sum_{\ell=0}^{\infty} \frac{C}{2^{\ell}}<\infty,
$$

which is a contradiction.
Comment 1. Here we sketch several alternative elementary self-contained ways to perform the last step of the solution above. In particular, they avoid using divergence of $\sum \frac{1}{p}$.

Suppose that for some constant $C$ and for every $k=1,2, \ldots$ there exist at most $C$ prime numbers between $2^{k}$ and $2^{k+1}$. Consider the prime factorization of the factorial $\left(2^{n}\right)!=\prod p^{\alpha_{p}}$. We have $\alpha_{p}=\left\lfloor 2^{n} / p\right\rfloor+\left\lfloor 2^{n} / p^{2}\right\rfloor+\ldots$. Thus, for $p \in\left[2^{k}, 2^{k+1}\right)$, we get $\alpha_{p} \leqslant 2^{n} / 2^{k}+2^{n} / 2^{k+1}+\ldots=2^{n-k+1}$, therefore $p^{\alpha_{p}} \leqslant 2^{(k+1) 2^{n-k+1}}$. Combining this with the bound $(2 m)!\geqslant m(m+1) \cdot \ldots \cdot(2 m-1) \geqslant m^{m}$ for $m=2^{n-1}$ we get

$$
2^{(n-1) \cdot 2^{n-1}} \leqslant\left(2^{n}\right)!\leqslant \prod_{k=1}^{n-1} 2^{C(k+1) 2^{n-k+1}}
$$

or

$$
\sum_{k=1}^{n-1} C(k+1) 2^{1-k} \geqslant \frac{n-1}{2}
$$

that fails for large $n$ since $C(k+1) 2^{1-k}<1 / 3$ for all but finitely many $k$.
In fact, a much stronger inequality can be obtained in an elementary way: Note that the formula for $\nu_{p}(n!)$ implies that if $p^{\alpha}$ is the largest power of $p$ dividing $\binom{n}{n / 2}$, then $p^{\alpha} \leqslant n$. By looking at prime factorization of $\binom{n}{n / 2}$ we instantaneously infer that

$$
\pi(n) \geqslant \log _{n}\binom{n}{n / 2} \geqslant \frac{\log \left(2^{n} / n\right)}{\log n} \geqslant \frac{n}{2 \log n} .
$$

This, in particular, implies that for infinitely many $n$ there are at least $\frac{n}{3 \log n}$ primes between $n$ and $2 n$.
Solution 2. In this solution we will use the Prime Number Theorem which states that

$$
\pi(m)=\frac{m}{\log m} \cdot(1+o(1))
$$

as $m$ tends to infinity. Here and below $\pi(m)$ denotes the number of primes not exceeding $m$, and $\log$ the natural logarithm.

Let $m>5$ be a large positive integer and let $n:=p_{1} p_{2} \cdot \ldots \cdot p_{\pi(m)}$ be the product of all primes not exceeding $m$. Then $\varphi(d(n))=\varphi\left(2^{\pi(m)}\right)=2^{\pi(m)-1}$. Consider the number

$$
\varphi(n)=\prod_{k=1}^{\pi(m)}\left(p_{k}-1\right)=\prod_{s=1}^{\pi(m / 2)} q_{s}^{\alpha_{s}}
$$

where $q_{1}, \ldots, q_{\pi(m / 2)}$ are primes not exceeding $m / 2$. Note that every term $p_{k}-1$ contributes at most one prime $q_{s}>\sqrt{m}$ into the product $\prod_{s} q_{s}^{\alpha_{s}}$, so we have

$$
\sum_{s: q_{s}>\sqrt{m}} \alpha_{s} \leqslant \pi(m) \Longrightarrow \sum_{s: q_{s}>\sqrt{m}}\left(1+\alpha_{s}\right) \leqslant \pi(m)+\pi(m / 2) .
$$

Hence, applying the AM-GM inequality and the inequality $(A / x)^{x} \leqslant e^{A / e}$, we obtain

$$
\prod_{s: q_{s}>\sqrt{m}}\left(\alpha_{s}+1\right) \leqslant\left(\frac{\pi(m)+\pi(m / 2)}{\ell}\right)^{\ell} \leqslant \exp \left(\frac{\pi(m)+\pi(m / 2)}{e}\right)
$$

where $\ell$ is the number of primes in the interval $(\sqrt{m}, m]$.
We then use a trivial bound $\alpha_{i} \leqslant \log _{2}(\varphi(n)) \leqslant \log _{2} n<\log _{2}\left(m^{m}\right)<m^{2}$ for each $i$ with $q_{i}<\sqrt{m}$ to obtain

$$
\prod_{s=1}^{\pi(\sqrt{m})}\left(\alpha_{s}+1\right) \leqslant\left(m^{2}\right)^{\sqrt{m}}=m^{2 \sqrt{m}}
$$

Putting this together we obtain

$$
d(\varphi(n))=\prod_{s=1}^{\pi(m / 2)}\left(\alpha_{s}+1\right) \leqslant \exp \left(2 \sqrt{m} \cdot \log m+\frac{\pi(m)+\pi(m / 2)}{e}\right)
$$

The prime number theorem then implies that

$$
\limsup _{m \rightarrow \infty} \frac{\log (d(\varphi(n)))}{m / \log m} \leqslant \limsup _{m \rightarrow \infty} \frac{2 \sqrt{m} \cdot \log m}{m / \log m}+\limsup _{m \rightarrow \infty} \frac{\pi(m)+\pi(m / 2)}{e \cdot m / \log m}=\frac{3}{2 e} .
$$

Whereas, again by prime number theorem, we have

$$
\liminf _{m \rightarrow \infty} \frac{\log (\varphi(d(n)))}{m / \log m}=\liminf _{m \rightarrow \infty} \frac{\log \left(2^{\pi(m)-1}\right)}{m / \log m}=\log 2
$$

Since $\frac{3}{2 e}<\frac{3}{5}<\log 2$, this implies that $\varphi(d(n)) / d(\varphi(n))$ can be arbitrarily large.

Comment 2. The original formulation of the problem was asking whether $d(\varphi(n)) \geqslant \varphi(d(n))$ for all but finitely many values of $n$. The Problem Selection Committee decided that the presented version is better suited for the Shortlist.

This page is intentionally left blank

N7. Let $\mathcal{S}$ be a set consisting of $n \geqslant 3$ positive integers, none of which is a sum of two other distinct members of $\mathcal{S}$. Prove that the elements of $\mathcal{S}$ may be ordered as $a_{1}, a_{2}, \ldots, a_{n}$ so that $a_{i}$ does not divide $a_{i-1}+a_{i+1}$ for all $i=2,3, \ldots, n-1$.
(Ukraine)
Common remarks. In all solutions, we call a set $\mathcal{S}$ of positive integers good if no its element is a sum of two other distinct members of $\mathcal{S}$. We will use the following simple observation.
Observation A. If $a, b$, and $c$ are three distinct elements of a good set $\mathcal{S}$ with $b>a, c$, then $b \nmid a+c$. Otherwise, since $b \neq a+c$, we would have $b \leqslant(a+c) / 2<\max \{a, c\}$.

Solution 1. We prove the following stronger statement.
Claim. Let $\mathcal{S}$ be a good set consisting of $n \geqslant 2$ positive integers. Then the elements of $\mathcal{S}$ may be ordered as $a_{1}, a_{2}, \ldots, a_{n}$ so that $a_{i} \nmid a_{i-1}+a_{i+1}$ and $a_{i} \nmid a_{i-1}-a_{i+1}$, for all $i=2,3, \ldots, n-1$. Proof. Say that the ordering $a_{1}, \ldots, a_{n}$ of $\mathcal{S}$ is nice if it satisfies the required property.

We proceed by induction on $n$. The base case $n=2$ is trivial, as there are no restrictions on the ordering.

To perform the step of induction, suppose that $n \geqslant 3$. Let $a=\max \mathcal{S}$, and set $\mathcal{T}=\mathcal{S} \backslash\{a\}$. Use the inductive hypothesis to find a nice ordering $b_{1}, \ldots, b_{n-1}$ of $\mathcal{T}$. We will show that $a$ may be inserted into this sequence so as to reach a nice ordering of $\mathcal{S}$. In other words, we will show that there exists a $j \in\{1,2, \ldots, n\}$ such that the ordering

$$
N_{j}=\left(b_{1}, \ldots, b_{j-1}, a, b_{j}, b_{j+1}, \ldots, b_{n-1}\right)
$$

is nice.
Assume that, for some $j$, the ordering $N_{j}$ is not nice, so that some element $x$ in it divides either the sum or the difference of two adjacent ones. This did not happen in the ordering of $\mathcal{T}$, hence $x \in\left\{b_{j-1}, a, b_{j}\right\}$ (if, say, $b_{j-1}$ does not exist, then $x \in\left\{a, b_{j}\right\}$; a similar agreement is applied hereafter). But the case $x=a$ is impossible: $a$ cannot divide $b_{j-1}-b_{j}$, since $0<\left|b_{j-1}-b_{j}\right|<a$, while $a \nmid b_{j-1}+b_{j}$ by Observation A. Therefore $x \in\left\{b_{j-1}, b_{j}\right\}$. In this case, assign the number $x$ to the index $j$.

Suppose now that none of the $N_{j}$ is nice. Since there are $n$ possible indices $j$, and only $n-1$ elements in $\mathcal{T}$, one of those elements (say, $b_{k}$ ) is assigned to two different indices, which then should equal $k$ and $k+1$. This means that $b_{k}$ divides the numbers $b_{k-1}+\varepsilon_{1} a$ and $a+\varepsilon_{2} b_{k+1}$, for some signs $\varepsilon_{1}, \varepsilon_{2} \in\{-1,1\}$. But then

$$
b_{k-1} \equiv-\varepsilon_{1} a \equiv \varepsilon_{1} \varepsilon_{2} b_{k+1} \quad\left(\bmod b_{k}\right),
$$

and therefore $b_{k} \mid b_{k-1}-\varepsilon_{1} \varepsilon_{2} b_{k+1}$, which means that the ordering of $\mathcal{T}$ was not nice. This contradiction proves the step of induction.

Solution 2. We again prove a stronger statement.
Claim. Let $\mathcal{S}$ be an arbitrary set of $n \geqslant 3$ positive integers. Then its elements can be ordered as $a_{1}, \ldots, a_{n}$ so that, if $a_{i} \mid a_{i-1}+a_{i+1}$, then $a_{i}=\max \mathcal{S}$.

The claim easily implies what we need to prove, due to Observation A.
To prove the Claim, introduce the function $f$ which assigns to any two elements $a, b \in \mathcal{S}$ with $a<b$ the unique integer $f(a, b) \in\{1,2, \ldots, a\}$ such that $a \mid b+f(a, b)$. Hence, if $b \mid a+c$ for some $a, b, c \in \mathcal{S}$ with $a<b<c$, then $a=f(b, c)$. Therefore, the Claim is a consequence of the following combinatorial lemma.

Lemma. Let $\mathcal{S}$ be a set of $n \geqslant 3$ positive integers, and let $f$ be a function which assigns to any $a, b \in \mathcal{S}$ with $a<b$ some integer from the range $\{1, \ldots, a\}$. Then the elements of $\mathcal{S}$ may be ordered as $a_{1}, a_{2}, \ldots, a_{n}$ so as to satisfy the following two conditions simultaneously:
(i) Unimodality: There exists a $j \in\{1,2, \ldots, n\}$ such that $a_{1}<a_{2}<\ldots<a_{j}>a_{j+1}>\ldots>$ $a_{n}$; and
(ii) $f$-avoidance: If $a<b$ are two elements of $\mathcal{S}$, which are adjacent in the ordering, then $f(a, b)$ is not adjacent to $a$.
Proof. We call an ordering of $\mathcal{S}$ satisfying (i) and (ii) $f$-nice. We agree that $f(x, y)=x$ for $x \geqslant y$; this agreement puts no extra restriction.

We proceed by induction; for the base case $n=3$, it suffices to put the maximal element in $\mathcal{S}$ onto the middle position.

To perform the step of induction, let $p<q$ be the two minimal elements of $\mathcal{S}$, and set $\mathcal{T}=\mathcal{S} \backslash\{p\}$. Define a function $g$ by assigning to any elements $a<b$ of $\mathcal{T}$ the value

$$
g(a, b)= \begin{cases}q, & \text { if } f(a, b)=p \\ f(a, b), & \text { otherwise }\end{cases}
$$

Notice that $g(a, b) \leqslant a$ for all $a, b \in \mathcal{T}$.
Use the inductive hypothesis to get a $g$-nice ordering $b_{1}, b_{2}, \ldots, b_{n-1}$ of $\mathcal{T}$. By unimodality, either $b_{1}$ or $b_{n-1}$ equals $q$; these cases differ only by reverting the order, so we assume $b_{1}=q$.

Notice that, according to (1), the number $f\left(b_{2}, b_{3}\right)$ differs from both $p$ and $q$. On the other hand, the number $f\left(b_{n-1}, b_{n-2}\right)$ differs from at least one of them - say, from $r$; set $s=p+q-r$, so that $\{r, s\}=\{p, q\}$. Now, order $\mathcal{S}$ as

$$
s, b_{2}, b_{3}, \ldots, b_{n-1}, r
$$

By the induction hypothesis and the above choice, this ordering is nice.
Comment. In the original proposal, the numbers in the set were assumed to be odd (which implies that none is a sum of two others); moreover, the proposal requested to arrange in a row all numbers but one.

On the other hand, Solution 2 shows that the condition of $\mathcal{S}$ being good may be relaxed to the condition that the maximal element of $\mathcal{S}$ is not a sum of two other elements in $\mathcal{S}$. On the other hand, the set $\{1,2,3\}$ shows that the condition cannot be merely omitted.

The Problem Selection Committee considered several versions of the problem and chose the best version in their opinion for the Shortlist.

61st International
Mathematical
Olympiad
Saint Petersburg
Russia

## ORGANIZERS

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-90.jpg?height=341&width=275&top_left_y=1006&top_left_x=225)

Ministry of Education of the Russian Federation
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-90.jpg?height=338&width=338&top_left_y=1010&top_left_x=668)

Herzen State Pedagogical University of Russia
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-90.jpg?height=330&width=317&top_left_y=1020&top_left_x=1095)

Government of St. Petersburg
![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-90.jpg?height=295&width=432&top_left_y=1052&top_left_x=1457)

Presidential Physics and Mathematics Lyceum №239

## OFFICIAL SPONSOR

![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-90.jpg?height=238&width=315&top_left_y=1983&top_left_x=873)

HUAWEI