A group is a non-empty set and an operation that combines any two elements of the set to produce a third element of the set, in such a way that the operation is associative, an identity element exists and every element has an inverse. /s
Group is actually like inverse a mapping. Given an array A which map index to value, group A map value to index.
A common idiom is: desc count each group A , which list most frequent element first
The Linux /etc/group file was my first and incorrect thought.