-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath_rules.py
More file actions
2289 lines (2289 loc) · 190 KB
/
Copy pathmath_rules.py
File metadata and controls
2289 lines (2289 loc) · 190 KB
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
MATH_RULES = \
[ { 'description': 'Infinite tower of powers, repeated exponentiations to infinity, x to the '
'power of x to infinity.',
'hint': 'ATTENTION: An infinite tower of powers only converges for a value <= e^(1/e) ≈ '
'1.4447. If the value is greater, the equation has no real solution. Answer with '
'\\boxed{no_solution}.',
'id': 'teorema_tetratie'},
{ 'description': 'Geometry problem with parallel lines intersected by secants (AB and AC) and '
'an isosceles triangle (AB = BC), where the measure of angle x is required.',
'hint': 'ATTENTION: First determine the angle formed by secant AB using alternate or '
'supplementary angles. Since the triangle ABC is isosceles (AB = BC), the angles '
'at the base AC are congruent ($\\angle BAC = \\angle BCA$). Use the sum of the '
'angles in the triangle ($180^\\circ$) and the properties of parallel lines to '
'isolate and calculate the value of angle x.',
'id': 'geometrie_unghiuri_paralele_isoscel'},
{ 'description': 'Combinatorics problem involving seating 7 people at a round table, with the '
'restriction that 3 specific people (eg Pierre, Rosa, Thomas) are not allowed '
'to sit next to each other (they cannot be adjacent). The number of distinct '
'circular arrangements is required.',
'hint': 'CAUTION: DO NOT use the Principle of Inclusion and Exclusion (PIE), as '
'calculating the intersection of 3 pairs on a round table frequently leads to '
"logic errors. Use the 'Gap Method': 1. First seat the other 4 people without "
'restrictions at the round table using the circular permutations formula: '
'$(4-1)!$. 2. Notice that these 4 people create exactly 4 empty spaces (gaps) '
'between them. 3. Place the 3 people with restrictions in these 4 gaps, '
'calculating arrangements of 4 taken by 3 ($A_4^3$). Multiply the result of the '
'circular permutations by the result of the arrangements to get the total.',
'id': 'combinatorica_aranjamente_circulare_restrictii_adiacenta'},
{ 'description': 'Combinatorics problem involving the distribution of 3 types of elements (ice '
'cream flavors) to 9 distinct subjects (players), respecting strict '
'conditions of order size and minimum presence: $n(C) > n(V) > n(nS) \\ge 1$ '
'and their sum being 9. It is required to calculate the total number of '
'possible distributions $N$ and the remainder of its division by 1000.',
'hint': 'To solve the problem, follow these steps: 1. Identify all triplets of positive '
'integers $(c, v, s)$ that satisfy the conditions: $c + v + s = 9$ and $c > v > s '
'\\ge 1$. These are the only valid partitions: (6, 2, 1), (5, 3, 1), and (4, 3, '
'2). 2. For each triplet, calculate the number of ways to assign flavors to the 9 '
'players using the multinomial coefficient formula: $\\frac{9!}{c! \\cdot v! '
'\\cdot s!}$. 3. Calculate the values: for (6,2,1) we have $\\frac{9!}{6!2!1!} = '
'252$, for (5,3,1) we have $\\frac{9!}{5!3!1!} = 504$, and for (4,3,2) we have '
'$\\frac{9!}{4!3!2!} = 1260$. 4. Sum these results to get $N$ ($252 + 504 + 1260 = '
'2016$). 5. The final result is the remainder of dividing $N$ by 1000.',
'id': 'combinatorica_partitii_multimi_coeficienti_multinomiali'},
{ 'description': 'Minimizing a sum of radicals of degree 2 (sqrt) with variables x and y. '
'Form: \\sqrt{x^2+a^2} + \\sqrt{y^2+b^2} + \\sqrt{(x-c)^2+(y-d)^2}.',
'hint': 'CAUTION: DO NOT use partial derivatives! The resulting equations are too complex. '
"Use Minkowski's Inequality: the sum of the lengths of several vectors is minimal "
'when the vectors are collinear. 1. Identify the pairwise vectors '
'(comp_horizontal, comp_vertical) for each radical. For example: \\vec{u}=(x, 20), '
'\\vec{v}=(30, y), \\vec{w}=(40-x, 50-y). 2. Choose the components so that when '
'the vectors (\\vec{u}+\\vec{v}+\\vec{w}) are added, the variables x and y cancel. '
'3. The minimum value is the length of the resulting sum vector: \\sqrt{(\\sum '
'comp\\_oriz)^2 + (\\sum comp\\_vert)^2}.',
'id': 'minim_suma_radicali_minkowski'},
{ 'description': 'Converting a point from Cartesian coordinates to polar coordinates.',
'hint': '1. Use the formulas r = sqrt(x^2 + y^2) and tan(theta) = y/x. 2. For the point '
'(0,3), x=0 and y=3, so r = sqrt(0^2 + 3^2) = 3. 3. Since the point is on the '
'positive y-axis, the angle theta is pi/2. 4. The final result in the form (r, '
'theta) is (3, pi/2).',
'id': '1_coord_rect_to_polar'},
{ 'description': 'Expressing an infinite double sum in terms of two given infinite sums p and '
'q.',
'hint': '1. Denote the double sum by S. Make a change of variable: let n = j + k. Since j '
'>= 1 and k >= 1, n varies from 2 to infinity. 2. For a fixed n, the number of '
'pairs of integers (j, k) satisfying j + k = n is n - 1. 3. Rewrite the double sum '
'as a simple sum: S = sum_{n=2}^infty (n - 1) / n^3. 4. Separate the fraction: (n '
'- 1) / n^3 = 1/n^2 - 1/n^3. 5. S = sum_{n=2}^infty (1/n^2) - sum_{n=2}^infty '
'(1/n^3). 6. Add and subtract the term for n=1: S = (p - 1) - (q - 1) = p - q.',
'id': '2_series_sum_j_k'},
{ 'description': 'Evaluating a rational function at several points and calculating the sum of '
'the values.',
'hint': '1. Calculate f(-2) replacing x by -2: (3*(-2) - 2) / (-2 - 2) = -8 / -4 = 2. 2. '
'Calculate f(-1) replacing x by -1: (3*(-1) - 2) / (-1 - 2) = -5 / -3 = 5/3. 3. '
'Calculate f(0) replacing x with 0: -2 / -2 = 1. 4. Add the three values: 2 + 5/3 '
'+ 1 = 3 + 5/3 = 14/3. 5. As a neuro-symbolic approach, you can delegate the '
'computation of the arithmetic expression to a Python interpreter.',
'id': '3_function_evaluation'},
{ 'description': 'Calculating the number of positive divisors for a given integer (196).',
'hint': '1. Decompose the number 196 into prime factors. 196 = 14^2 = (2 * 7)^2 = 2^2 * '
'7^2. 2. Use the formula for the number of divisors: if n = p1^a1 * p2^a2 * ..., '
'then the number of divisors is (a1 + 1)(a2 + 1)... 3. For 196, the exponents of '
'both prime factors are 2. 4. Calculate the product (2 + 1)(2 + 1) = 3 * 3 = 9. '
'The number 196 has 9 positive divisors.',
'id': '4_number_of_divisors'},
{ 'description': 'Determining the highest average speed based on a distance-time graph.',
'hint': '1. Average speed is the ratio of distance to time (v = d / t). 2. On a graph with '
'distance on the y-axis and time on the x-axis, velocity represents the slope of '
'the line joining the origin to that point. 3. Calculate the y/x ratio for each '
'plotted point. 4. The point with the highest y/x ratio (steepest slope from the '
'origin) indicates the student with the highest speed. For example, Evelyn has '
'approx. 4.5/1.25 = 3.6, way above the rest.',
'id': '5_greatest_average_speed_graph'},
{ 'description': 'Calculating the perimeter of a regular hexagon knowing the perimeter of one '
'of the equilateral triangles into which it was divided.',
'hint': '1. An equilateral triangle has 3 equal sides. If its perimeter is 21, the side is '
'21 / 3 = 7 inches. 2. A regular hexagon divided from the center forms 6 '
'equilateral triangles, where the side of the triangle is equal to the side of the '
'hexagon. 3. The perimeter of the regular hexagon with 6 sides is 6 * side. 4. '
'Calculate 6 * 7 = 42 inches.',
'id': '6_hexagon_perimeter'},
{ 'description': 'Finding the smallest positive perfect cube that can be written as the sum of '
'three consecutive integers.',
'hint': '1. The sum of three consecutive integers (n-1) + n + (n+1) is equal to 3n. 2. So '
'the perfect cube sought must be a multiple of 3. 3. The smallest positive perfect '
'cube that is a multiple of 3 must have the factor 3 to the 3rd power (ie '
'divisible by 27). 4. We check the first such perfect positive cube: 3^3 = 27. 5. '
'We set 3n = 27, which gives n = 9, so the numbers are 8, 9, 10. The answer is 27.',
'id': '7_smallest_perfect_cube_sum_consecutive'},
{ 'description': 'Determining the angle between two lines in 3D space given by symmetric '
'equations.',
'hint': '1. Find the direction vector for the first line: 2x = 3y = -z = t implies x=t/2, '
'y=t/3, z=-t. The vector v1 is proportional to (3, 2, -6). 2. Find the direction '
'vector for the second line: 6x = -y = -4z = s implies x=s/6, y=-s, z=-s/4. The '
'vector v2 is proportional to (2, -12, -3). 3. Calculate the dot product v1 dot v2 '
'= 3*2 + 2*(-12) + (-6)*(-3) = 6 - 24 + 18 = 0. 4. Since the dot product is 0, the '
'vectors are perpendicular, so the angle is 90 degrees.',
'id': '8_angle_between_3d_lines'},
{ 'description': 'The intersection of a periodic (or piecewise) function with a non-periodic '
'curve (ex: parabola, circle).',
'hint': "1. It doesn't iterate ad infinitum. Find the bounds where the intersection is "
'possible. For example, if f(x) is bounded between [a, b], solve the inequality a '
'<= curve(x) <= b to find the range of x. 2. Use the symmetry of the curve if it '
'exists (ex: parabolas are symmetric about the vertex). 3. Compute intersections '
'only in the valid range, then sum the results.',
'id': 'gen_periodic_func_intersection'},
{ 'description': 'Solving systems of cyclic algebraic inequalities (eg: expressions of the '
'form x - yz < y - zx).',
'hint': '1. Cyclic or symmetric algebraic inequalities usually hide a factorization. 2. '
'Move all terms to one side of the inequality. 3. Group the terms and force the '
'common factor (ex: x - y + zx - yz = (x - y)(1 + z)). 4. Analyze the sign of the '
'obtained factors to deduce the order relationships between the variables (eg: who '
'is greater, who is positive/negative).',
'id': 'gen_cyclic_inequalities_factorization'},
{ 'description': 'Calculation of the Expected Value (Expected Value) for geometric '
'intersections (eg: chords on a circle).',
'hint': "1. Don't try to simulate all cases. Use Linearity of Expectation: E[A + B] = E[A] "
'+ E[B]. 2. To find the expected number of intersections of random chords in a '
'circle, remember that 4 points on the circle form exactly one pair of chords that '
'intersect internally (out of the 3 ways to connect them). So the probability is '
'1/3. 3. Apply combinations: E[intersections] = Combinations(N, 2) * '
'probability_of_intersection.',
'id': 'gen_expected_value_geometry'},
{ 'description': 'Minimizing the sum of the distances from a point to the vertices of a '
'polygon (ex: AX + BX + CX...).',
'hint': '1. To minimize distances, do not use complicated derivatives in Cartesian '
'coordinates. 2. Consider the Triangle Inequality: the minimum distance between '
'two points is a straight line. 3. Use Unfolding or geometric rotations (such as '
'the Fermat-Torricelli Point for triangles) to align the points on a single line. '
'4. If the polygon has special angles (ex: 60, 90 degrees), rotate the sub-figures '
'to build equilateral triangles or auxiliary rectangles.',
'id': 'gen_geometric_optimization_distance'},
{ 'description': 'Solving Diophantine equations with sums of large powers and large moduli '
'(eg: a^3 + b^3 + c^3 = 0 mod p^k).',
'hint': '1. AVOID BRUTE FORCE in Python for large modules (eg gives Timeout). 2. Reduce '
'the problem to a small module first. For example, for cubes, analyze the equation '
'modulo 9 (perfect cubes modulo 9 are always 0, 1, or -1). 3. After finding the '
"basic solutions, use Hensel's Lemma (Lifting The Exponent Lemma) to lift the "
'solution from mode p to mode p^k. 4. Look for symmetries and permutations of '
'solutions (a, b, c).',
'id': 'gen_number_theory_modulo_powers'},
{ 'description': 'Extracting the final format required by the problem (eg: answer of the form '
'm + n*sqrt(p), requires m+n+p).',
'hint': '1. When the problem requires computing a final expression from the format '
'parameters (eg: a + b + c), use SymPy to force pattern matching (eg: expr.match(m '
'+ n*sqrt(p))). 2. If pattern matching fails, isolate the coefficients by '
'converting the expression to a dictionary with expr.as_coefficients_dict() or by '
"substitutions (expr.subs). 3. The 'final_result' variable in the Python code must "
'ONLY contain the result of the final operation (m+n+p), not the raw math '
'expression.',
'id': 'gen_sym_math_format_extraction'},
{ 'description': 'Program-of-Thought (PoT) code optimization to avoid runtime Timeouts.',
'hint': '1. If the search space is greater than 10^6 iterations, the Python code will '
'Timeout. 2. Use symbolic math (SymPy) to solve equations analytically instead of '
"using nested 'for' loops. 3. If you use dynamic programming (DP) or frequency "
'tables, make sure you apply modular reductions at each step, not just at the end, '
'to keep the numbers small.',
'id': 'gen_code_optimization_math'},
{ 'description': 'Counting the number of regions into which a plane or disk is divided by a '
'set of lines.',
'hint': "1. Use Euler's Formula for planar graphs: V - E + F = 1 + C (where F is the "
'number of regions). 2. A direct theorem for lines in the plane: R = 1 + L + I, '
'where R is the number of regions, L is the number of lines, and I is the number '
'of interior intersections. 3. Focus on calculating the number of intersections '
'(I) using combinatorics or probabilities, then apply the formula.',
'id': 'gen_graph_theory_regions'},
{ 'description': 'Calculation of the Euclidean distance between two points in the 2D plane.',
'hint': '1. Use the distance formula: d = sqrt((x2 - x1)^2 + (y2 - y1)^2). 2. Replace the '
'coordinates: x1=2, y1=-6, x2=-4, y2=3. 3. Calculate the differences: (-4 - 2)^2 = '
'(-6)^2 = 36 and (3 - (-6))^2 = 9^2 = 81. 4. Add the squares: 36 + 81 = 117. 5. '
'Simplify the radical: sqrt(117) = sqrt(9 * 13) = 3*sqrt(13).',
'id': '9_distance_between_points'},
{ 'description': 'Finding the number of distinct values \u200b\u200bthat can be obtained by '
'adding parentheses to an arithmetic expression.',
'hint': '1. The expression is a * b * c * d + e. 2. Any parentheses of the first 4 terms '
'will not change the result of the product because multiplication is associative, '
'except when addition (+ 1) is evaluated before some multiplications. 3. Since + '
'is the last operator, the ways to put parentheses are reduced to when 1 is added. '
'4. +1 can be added to 5, to (4*5), to (3*4*5), or to the whole product (2*3*4*5). '
'5. The possible values \u200b\u200bcorrespond to: 2*3*4*(5+1), 2*3*(4*5+1), '
'2*(3*4*5+1), (2*3*4*5)+1. They all generate distinct results, so there are 4 '
'values. 6. For a symbolic system, the construction of all parsing trees (Catalan '
'trees) can be delegated.',
'id': '10_parentheses_values'},
{ 'description': 'Finding the smallest positive multiple of 30 consisting of only the digits 0 '
'and 2.',
'hint': '1. A number is divisible by 30 if it is divisible by 10 and by 3. 2. Divisibility '
'by 10 means that the last digit must be 0. 3. Divisibility by 3 means that the '
'sum of its digits must be divisible by 3. 4. Using only the digits 0 and 2, the '
"sum of the digits will be 2 * k, where k is the number of digits of '2'. For the "
'sum to be a multiple of 3, k must be at least 3. 5. The smallest number '
'consisting of three 2s ending in 0 is 2220.',
'id': '11_least_multiple_30_digits_0_2'},
{ 'description': 'Determining the value of a polynomial of degree 5 that satisfies a 6-point '
'rational relation.',
'hint': '1. Transform the relation p(n) = n / (n^2 - 1) into the polynomial Q(x) = (x^2 - '
'1)p(x) - x = 0 for x = 2, 3, 4, 5, 6, 7. 2. Since p(x) has degree 5, Q(x) has '
'degree 7. The roots of Q(x) are 2, 3, 4, 5, 6, 7. 3. Q(x) is written as A * '
'(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-r). 4. Notice that Q(1) = -1 and Q(-1) = 1 (from '
'the definition of Q(x)). Use these two equations to find A and r. 5. After '
'deducing the final form of Q(x), calculate Q(8) and use it to extract p(8).',
'id': '12_polynomial_degree_5_interpolation'},
{ 'description': 'Calculation of the sum of the proper divisors for the sum of the proper '
'divisors of 284.',
'hint': '1. Find the sum of the proper divisors of 284. Decomposition: 284 = 2^2 * 71. The '
'proper divisors are 1, 2, 4, 71, 142. Their sum is 220. 2. Now calculate the sum '
'of the proper divisors for the new number, 220. Decomposition: 220 = 2^2 * 5 * '
'11. 3. The proper divisors they are 1, 2, 4, 5, 10, 20, 11, 22, 44, 55, 110. '
'Adding them, we get 284. 4. Symbolic observation: 220 and 284 form a pair of '
'friendly numbers.',
'id': '13_amicable_numbers_284'},
{ 'description': 'Determining the height of a cylinder knowing the volume and radius of the '
'base extracted from the diagram.',
'hint': '1. The formula for the volume of the cylinder is V = pi * r^2 * h. 2. From the '
'diagram, read the radius r = 3. 3. Substitute the values \u200b\u200bin the '
'formula: 45 * pi = pi * 3^2 * h. 4. Simplify the equation: 45 = 9 * h. 5. The '
'result is h = 5 cm.',
'id': '14_cylinder_height_from_volume'},
{ 'description': 'Using the sine function in a right triangle to find the length of a leg.',
'hint': '1. Identify the right angle in the diagram (here it is at point F, or E, depends '
'on asy; according to rightanglemark(D,E,F) the right angle is at E, so the '
'hypotenuse is DF). 2. The sine function for angle D is the opposite leg above the '
'hypotenuse: sin(D) = EF / DF. 3. Use the value sin(D) = 0.7 and the lengths given '
'on the figure to write an equation. 4. Apply the Pythagorean Theorem to find the '
'required side DE.',
'id': '15_right_triangle_trig_DE'},
{ 'description': 'Rotating a complex number around another complex number by a certain angle.',
'hint': '1. The mathematical formula for the rotation of a point z around c by the angle '
'theta is: w - c = (z - c) * e^(i*theta). 2. Here theta = pi/4, so the multiplier '
'is cos(pi/4) + i*sin(pi/4) = (sqrt(2)/2) * (1 + i). 3. First calculate the '
'difference (z - c). 4. Multiply the difference by the complex number of the '
'rotation. 5. Add c back to the result to get the coordinate of w.',
'id': '16_complex_rotation'},
{ 'description': 'Calculation of an alternating sum of consecutive numbers from 1 to 100.',
'hint': '1. Group the terms two by two: (1 - 2) + (3 - 4) + (5 - 6) + ... + (99 - 100). 2. '
'Calculate the sum of each pair, which is always -1. 3. As there are 100 numbers '
'in total, exactly 50 pairs are formed. 4. Multiply the number of pairs by the sum '
'per pair: 50 * (-1) = -50.',
'id': '17_alternating_sum'},
{ 'description': 'Finding the minimum positive phase shift for a sinusoidal function from its '
'graph.',
'hint': '1. The given equation is of the form y = a * sin(bx + c) + d. The Y-axis '
'translation is d. 2. Identify the equilibrium axis on the graph, the amplitude a, '
'and the period (which gives b). 3. The phase shift is -b/b. 4. Find the first '
'value of x where the function intersects the increasing d equilibrium axis. '
'There, the phase (bx + c) must be an even multiple of pi (ideally 0). 5. Solve '
'the inequality to find the smallest positive c.',
'id': '18_sine_graph_phase_shift'},
{ 'description': 'Determining an angle using the properties of parallel lines and the '
'isosceles triangle.',
'hint': '1. BC is parallel to the line through A. By alternate internal angles, the angle '
'formed at B (or C) is directly related to the angle at A. 2. We know that AB = '
'BC, which means that triangle ABC is isosceles, therefore the angles at the base '
'(BAC and BCA) are equal. 3. Match the adjacent 124-degree angle to the interior '
'angles using the sum of 180 degrees. 4. Find x from the sum of the interior '
'angles of the triangle.',
'id': '19_parallel_lines_isosceles_triangle'},
{ 'description': 'Finding the minimum value for the a parameter such that a reciprocal cubic '
'equation has only real roots.',
'hint': '1. Notice that the equation x^3 + ax^2 + ax + 1 = 0 always has the root x = -1 '
'(check by substitution). 2. Factor the polynomial by dividing by (x + 1). You get '
'(x + 1)(x^2 + (a - 1)x + 1) = 0. 3. For all roots to be real, the equation of '
'degree 2 must have a non-negative discriminant: Delta = (a - 1)^2 - 4 >= 0. 4. '
'Solve the inequality: (a - 1)^2 >= 4, which for a > 0 implies a - 1 >= 2, i.e. a '
'>= 3. The minimum value is 3.',
'id': '20_cubic_roots_real_a'},
{ 'description': 'Evaluating a simple expression with complex numbers.',
'hint': '1. Respects the order of operations: first perform the multiplication. 2. '
'Distribute the scalar 6 over the bracket: 6 * 1 + 6 * 2i = 6 + 12i. 3. Subtract '
'the term 3i from the result: 6 + 12i - 3i. 4. Group the imaginary parts: 12i - 3i '
'= 9i. The final result is 6 + 9i.',
'id': '21_complex_arithmetic'},
{ 'description': 'Finding the integer part of a power of the sum of two radicals using the '
'conjugate expression.',
'hint': '1. Write x = (sqrt(7) + sqrt(5))^6 and its conjugate y = (sqrt(7) - sqrt(5))^6. '
"2. Expanding the sum x + y with Newton's Binomial, all terms with odd powers "
'reduce, resulting in an even integer N. 3. Since 0 < sqrt(7) - sqrt(5) < 1, it '
'follows that 0 < y < 1. 4. Since x + y = N and y is fractional, it follows that x '
'= N - y, so x is N - 1 (an integer) plus a fraction (1 - y). The integer part of '
'x is therefore N - 1. 5. Calculate N by stepwise exponentiations.',
'id': '22_greatest_integer_less_than_power'},
{ 'description': 'Solving an algebra problem with proportions and linear equations about pay '
'per unit.',
'hint': '1. Write down the payment factor. The ratio of earnings depends solely on the '
'number of dogs allocated to each. 2. Case 1: Denali gets 4x dogs (total 16 + 4x), '
'Nate has 12. Payout ratio is (16 + 4x)/12. 3. Case 2: x dogs are moved from Nate '
'to Denali. Denali is 16 + x, Nate is 12 - x. The ratio becomes (16 + x)/(12 - x). '
'4. Since the ratios are equal, construct the equation: (16 + 4x)/12 = (16 + '
'x)/(12 - x). 5. Multiply by the diagonal, develop and solve the quadratic '
'equation for x (ignoring the solution x=0).',
'id': '23_dog_walking_ratio_algebra'},
{ 'description': 'Solving an irrational equation with one variable.',
'hint': '1. Isolate the radical by moving the constant: x - 4 = sqrt(11 - 2x). 2. Put the '
'condition of existence of the radical (11 - 2x >= 0) and equality (x - 4 >= 0). '
'3. Square both sides: (x - 4)^2 = 11 - 2x, which becomes x^2 - 8x + 16 = 11 - 2x. '
'4. Reduce to standard form: x^2 - 6x + 5 = 0. The roots are 1 and 5. 5. Be sure '
'to check the roots in the original equation! For x=1 you get 1 = 3 + 4 (false). '
'For x=5 you get 5 = 1 + 4 (true). The only solution is 5.',
'id': '24_radical_equation'},
{ 'description': 'Calculation of the minimum compound interest rate for an ordinary annuity '
'(annual deposits).',
'hint': '1. The worker makes 3 deposits at the end of years 1, 2, and 3. 2. Let the '
'interest rate be r and the multiplier x = 1 + r. The first deposit earns interest '
'for 2 years, the second for 1 year, the third for 0 years. 3. Add the values: '
'20000*x^2 + 20000*x + 20000 = 66200. 4. Divide by 20000: x^2 + x + 1 = 3.31, i.e. '
"x^2 + x - 2.31 = 0. 5. Solve the quadratic equation with Bhaskara's formula "
'(Delta). The percentage rate is (x - 1) * 100.',
'id': '25_compound_interest_annuity'},
{ 'description': 'In $\\triangle ABC$, points $D$ and $E$ on side $\\overline{AB}$ and $F$ and '
'$G$ on side $\\overline{AC}$ obey certain constant length ratios. Knowing '
'the area of \u200b\u200bthe quadrilateral $DEGF$ (288), it is required to '
'calculate the area of \u200b\u200ba heptagon obtained by reflecting the '
'points $D$ and $G$.',
'hint': '1. Analyze the given proportions on the sides: note that $AD:DE:EB = 4:16:8 = '
'1:4:2$ and $AF:FG:GC = 13:52:26 = 1:4:2$. 2. We deduce from these proportions '
'that the lines are parallel ($DF \\parallel EG \\parallel BC$), which implies the '
'similarity of three triangles: $\\triangle ADF \\sim \\triangle AEG \\sim '
'\\triangle ABC$. 3. Use similarity ratios to find areas. The similarity ratio '
'between $\\triangle ADF$ and $\\triangle AEG$ is $\\frac{1}{5}$, so the ratio of '
'their areas is $\\frac{1}{25}$. The area of \u200b\u200bthe quadrilateral $DEGF$ '
'will be $25 - 1 = 24 \\cdot \\text{Area}(\\triangle ADF)$. 4. Calculate the total '
'area of \u200b\u200b$\\triangle ABC$ knowing that the similarity ratio to '
'$\\triangle ADF$ is 7, so its area is 49 times larger. 5. By compensating the '
'areas of the reflections ($M$ and $N$), prove that the required heptagon recovers '
'the empty spaces and has exactly the same area as the original triangle '
'$\\triangle ABC$.',
'id': 'geometrie_asemanare_proportii_arii'},
{ 'description': 'Number theory and algebra problem that requires finding the number of '
'ordered pairs of integers $(x,y)$ in the interval $[-100, 100]$ that satisfy '
'the homogeneous Diophantine equation of the second degree: $12x^2 - xy - '
'6y^2 = 0$.',
'hint': '1. Factor the quadratic expression as a product of two binomials: $12x^2 - xy - '
'6y^2 = (4x - 3y)(3x + 2y) = 0$. 2. Separate the problem into two independent '
'linear equations (cases): $4x = 3y$ and $3x = -2y$. 3. For the first case, write '
'$y = \\frac{4}{3}x$. The condition that $y$ is an integer requires that $x$ be a '
'multiple of 3. Calculate how many multiples of 3 exist in the given interval, '
'subject to the condition that $y \\in [-100, 100]$. 4. Repeat the analysis for '
'the second case, where $y = -\\frac{3}{2}x$, so $x$ must be even. Find the number '
'of solutions respecting the limits of the interval. 5. Add the results of the two '
'cases, but be careful to subtract 1 at the end so as not to count twice the '
'trivial solution $(0,0)$ that appears in both places.',
'id': 'algebra_ecuatii_diofantice_omogene'},
{ 'description': 'Counting problem. There are $8!$ distinct 8-digit numbers formed using only '
'the digits $1, 2, \\dots, 8$. It is necessary to determine how many of these '
'numbers are divisible by $22$.',
'hint': '1. The criterion of divisibility by 22 simultaneously implies divisibility by 2 '
'(the last digit is even) and by 11. 2. According to the criterion by 11, the '
'difference between the sum of the digits in even positions and the sum of those '
'in odd positions must be a multiple of 11. Since the total sum of the 8 digits is '
'36, the only valid mathematical option is that both sums be 18. 3. Find the '
'partitions (the subsets) of exactly 4 distinct digits from the set $\\{1..8\\}$ '
'that sum to 18. Analysis will show that there are exactly 7 such pairs of '
'complementary subsets. 4. For each such pair, choose one set for the even '
'positions and another for the odd positions (and vice versa, multiplying by 2). '
'5. Apply positional permutations: permute $4!$ ways for odd positions, and note, '
'for even positions the restriction that the last digit of the general number be '
'from the set of even digits must be imposed, changing the simple formula of $4!$ '
'into a probabilistic calculation based on how many even digits the current set '
'contains.',
'id': 'combinatorica_permutari_criterii_divizibilitate'},
{ 'description': 'Problem of mathematical analysis and analytic geometry. The intersection of '
'a recursively defined sawtooth linear function f(x+4) = f(x) and a parabola '
'x = 34y^2. The sum of the ordinates (y) of all intersection points is '
'required.',
'hint': '1. Analyze the periodic function f(x). Its graph is a zigzag between y = -1 and y '
'= 1. The period is 4. 2. The parabola is horizontal, open to the right, symmetric '
'about the Ox axis. 3. Since f(x) is bounded between [-1, 1], the intersections '
'can have the y-coordinate only in the interval [-1, 1]. Therefore, x (which is '
'34y^2) will take values \u200b\u200bbetween [0, 34]. 4. Calculate how many saw '
"'teeth' are in the range x of [0, 34]. 5. For each linear segment of the function "
'f(x) in this interval, write the equation of the segment in the form x = my + c. '
'6. Substitute in the equation of the parabola: my + c = 34y^2. 7. Use SymPy to '
'solve the resulting quadratic equations for y, checking that y belongs to the '
'valid segment. 8. Collect all valid solutions for y. The symmetry of the '
'functions will cancel out most of the terms, leaving the required expression.',
'id': '10_functii_liniare_pe_portiuni_parabola_intersectii'},
{ 'description': 'System of nonlinear inequalities in 3D space, restricted to the plane '
'x+y+z=75. The defined regions form convex areas. The area of \u200b\u200bthe '
'only region with finite area is required.',
'hint': '1. Simplify the inequalities: x - yz < y - zx becomes (x - y)(1 + z) < 0, and y - '
'zx < z - xy becomes (y - z)(1 + x) < 0. 2. Combined with the third part, the '
'inequalities impose sign constraints on the pairs (x-y, 1+z), (y-z, 1+x), and '
'(z-x, 1+y). 3. Substitute x, y, z using the equation of the plane (eg z = 75 - x '
'- y) to reduce the problem to a 2D section in an oblique plane. 4. Analyze '
'regions logically: to obtain a finite region (a triangle in that plane), the '
'variables must be bounded by the lines x=y, y=z, z=x and x=-1, y=-1, z=-1. 5. '
'Find the vertices of this triangle in 3D space by solving systems of equations at '
'the boundaries (intersections of bounding planes/lines). 6. Use the formula for '
'the area of \u200b\u200ba 3D triangle (half the norm of the vector product of the '
'sides) via SymPy Vector.',
'id': '11_inegalitati_algebrice_geometrie_3D_plan_arii'},
{ 'description': 'A disc is divided into 4 quadrants. 25 segments are drawn by connecting '
'random edge points in different quadrants. The expected number of regions '
'into which the disk is divided is asked.',
'hint': "1. Use Euler's formula for planar regions: R = 1 + L + I, where R is the number "
'of regions, L is the number of lines (segments), and I is the number of interior '
'intersections. 2. Here you have L = 2 + 25 = 27 total lines (2 diameters + 25 '
'random segments). 3. The task is reduced to computing the expected number of '
'intersections, E[I]. The linearity of hope allows E[I] = Sum(E[I_jk]) for any '
'pair of segments j, k. 4. The diameters must intersect in 1 point (the center). '
'5. Calculate the probability that two random segments (or a segment and a '
'diameter) intersect, given the restriction that the extremities are in different '
'quadrants. 6. Program a small Monte Carlo simulator or calculate the exact '
'combinatorial probabilities, then apply the formula.',
'id': '12_geometrie_probabilitati_speranta_matematica_linii_disc'},
{ 'description': 'Convex pentagon ABCDE with certain sides and angles (B=E=60 degrees). The '
'minimum value of the sum of the distances from some point X to the 5 '
'vertices of the pentagon is required (the Fermat-Weber problem for the '
'pentagon).',
'hint': '1. The point that minimizes the sum of the distances to the vertices of a convex '
'polygon is often related to the intersection of diagonals or Fermat-Torricelli '
'points. 2. Analyze the 60 degree angles and given lengths. These suggest the '
"possibility of 'completing' the figure with equilateral triangles or the use of "
'rotations. 3. Notice the numerical relationships: the sides are 7, 14, 13, 26, '
'24. These form triangles with remarkable angles (eg the cosine theorem to find '
'the diagonals). 4. Use the generalized triangle inequality. The minimum sum is '
'obtained when X collinear with certain minimum distance paths between '
'non-adjacent vertices. 5. Transform the geometric problem: rotate points B and C '
'by 60 degrees. The minimum distance often aligns with straight segments resulting '
"from 'unfolding' by rotating the vertices.",
'id': '13_geometrie_pentagon_convex_minimizare_distante_fermat_weber'},
{ 'description': 'The number of ordered triplets (a,b,c) with elements up to 3^6, such that '
'the sum of the cubes a^3 + b^3 + c^3 is a multiple of 3^7. The remainder of '
'dividing this number by 1000 is required.',
'hint': '1. Analyze cubic residues modulo powers of 3. A number x is congruent to -1, 0, 1 '
'modulo 3. So x^3 is congruent to -1, 0, 1 modulo 9. 2. For the sum of cubes to be '
'divisible by 3^7, it must first be divisible by 9. The only way that a^3 + b^3 + '
'c^3 = 0 (mod 9) is as a, b, c be congruent to (0,0,0) or (1, 1, -2) etc., modulo '
"3. 3. Use Hensel's Lemma or the 'lifting' property of the exponent (LTE). 4. "
'Narrow the search space: since a,b,c <= 3^6, you can parametrize the solutions. '
'5. Delegate a Python script with a smart math approach (not brute force on 3^18): '
'calculate the frequency of the cubic residuals modulo 3^7 and do the convolution '
'(or polynomial multiplication/FFT) to find the number of ways to get the desired '
'sum.',
'id': '14_teoria_numerelor_congruente_cuburi_modulo'},
{ 'description': 'Six collinear points A-F with specific distances between them. A point G '
'outside the line with given distances CG and DG. The area of \u200b\u200bthe '
'triangle BGE is required.',
'hint': '1. Determines the relative positions of points on a line based on given distances '
'(eg, constructs coordinates on the Ox axis by setting C at the origin). 2. '
'Calculate the coordinates of points A, B, C, D, E, F along the axis. 3. Use the '
'coordinates of C, D and the distances CG, DG to find the coordinates of the point '
"G(x_g, y_g) by solving the circle system (Stewart's or Pythagorean theorem). 4. "
'After obtaining the coordinates of all points, extract the coordinates of the '
'vertices of the triangle BGE. 5. Calculate the required area using the '
'determinant formula (or base BE * height y_g / 2) directly through a SymPy '
'sequence.',
'id': '15_geometrie_coliniaritate_teorema_stewart_arii'},
{ 'description': 'The sum of all positive integers n such that n+2 divides the polynomial '
'expression 3(n+3)(n^2+9).',
'hint': '1. Reduce the polynomial expression modulo (n+2). 2. Substitute n = -2 in the '
'polynomial P(n) = 3(n+3)(n^2+9) (according to the Remainder Theorem). 3. P(-2) = '
'3 * 1 * 13 = 39. 4. For (n+2) to divide the polynomial, the remainder (39) must '
'be divisible by (n+2). 5. Find all positive divisors of 39. 6. Match n+2 to each '
'divisor, solve for n, keep only positive values \u200b\u200b(n > 0). 7. Calculate '
'the sum of these values.',
'id': '16_teoria_numerelor_divizibilitate_polinoame'},
{ 'description': 'Coloring 12 segments (red or blue) of a 2x2 grid of unit squares so that '
'each of the 4 squares has exactly 2 red and 2 blue sides.',
'hint': '1. Approach the problem through optimized brute force. There are 12 segments, so '
'2^12 = 4096 possible colorings in total. This is a very small number for '
'computers. 2. Identify the 12 segments (eg vertical v1-v6, horizontal h1-h6). 3. '
'Match each square in the 2x2 grid with the corresponding 4 sides. 4. Write a '
'Python script that uses `itertools.product` to generate the 4096 combinations. 5. '
'Checks the condition for each square: the sum of the boolean variables (1 for '
'red, 0 for blue) of its 4 sides must be exactly 2. 6. Counts the number of valid '
'configurations.',
'id': '17_combinatorica_grile_colorare_restrictii'},
{ 'description': 'Evaluating a large product of fractions with logarithms. Logarithm indices '
'and arguments follow a quadratic pattern. A fractional form m/n is required.',
'hint': '1. Use the properties of logarithms: log_A (X^Y) = Y * log_A (X) and change of '
'base log_a(b) = ln(b)/ln(a). 2. Rewrite the general term of the product. You will '
'notice that the ln(5) terms cancel (or group). 3. The argument is 5^(k^2 - 1) up '
'and 5^(k^2 - 4) down. Extract the exponents: k^2 - 1 = (k-1)(k+1) and k^2 - 4 = '
'(k-2)(k+2). 4. The full expression forms a massive telescoping double product '
'that will cancel out most of the internal terms, leaving only a few terms at the '
'limits k=4 and k=63. 5. Write a symbolic SymPy code (using `Product`) or '
'calculate the remaining terms by hand. 6. Simplify the fraction obtained to '
'extract m and n.',
'id': '18_algebra_logaritmi_produse_telescopice'},
{ 'description': 'Triangle ABC with given angles. D,E,F are the means of the sides. The '
'circumscribed circle of the triangle DEF (Circle of 9 points) cuts the lines '
'BD, AE, AF. A linear combination of the measures of three arcs on this '
'circle is required.',
'hint': '1. Recognize the configuration: the circle circumscribing the median triangle DEF '
"is the 'Circle of 9 points' of triangle ABC. 2. This circle also contains the "
'feet of the heights. 3. Use the angular properties of the Circle of 9 points: the '
'arcs on this circle are twice the corresponding angles in the triangle DEF. 4. '
'Triangle DEF is similar to triangle ABC (it has the same angles: 84, 60, 36). 5. '
'Determine the positions of the points G, H, J. G is the intersection of the '
'circle with BD, i.e. the leg of the altitude in A (since the circle 9 points '
'passes through the legs of the altitudes). 6. Calculate the angular measures of '
'the arcs using the inscribed angles. This is a perfect problem to delegate to an '
'angle geometry solver (or using angle arithmetic in Python with the relationships '
'demonstrated symbolically).',
'id': '19_geometrie_cerc_noua_puncte_arce_unghiuri'},
{ 'description': 'Problem of number theory and bases of numeration. Find the sum of all '
'integer bases b > 9 for which the number 17_b is a divisor of the number '
'97_b.',
'hint': '1. Convert the numbers to base 10: 17_b = b + 7 and 97_b = 9b + 7. 2. The problem '
'asks that (b + 7) divide (9b + 7). 3. Delegate the algebraic rewriting to the '
'symbolic engine: 9b + 7 = 9(b + 7) - 56. For the result to be integer, (b + 7) '
'must divide by 56. 4. Generate Python code that uses `sympy.divisors(56)` to get '
'all divisors (positive and negative). 5. For each divisor d, calculate b = d - 7. '
'6. Filter the results keeping only the values \u200b\u200bwhere b > 9. 7. '
'Calculate the sum of these valid values.',
'id': '0_baze_numeratie_divizibilitate_polinoame'},
{ 'description': 'Plane geometry problem with areas, similar triangles and point reflections. '
'In the triangle ABC the proportions are given on the sides AB and AC, and '
'the area of \u200b\u200ban intermediate quadrilateral DEGF. The area of '
'\u200b\u200ba heptagon formed by the reflections of the points is required.',
'hint': '1. Analyze the proportions of the sides: AD:DE:EB = 4:16:8 = 1:4:2 and AF:FG:GC = '
'13:52:26 = 1:4:2. Since the ratios are equal, the lines DF, EG, and BC are '
'parallel. 2. Define in SymPy a symbolic variable S for the area of '
'\u200b\u200btriangle ADF. 3. Use the similarity theorem: the area of '
'\u200b\u200btriangle AEG is (1+4)^2 * S = 25S. The area of \u200b\u200bthe '
'quadrilateral DEGF is the difference of the areas, i.e. 25S - S = 24S. 4. Equate '
'24S to 288 to find S. 5. Notice that the reflections (M vs. F, N vs. E) create '
'triangles with areas equivalent to the base due to conservation of distances (eg '
'area of \u200b\u200bFDM = area of \u200b\u200bADF). 6. Write a Python script that '
'adds the areas of the geometric components to find the total area of '
'\u200b\u200bthe heptagon.',
'id': '1_geometrie_asemanare_triunghiuri_reflexii_arii'},
{ 'description': 'Combinatorics and partitions problem. 9 members choose 3 flavors of ice '
'cream, with the restriction of strict inequality between the number of '
'choices (chocolate > vanilla > strawberry >= 1). The remainder of dividing '
'the total number of associations by 1000 is required.',
'hint': '1. Model the problem as finding integer partitions (c, v, s) where c + v + s = 9 '
'and c > v > s >= 1. 2. Ask the Python engine to programmatically find these '
'triplets (they will be 5+3+1 and 4+3+2). 3. For each valid triplet, the '
'combinations of players represent permutations with repetition. 4. Use '
'`math.comb` or multinomial coefficients (9! / (c! * v! * s!)) to calculate '
'associations for each case. 5. Sum up the results and apply modulo 1000 at the '
'end.',
'id': '2_combinatorica_partitii_multinomial_modulo'},
{ 'description': 'Find the number of ordered pairs (x,y) of integers in the interval [-100, '
'100] that satisfy the homogeneous Diophantine equation 12x^2 - xy - 6y^2 = '
'0.',
'hint': '1. Treat the expression as a homogeneous polynomial. 2. Delegate the task to the '
'SymPy engine: `sympy.factor(12*x**2 - x*y - 6*y**2)`. This will result in (4x - '
'3y)(3x + 2y) = 0. 3. The equation splits into two lines: y = (4/3)x and y = '
'-(3/2)x. 4. For the first line, x must be a multiple of 3. For the second, x must '
'be a multiple of 2. 5. Write Python code that iterates x from -100 to 100 and '
'counts how many pairs (x, y) also have y in the range [-100, 100].',
'id': '3_ecuatie_diofantica_patratica_factorizare_simbolica'},
{ 'description': 'Digit permutations and divisibility criteria. Out of the 8! numbers made up '
'of the digits 1-8 only once, the number of divisible by 22 is required.',
'hint': '1. A number is divisible by 22 if it is divisible by 2 (the last even digit) and '
'by 11 (the difference between the sums of the digits on the even and odd '
'positions is a multiple of 11). 2. The total sum of the digits 1..8 is 36. For '
'the difference to be 0 or a multiple of 11, the sums of the partitions must be 18 '
'and 18. 3. Since 8! = 40320 is an extremely small search space for computers, it '
'delegates direct brute-force solving. 4. Write a Python script using '
'`itertools.permutations(range(1, 9))` that: forms the number, checks `num % 22 == '
'0`, counts them (N), and returns the difference required by the problem.',
'id': '4_teoria_numerelor_divizibilitate_permutari_bruteforce'},
{ 'description': 'Circumscribed isosceles trapezium (inscribed circle) problem. The radius of '
'the circle is 3, the area of \u200b\u200bthe trapezoid is 72. The sum of the '
'squares of the lengths of the parallel bases r^2 + s^2 is required.',
'hint': '1. The radius of the inscribed circle is 3, so the height of the trapezoid is h = '
'6. 2. From the area formula: (r+s)/2 * 6 = 72, the sum of the bases results r+s = '
"24. 3. Since the quadrilateral has an inscribed circle (Pitot's theorem), the sum "
'of the bases is equal to the sum of the non-parallel sides: r+s = 2l, from which '
'the oblique side l = 12. 4. It forms a right triangle lowering the height: the '
'projection of the oblique side on the large base is (r-s)/2. By the Pythagorean '
'theorem: ((r-s)/2)^2 + h^2 = l^2. 5. Send the system of equations {r+s=24, '
'((r-s)/2)^2 + 36 = 144} to SymPy (`sympy.nonlinsolve`) to extract r and s '
'exactly, then calculate r^2 + s^2.',
'id': '5_geometrie_trapez_isoscel_circumscris_sisteme'},
{ 'description': 'The letters A-L (12 letters) are randomly grouped into 6 internally '
'alphabetically ordered pairs, then the 6 words are alphabetically ordered. '
'It asks for the probability that the last word listed contains the letter G.',
'hint': '1. Approach the problem by counting favorable cases against total cases. The way '
'to choose the 6 pairs is 11!! = 11*9*7*5*3*1. 2. For the letter G to be in the '
"last word, the word must be the largest alphabetically. G can only be 'pulled "
"down' if paired with larger letters (H, I, J, K, L). 3. Write a logical Python "
'script that recursively generates or combinatorially computes the number of ways '
'G ends up in the highest-prime pair. 4. Calculate the simplified fraction m/n '
'with `fractions.Fraction`, then extract the numerator and denominator to '
'calculate m+n.',
'id': '6_probabilitati_combinatorica_cuvinte_simulare_exacta'},
{ 'description': 'A system of equations with complex numbers determines exactly one solution. '
'The first equation is a circle, the second a median line. The sum of the '
'values \u200b\u200bof k is required as a fraction m/n, then m+n.',
'hint': '1. I translate complex numbers into the Cartesian plane: the first equation is '
'the circle with center C(25, 20) and radius 5. 2. The second equation is the '
'geometric place equidistant from the points (k+4, 0) and (k, 3), so the median of '
'the segment between them. 3. Use `sympy.geometry` or algebraic calculations to '
'define the k-dependent mediator equation. 4. For the unique solution, the median '
'must be tangent to the circle, that is, the distance from the center C(25, 20) to '
'the median must be exactly the radius (5). 5. Solve the resulting modulus '
'equation for k using SymPy. 6. Add the valid solutions, convert to fraction with '
'`sympy.Fraction` and return numerator + denominator.',
'id': '7_numere_complexe_geometrie_analitica_tangenta_fractii'},
{ 'description': 'The parabola y = x^2 - 4 is rotated by 60 degrees trigonometrically. The '
'point of intersection in quadrant IV between the original parabola and its '
'image is required.',
'hint': '1. Parameterize the original parabola: P(t) = (t, t^2 - 4). 2. Construct the 2D '
'rotation matrix for 60 degrees: R = [[cos(60), -sin(60)], [sin(60), cos(60)]]. 3. '
'Apply the matrix to find the parametric equations of the rotated parabola (X, Y). '
'4. The intersection condition is that (X, Y) also belongs to the original '
'parabola, so Y = X^2 - 4. 5. Formulate this complex equation and use '
'`sympy.solve` to find the root corresponding to quadrant IV (x > 0, y < 0). 6. '
'Extract the y coordinate in the required form and identify a, b, c by symbolic '
'pattern matching (`y.match( (a - sqrt(b)) / c )`.',
'id': '8_geometrie_analitica_parabola_rotatie_intersectie'},
{ 'description': 'Filling in a 3x9 grid with numbers from 1 to 9 so that each row and each of '
'the three outlined 3x3 blocks has 9 distinct numbers (as in Sudoku). The '
'answer is a product of prime numbers to certain powers.',
'hint': '1. Break down the problem into completing 3 independent 3x3 blocks (left, center, '
'right). 2. In the first block, we can place the 9 digits in any way, so 9! '
'variants. 3. For the second block, the rows must follow the constraints of the '
'rows in the first block. This is where the concept of permutations without fixed '
'points (perturbations) on rows or Latin matrices comes into play. 4. Write a '
'Python script (optimized backtracking or using Latin square formulas) that '
'calculates exactly the number of variants for blocks 2 and 3 relative to the '
'first. 5. After getting the total number, use `sympy.factorint(N)` to extract the '
'prime factors and their powers. 6. Calculate the final formula p*a + '
'\u200b\u200bq*b + r*c + s*d according to the dictionary returned by the '
'factorization.',
'id': '9_combinatorica_grile_sudoku_factorizare_prime'},
{ 'description': 'An isosceles trapezoid has an area of \u200b\u200b$72$ and an inscribed '
'circle tangent to all four sides (circumscribing quadrilateral), the radius '
'of the circle being $3$. Knowing that the lengths of the parallel bases are '
'$r$ and $s$, it is required to determine the value of $r^2 + s^2$.',
'hint': '1. Rely on the basic property of the circumscribed quadrilateral: the sum of '
'opposite sides is equal. For the isosceles trapezoid, the sum of the bases '
'($r+s$) is equal to twice the non-parallel side ($l$). 2. Observe that the height '
'of the trapezoid ($h$) coincides with the diameter of the inscribed circle: $h = '
'2 \\cdot 3 = 6$. 3. Substitute in the area formula: $\\frac{(r+s) \\cdot 6}{2} = '
'72$, from which the sum of the bases $r+s=24$ is obtained, and the non-parallel '
'side $l=12$. 4. Drop a height from the top of the small base to form a right '
'triangle. The hypotenuse is $l=12$, a leg is $h=6$, and the projection of the '
'side on the base is $\\frac{|r-s|}{2}$. 5. Apply the Pythagorean Theorem to find '
'the value of $(r-s)^2$. 6. With $(r+s)^2$ and $(r-s)^2$ known, apply the '
'universal algebraic identity $2(r^2+s^2) = (r+s)^2 + (r-s)^2$ to calculate the '
'final answer.',
'id': 'geometrie_trapez_circumscriptibil_relatii_metrice'},
{ 'description': 'A system consisting of two equations with complex numbers determines exactly '
'one complex solution $z$. The first equation represents a circle given by '
'$|25 + 20i - z| = 5$, and the second represents a mediating line dictated by '
'the real parameter $k$: $|z - 4 - k| = |z - 3i - k|$. The sum of all '
'possible values \u200b\u200bof $k$ is required.',
'hint': '1. Approach the problem by translating complex numbers into the Cartesian plane. '
'The first equation translates as the circle with center $C(25, 20)$ and radius '
'$R=5$. 2. The second equation defines the geometric locus of points in the equal '
'plane separated by coordinates $(k+4, 0)$ and $(k, 3)$. This geometric place is '
'the very mediator of the segment formed by the two points. 3. Find the equation '
'of this median line by calculating the midpoint of the segment and the slope '
'(which will be the negative inverse of the slope of the segment). The obtained '
'right will have the equation dependent on the $k$ parameter. 4. For the complex '
"system to have 'exactly one solution', the mediating line must be fixed tangent "
'to the circle. 5. Write the formula for the distance from a point (the center of '
'the circle) to a straight line (the median) and equate it to the radius of the '
'circle (5). 6. A simple equation of the type $|A - B \\cdot k| will be obtained = '
'C$. Solve for the two valid values \u200b\u200bof $k$ and perform their sum.',
'id': 'numere_complexe_geometrie_analitica_tangenta'},
{ 'description': 'Plane geometry problem about side ratios, parallel lines, similar triangles '
'and areas of polygons obtained by reflection of points.',
'hint': 'When several points divide two sides of a triangle in the same ratios, they form '
'segments parallel to the base. This generates similar triangles. Remember that '
'the ratio of the areas of two similar triangles is the square of the similarity '
'ratio. For reflected points, use the principle of conservation of area: the '
'reflection of a triangle to a point/line has the same area. Calculate the '
'required area by adding/subtracting triangles from the large figure.',
'id': '1_geometrie_asemanare_arii_transformari'},
{ 'description': 'Distribution counting problem with strict inequality conditions between '
'groups ($a > b > c$).',
'hint': 'The solution is done in two stages. 1. Find the integer partitions of the total '
'number that obey the strict inequality (how many elements go into each group). 2. '
'For each valid partition, since the subjects are distinct, use the multinomial '
'coefficient formula $\\frac{N!}{a!b!c!}$ to see how many ways they can be '
'allocated. Finally, add all the results.',
'id': '2_combinatorica_partitii_multinomial'},
{ 'description': 'Determining the number of integer solutions in a closed interval for a '
'Diophantine equation of degree 2, homogeneous.',
'hint': 'A homogeneous equation of the form $ax^2 + bxy + cy^2 = 0$ can always be factored '
'into two binomials of degree 1: $(px - qy)(rx - sy) = 0$. Break the equation into '
'two linear cases (ex: $px = qy$). For the solutions to be integers, $x$ must be a '
'multiple of the denominator of $y$. Count the multiples in the required range for '
'each case and be careful not to double count their intersection (usually the '
'origin $(0,0)$).',
'id': '3_algebra_ecuatii_diofantice_omogene'},
{ 'description': 'Constructing numbers from distinct digits that meet a compound divisibility '
'criterion (eg divisible by 22).',
'hint': 'Breaks down compound divisibility into prime rules (eg for 22: rules for 2 and '
'11). The criterion for 11 says that the difference of the sums of the digits '
'(even vs. odd in position) must be divisible by 11. From the total sum of the '
'given digits, I deduce exactly what the sum of each subgroup must be. Then, '
'choose the subsets of digits, permute them on odd positions, and apply the '
'criterion constraint 2 (last digit be even) to the even positions.',
'id': '4_combinatorica_permutari_criterii_divizibilitate'},
{ 'description': 'Metric relations in an isosceles trapezoid admitting an inscribed circle '
'(circumscribing quadrilateral).',
'hint': "Use Pitot's Theorem: in a circumscribed quadrilateral, the sum of the opposite "
'sides is equal. In an isosceles trapezoid, this means that the sum of the bases '
'is twice the slant. Also, the height of the trapezoid is exactly the diameter of '
'the inscribed circle. Plot the height to form a right triangle (with leg = '
'height, hypotenuse = hypotenuse, other leg = semidifference of bases) and apply '
'Pythagoras to relate the variables.',
'id': '5_geometrie_trapez_circumscriptibil'},
{ 'description': 'The probability that a given letter appears in the last word formed by '
'alphabetically ordered pairs.',
'hint': 'In a strictly alphabetical sort of pairs, the final position of each pair is '
'dictated solely by the largest (alphabetical) element in that pair. For a '
'specific letter (say X) to be in the last pair, it must either be the absolute '
'maximum element of the entire set, or be "pulled" to the last position if it is '
'paired with the absolute maximum element. Use combinatorics to count the '
'favorable pairs over the total number of pairs (which is calculated with double '
'factorial).',
'id': '6_probabilitati_imperechere_ordonare'},
{ 'description': 'System of equations in complex numbers with unique solution, involving the '
'modulus.',
'hint': 'Translate complex equations into Cartesian geometry. Equation of type $|z - z_0| '
'= r$ represents a circle. Equation of type $|z - A| = |z - B|$ represents the '
'median of the segment $AB$. For the system to have "exactly one solution", the '
'median must be tangent to the circle. It imposes the condition that the distance '
'from the center of the circle to the median line is exactly equal to the radius '
'of the circle and solves the resulting equation.',
'id': '7_numere_complexe_geometrie_analitica'},
{ 'description': 'Finding the intersection of a parabola and its image rotated about the '
'origin.',
'hint': 'Apply coordinate transformations. Use a rotation matrix or complex numbers to '
'write a general point on the rotated curve. If $P$ belongs to the first parabola '
"and $P'$ is its rotated image, the point of intersection must satisfy both "
'equations. An efficient algebraic approach is to parametrize the parabola (eg '
'$x=t, y=t^2-C$), rotate it, and force the new coordinates to respect the original '
'equation of the parabola.',
'id': '8_geometrie_analitica_rotatie_parabola'},
{ 'description': 'Completing a rectangular grid following strict rules of non-repetition on '
'lines and blocks.',
'hint': 'Approach the problem in sections. The first line/block can always be filled in '
'$N!$ ways (no restrictions). For adjacent sections, the problem boils down to '
'counting "arrangements with forbidden positions" (similar to nuisances). For '
'block intersections, it separates the cases according to which elements are '
'distributed from the upper blocks, then multiplies the choices using the '
'fundamental principle of counting.',
'id': '9_combinatorica_grile_sudoku'},
{ 'description': 'Finding the ordinate sum of the points of intersection between a piecewise '
'linear periodic function and a parabola.',
'hint': 'Draw the graph to see the symmetry of both functions. The periodic function '
'consists of line segments with simple equations ($y = mx+b$). Due to symmetry '
'about the coordinate axes, many intersections cancel each other out or occur in '
'controllable pairs. Identify the individual equations of each line segment, '
"intersect them with the equation of the second curve, and use Viète's relations "
'to sum the solutions on each bounded interval.',
'id': '10_functii_periodice_intersectii'},
{ 'description': 'Calculation of the area of \u200b\u200ba planar region bounded by a set of '
'cyclic inequalities in space.',
'hint': 'Inequalities of the form $A < B < C$ form boundaries when $A=B$, $B=C$, and '
'$A=C$. The finite region is at the intersection of the principal plane and the '
'decision planes. Solve the boundary equations to find the coordinates of the '
'vertices of this 3D triangle (constrained convex polygon of 3 planes). Then apply '
"a 3D distance formula for the sides and Heron's Formula or vector product formula "
'to calculate its area.',
'id': '11_inegalitati_geometrie_3D'},
{ 'description': 'The expected number of regions formed by drawing conditional random strings '
'in a circle.',
'hint': 'The number of regions created by lines in a circle (Euler Characteristic) is $1 + '
'L + V$ , where $L$ is the number of chords and $V$ the number of interior '
'intersections. Use Expectation Linearity: $E[Regions] = 1 + L + E[V]$. The '
'probability that two chords intersect depends on how the ends are chosen (eg if '
'the ends alternate the order on the circle). Calculates how many pairs of chords '
'can intersect from the total set.',
'id': '12_probabilitati_geometrice_regiuni_disc'},
{ 'description': 'Finding the point in the plane that minimizes the sum of the distances to '
'the vertices of a convex polygon.',
'hint': 'When you need to minimize $AX+BX+CX+\\dots$ , the optimal point approaches a '
'generalized Fermat-Weber point. If the polygon has special angles (eg 60 degrees, '
'90 degrees), apply the "unfold" method by rotations: rotate the polygon and the '
'variable point by that special angle. You will transform a broken line (sum of '
'distances) into a straight line between one fixed end and the rotated image of '
'another fixed end. The minimum is the length of this line itself.',
'id': '13_geometrie_punct_Fermat_minimizare'},
{ 'description': 'Counting triplets that obey modulo large divisibility of the sum of three '
'perfect cubes.',
'hint': 'For equations of the type $x^3 + y^3 + z^3 \\equiv 0 \\pmod{p^k}$, first study '
'the modulo base $p$ or $p^2$ level cases. Cubes have very few possible residues '
'modulo powers of 3. Analyze the structure of residue classes and use a "lifting" '
"argument (Lifting The Exponent or Hensel's Lemma): a number of solutions to small "
'powers of modulo often force clear proportions of valid solutions when extended '
'to $p^k$.',
'id': '14_teoria_numerelor_congruente_cuburi'},
{ 'description': 'Finding the area of \u200b\u200ba triangle given the distances from an '
'external fixed point to an axis with known collinear points.',
'hint': "For collinear points on a base connected to an external point, use Stewart's "
'Theorem or the trigonometric form of the Cosine Theorem in adjacent triangles. '
'The goal is to determine the height from the outer point to the right (or the '
'horizontal distance of the projection). Once you know the common height, the area '
'of \u200b\u200bany triangle formed by a base segment is simply $\\frac{base '
'\\cdot height}{2}$.',
'id': '15_geometrie_puncte_coliniare_teorema_Stewart'},
{ 'description': 'Counting the ways to color the edges of a grid so that each cell has a fixed '
'parity / number of colors.',
'hint': 'This problem can be modeled matrixically or by establishing independent variables '
'(degrees of freedom). If a cell must have 2 red and 2 blue sides, assign +1 and '
'-1. The sum on each square is 0. Color the top and left edges (which partially '
'dictate the state). Any shared edge passes the constraint on. It calculates how '
'many valid configurations you have for the first cell and how they propagate the '
'"domino effect" on the possibilities of the other cells.',
'id': '17_combinatorica_grafuri_colorare_restrictii'},
{ 'description': 'Calculating the probability that a given letter appears in the last word '
'formed by pairing and alphabetically sorting a given set of letters.',
'hint': '1. Understand the sorting mechanism: the final word order is dictated solely by '
"the *first* letter of each pair. 2. For the target letter (eg 'G') to be in the "
'last word, the first letter of its word must be strictly higher (alphabetically) '
'than the first letters of all other pairs. 3. If the target were in the second '
'position in its pair, its word would start with a lower letter than it, so it '
'would be impossible for it to be last (there being other larger letters in the '
'set that would "pull" their pairs to the end). So the target *must* occupy the '
'first position in its pair, i.e. it must be paired with a letter above it '
'alphabetically. 4. Any other letter higher than the target remaining in play must '
'be "hidden" in the second position of its pair, otherwise that pair would sort '
'after the target pair. To be in the second position, absolutely all remaining '
'upper letters must be paired exclusively with letters lower than the target. 5. '
'Calculate the probability (Favorable Cases / Total Cases): the total number of '
'ways to form pairs is calculated by double factorial $(2n-1)!!$. For favorable '
"cases, combine the number of ways you choose the target's partner with the ways "
'you choose lower partners for the rest of the upper letters, and finally add the '
'pairing of the remaining lower letters in between.',
'id': '30_probabilitati_sortare_alfabetica_perechi'},
{ 'description': 'Simplifying a huge product of fractions with logarithms having progressive '
'bases and arguments.',
'hint': 'It applies the properties of logarithms: $\\log_a(x^p) = p\\log_a(x)$ and uses '
'the change of base $\\log_a(b) = \\frac{\\ln b}{\\ln a}$. Factors exponents (eg '
'2nd degree equations). The expression will separate into a product of polynomial '
'fractions $\\cdot$ product of simple logarithmic fractions. The first will '
'simplify massively (telescopic fractions, where they cut diagonally), and the '
'second logarithmic product will reduce completely in the chain.',
'id': '18_algebra_produse_telescopice_logaritmi'},
{ 'description': 'Calculation of measures of arcs on the circumscribed circle of the median '
"triangle (Euler's Circle).",
'hint': 'The circle that passes through the means of the sides is the Circle of 9 points '
"(Euler's Circle) and also passes through the feet of the heights. Its "
'intersections with the lines starting from the vertices create arcs. The measure '
'of an arc on a circle is twice the angle subtended by the circle. Identify the '
'right triangles formed and angle-chasing the angles of the original large '
'triangle to find the required angles.',
'id': '19_geometrie_cercul_celor_noua_puncte'},
{ 'description': 'The area of \u200b\u200ba rectangle inscribed in a small circle that is '
'internally tangent to a large circle, with relations of symmetry and equal '
'areas.',
'hint': 'Approach the problem by Cartesian analytic geometry. Place the origin $(0,0)$ '
'smartly (at the center of the outer circle or point of tangency). Write the '
'equations of the two circles. The condition that some lateral areas '
'(triangles/curvilinear trapezoids) are equal requires that the rectangle has a '
'strictly symmetrical position. Write the coordinates of the corners of the '
'rectangle as variables, impose them on the equation of the inner circle, and use '
'symmetry to deduce the length and width.',
'id': '20_geometrie_cercuri_tangente_dreptunghi'},
{ 'description': 'The probability that the least common multiple of the elements of a randomly '
'chosen subset is a maximum number $N$.',
'hint': 'Let the target CMMMC = $p^A \\cdot q^B$. For a subset to reach exactly this '
'CMMMC, it must contain *at least one divisor* that has maximal power $A$ at $p$, '
'and *at least one* that has $B$ at $q$. It uses the Principle of '
'Inclusion-Exclusion (PIE) to count the "bad cases": the subsets where the power '
'of $p$ is strictly less than $A$ , added together with those where the power of '
'$q$ is strictly less than $B$ , minus their intersection. Subtract the bad cases '
'from the total of $2^{nr\\_divisors}$.',
'id': '21_probabilitati_CMMMC_submultimi'},
{ 'description': 'Finding the ranges of values \u200b\u200bfor which a greedy algorithm gives '
'a suboptimal coin distribution.',
'hint': 'The greedy algorithm always works if the denominations are "canonical" (eg powers '
"of 2). When they aren't, greedy fails when combining a few medium coins exceeds "
'the value of a large one, but costs fewer pieces (ex: 4 10 coins is worth 40, but '
'greedy on 40 gives 25+10+1+1+1+1+1). Finds the specific range of numbers for '
'which the sum of modulo-large-coin residues requires too many small coins, and '
'deduces the periodic failure rule/pattern.',
'id': '22_algoritmi_optimizare_greedy_monede'},
{ 'description': 'Counting the solutions of a compound trigonometric function and finding the '
'cases where the graph is tangent to the Ox axis.',
'hint': 'To solve $f(x) = \\sin(g(x)) = 0$, set the inner argument $g(x) = k\\pi$ for an '
'integer $k$. The points of tangency at the X-axis represent the roots which are '
"*also* local extreme points, so $f'(x) = 0$. By the Chain Rule, $f'(x) = "
"g'(x)\\cos(g(x))$. As at those points $\\cos(g(x))$ cannot be 0 (because the sine "
'is 0), the derivative cancels only if the inner function has a local extremum, '
"i.e. $g'(x) = 0$. Find the number of solutions for both cases in the required "
'range.',
'id': '23_analiza_trigonometrie_intersectii_tangente'},
{ 'description': "Counting selection possibilities with constraints of the type 'X consecutive "
"positions cannot be selected' in a row.",
'hint': 'This is an extended version of the Stars and Bars (Method of Goals) problem. '
'Transform Condition: If you select chairs, think about the blocks of chairs '
'selected. The maximum size of a block allowed is 2. Blocks of empty seats between '
'them must be of size $\\ge 1$. If you denote the number of pairs (blocks of 2) by '
'$p$ and the number of lone chairs by $s$, you can generate sum equations and '
'count the valid combinations by iterating over the possible instances of $p$.',
'id': '24_combinatorica_aranjamente_fara_adiacenta'},
{ 'description': 'Finding the number of ways to perfectly match the vertices of a regular '
'polygon using strings of a specific length.',
'hint': 'Each unique string length corresponds to a "step" or "jump" $k$ around the '
'regular polygon with $N$ vertices. This decomposes the polygon into independent '
'cyclic graphs (sub-cycles) according to CMMDC$(N, k)$. If you choose a valid '
'string, the problem reduces to covering isolated cycles of vertices with '
'"dominoes" (strings joining adjacent vertices on that cyclic graph). The number '
'of valid pairs for a linear cycle has recurrent form, but on a full circle only 2 '
'trivial solutions appear (the two even/odd offsets).',
'id': '25_combinatorica_grafuri_matchings_poligon'},
{ 'description': 'Relationships in a non-convex polygon constructed from adjacent triangles '
'with fixed central angle and constant areas.',
'hint': 'The area of \u200b\u200bthe triangle formed by consecutive rays from the origin '
'of the polygon is $\\frac{1}{2} x_n x_{n+1} \\sin(\\theta)$. Since the area and '
'angle are constant, it follows that the product $x_n x_{n+1}$ is constant, '
'generating a string of radii whose values \u200b\u200boscillate between 2 states '
'(if $x_1=a$, then $x_3=a$, etc.). Apply the Cosine Theorem to the outer side and '
'express the perimeter as a sum dependent on only one variable of radius length, '
'from which you can calculate any side.',
'id': '26_geometrie_poligoane_neconvexe_siruri'},
{ 'description': 'Evaluating the value of a string at a large $N$ step, defined by a nonlinear '
'fractional recursion.',
'hint': 'When a string has terms like $x_{k+1} = c(x_k + 1/x_k) + d$, look for a '
'substitution that linearizes the problem. Most often, the expression form $x_k = '
'\\frac{a_k + b_k}{a_k - b_k}$ or trigonometric/hyperbolic substitutions is used. '
'By substituting, you will be able to separate the string into two simple '
'recursive linear strings for $a_k$ and $b_k$ (exponentials or progressions) and '
'calculate the term $N$ directly by the obtained general closed term formula.',
'id': '27_algebra_siruri_recurente_neliniare'},
{ 'description': 'Calculation of the area determined by some interior points whose distances '
'to the vertices of the triangle and between them are identical and constant.',
'hint': 'Equality of distances ($AK=AL=\\dots=KL=d$) means the presence of equilateral '
'triangles and circles. $A$ and $B$ are on a circle with center $K$. Moreover, the '
'fixed segment $KL$ forms two equilateral triangles together with other auxiliary '
'points. Visually translate the problem by "gluing" equilateral triangles to the '
'edges of the original rectangle. The required quadrilateral becomes a fragment of '
'a directly calculable area (eg: trapezoid, parallelogram), deduced by '
'subtractions from the enlarged figure.',
'id': '28_geometrie_metrica_distantelor_puncte_interioare'},
{ 'description': 'Determining the parameter for which a rational function has an exactly '
'specified number of minimum points (local extrema).',
'hint': "For extreme points, set the first derivative to zero: $f'(x) = 0$. For a rational "
"function $\\frac{P(x)}{Q(x)}$, the derivative becomes the numerator: $Q(x)P'(x) - "
'P(x)Q\'(x) = 0$. To have "exactly two real minima", the resulting polynomial '
'equation of the derivative (usually of high degree) must undergo specific '
'monotonicity changes, which means the existence of multiple roots (cancelled '
'delta, second derivative = 0 simultaneously, etc.) at certain asymptotes. Set the '
'double root condition on the derivative function to find the $k$ parameter.',
'id': '29_analiza_matematica_extrema_functii_rationale'},
{ 'description': 'The intersection of the trisectors of the angles in a quadrilateral or '
'triangle. Angles BAD and CDA trisected, calculation of the angle formed at '
'the point of intersection F (AFD).',
'hint': 'ATTENTION: Do not guess the result! Point F is formed at the intersection of two '
'rays that trisect the angles at the base. 1. Identify whether F is formed by the '
'first trisectors (1/3 of the angle) or the second pair (2/3 of the angle). As a '
"rule, for the 'top' angle (further from the base), 2/3 of the base angles are "
'used. 2. In the triangle AFD, the measure of the angle AFD is 180 - (measure_FAD '
'+ measure_FDA). 3. Write Python code that calculates exact fractions (ex: 2/3 * '
'110) before subtracting from 180. DO NOT hardcode the final result!',
'id': 'geometrie_trisectoare_intersectie'},
{ 'description': 'Expansion of (sin x)^n or (cos x)^n into multiple angles sin(nx), cos(nx). '
'Linearization of powers. Problem asking for constants a, b, c, d in (\\sin '
'x)^7 expansion. The coefficient d.',
'hint': "ATTENTION: To linearize (sin x)^n as sin(kx), use Euler's Formula: sin(x) = "
'(exp(i*x) - exp(-i*x))/(2*i). Python statement: 1. Define f = (sp.sin(x))**7. 2. '
'Use sp.expand(f.rewrite(sp.exp)).rewrite(sp.sin) to get the linearized form. 3. '
'Extract the coefficient of the sin(x) term using f_linearized.coeff(sp.sin(x)).',
'id': 'trig_linearizare_puteri_n'},
{ 'description': 'Finding the fourth vertex (x, y) of a parallelogram given 3 known points. '
'Constraints on coordinates (ex: x > 7 or x < y). Calculation of the sum x + '
'y.',
'hint': 'ATTENTION: Three given points A, B, C can generate three different '
'parallelograms. If the fourth vertex is D(x, y), it can occupy 3 possible '
'positions such that the diagonals bisect each other. Use the property: A + D = B '
'+ C, B + D = A + C, or C + D = A + B. Python code instruction: 1. Compute the 3 '
'potential points: D1 = B + C - A, D2 = A + C - B, and D3 = A + B - C. 2. '
'Implement a filter in Python that checks the specified condition (ex: x > 7). 3. '
'Only after filtering, calculate the x + y sum for the point that meets the '
'condition.',
'id': 'paralelogram_coordonate_varf_lipsa'},
{ 'description': 'Rational equations, fractions with x in the denominator, division of an '
'expression with x.',
'hint': "ATTENTION: Don't forget the scope! Checks that the obtained solution does not "
'cancel the denominator (division by zero). Eliminate false solutions before '
'writing the result.',
'id': 'capcana_numitorului'},
{ 'description': 'Euclidean geometry problem with interior tangent circles and an inscribed '
'rectangle. Given the circle w1 internal tangent to w2. A rectangle EFGH is '
'inscribed in w1. Two resulting triangles have equal areas. The area of '
'\u200b\u200bthe rectangle is required as a fraction m/n.',
'hint': '1. Set up a Cartesian coordinate system. Let the origin be O(0,0) at the center '
'of w2. Radius w2 = 15. B is the point of tangency at (15, 0). 2. Center A of '
'circle w1 (radius 6) is on OB at distance 6 from B, so A(9, 0). 3. Diameter BC '