A polynomial of a semigroup $X$ is a function $f:X\to X$ of the form $f(x)=a_0xa_1\cdots xa_n$, where $a_0,a_1,\dots,a_n$ some elements of the semigroup $X^1=X\cup\{1\}$, called the coefficients of the polynomial $f$. The number $n$ is called the degree of $f$ and is denoted by $\deg(f)$.
A subset $A$ of a semigroup $X$ is called algebraic if $A=\{x\in X:f(x)=b\}$ for some polynomial $f:X\to X$ and some $b\in X$.
Example 1. For any semigroup $X$ any singleton $\{b\}\subseteq X$ is an algebraic set as $\{b\}=\{x\in X:1x1=b\}$.
Example 2. For any group $X$ of finite exponent $\exp(X)=\min\{n\in\mathbb N:\forall x\in X\;(x^n=1)\}$, the set $X=\{x\in X:x^n=1\}$ is algebraic.
Example 3. Let $n\ge 3$ be an odd number, and $a$ and $b$ be two elements of order $n$ and $2$ in the dihedral group $D_{2n}$ (of isometries of a regular $n$-gon). For the polynomials $f(x)=bxxbxx$ and $g(x)=a^{-1}xaxxaxa^{-1}$ of degree 4 we have $f^{-1}(1)=X$ and $g^{-1}(1)=\{1\}$.
Definition. Let us call a group $X$ polyextremal if $X$ has two polynomials $f,g:X\to X$ such that $$\deg(f)=\deg(g),\quad f^{-1}(1)=X\quad\mbox{and}\quad g^{-1}(1)=\{1\}.$$
Example 3 shows that for every odd number $n\ge 3$, the dihedral group $D_{2n}$ is polyextremal.
Problem 1. Characterize polyextremal finite groups.
Remark 1. Each polyextremal group $X$ has trivial center $Z(X)=\{z\in X:\forall x\in X\;(zx=xz)\}$. Indeed, assuming that $f,g:X\to X$ are two polynomials with $\deg(f)=\deg(g)$, $f^{-1}(1)=X$, $g^{-1}(1)=\{1\}$, we can see that $$f(z)=f(1)z^{\deg(f)}=z^{\deg(f)}=z^{\deg(g)}=g(1)z^{\deg(g)}=g(z)$$ for all $z\in Z(X)$ and hence $Z(X)=\{1\}$.
Remark 2. Remark 1 implies that for a number $n\ge 2$ the dihedral group $D_{2n}$ is polyextremal if and only if $n$ is odd.
Problem 2. Is each finite group with trivial center polyextremal?
Problem 3. Is each noncommutative finite simple group polyextremal?