Problem

Source: Romanian National Olympiad 2019 - Grade 10 - Problem 4

Tags: algebra, functions, Sets, bijection, combinatorics



Let $A$ and $B$ be two nonempty finite sets of nonnegative integers. We denote by $\mathcal{F}$ the set of all functions $f:\mathcal{P}(A) \to B$ that satisfy $f(X\cap Y)=\min \{f(X), f(Y)\},$ for all $X,Y \subset A,$ and by $\mathcal{G}$ the set of all functions $g:\mathcal{P}(A) \to B$ that satisfy $g(X\cup Y)=\max \{g(X), g(Y)\},$ for all $X,Y \subset A.$ Prove that $\mathcal F$ and $\mathcal G$ have the same number of elements and find this number.