Let $G$ be a finite group, $A$ a given subset and put and put $A^{-1}=\{ a^{-1}:a\in A\}$. We need a gap code for determining the maximum and minimum of all $|B|$ such that $B$ is a solution of the following equation $$ A^{-1}AB=G \; , \; |AB|=|A||B| $$
Note that the equation implies $\frac{|G|}{|A|^2-|A|+1}\leq |B|\leq\frac{|G|}{|A|}$ (for $|A|>1$), so the maximum and minimum are between the two numbers.
More information: I'm doing a research project, and I show that for every nonempty subset $A$ of $G$, its related subset $B$ mentioned in A GAP code for maximum and minimum cardinals of some classes of subsets of a finite group , satisfies the equation $(A^{-1}A)X=G$ (and $X=B$ is a minimal solution of the equation). Now I need to check some of its properties in some groups such as $S_n$ and $\mathbb{Z}_n$.
Thanks in advance!