TITLE: How to write the set-builder notation for the "best $n$ elements of the set S"?
QUESTION [5 upvotes]: I have a set $S$ with 100 elements, and a very simple function defined over my set $f : S → [0, 1]$. This function simply tells me how "good" an element is (this function is strictly monotonous).
Now I want to define a subset $G \subset S$, which contains the top 10 best elements in $S$, i.e. those for which $f(x)$ gives the highest 10 values.
How do I write $G$ in short set-builder notation?
I had an idea about repeatedly using $\underset{x \in S}{\operatorname{argmin}} ~f(x)$, where $S$ kept shrinking, namely $S_i = S_{i-1} - \{\underset{x \in S}{\operatorname{argmin}}~f(x)\}$, and after 90 iterations, $S_{90}$ would be my "top 10" set. But I have no idea how to write these iterations in set-builder notation.

REPLY [7 votes]: Given a set $S$ with $|S|\ge10$ and a function $f:S\to\mathbb R,$ the set
$$G=\{x\in S:|\{y\in S:f(x)\lt f(y)\}|\lt10\}$$
consists of the "best" $10$ elements of $S,$ including all elements tied for one of the top ten places. (Elements with greater $f$-values are considered "better".)