Problem

Source: BMO SL 2023 A5

Tags: algebra



Are there polynomials $P, Q$ with real coefficients, such that $P(P(x))\cdot Q(Q(x))$ has exactly $2023$ distinct real roots and $P(Q(x)) \cdot Q(P(x))$ has exactly $2024$ distinct real roots?