MathDB
exactly one of the equalities f(g(x)) = x and g(f(x)) = x holds

Source: Dutch IMO TST1 2019 p2

January 10, 2020
functionalgebra

Problem Statement

Write SnS_n for the set {1,2,...,n}\{1, 2,..., n\}. Determine all positive integers nn for which there exist functions f:SnSnf : S_n \to S_n and g:SnSng : S_n \to S_n such that for every xx exactly one of the equalities f(g(x))=xf(g(x)) = x and g(f(x))=xg(f(x)) = x holds.