Notation for choosing the k smallest elements from a set of integer

3.2k Views Asked by At

Is there any specific notation for picking $k$ elements from a set which are the smallest?

Ex: {$1,3,5,7,9,11$} with $k = 3 \Rightarrow$ We want $1,3,5$

3

There are 3 best solutions below

0
On

Recall that the notation for the set-theoretic difference of $B$ and $A$, that is, $\{x\in B:x\notin A\}$, is $B\setminus A$.

Let the minimum element of a set $X$ be $X_1=\min X$.
The "second minimum element" is $X_2=\min(X\setminus X_1)$.
The "third minimum element" is $X_3=\min((X\setminus X_1)\setminus X_2)$.
The "$k$th minimum element" is $X_k=\min((\ldots((X\setminus X_1)\setminus X_2)\ldots)\setminus X_k)$.
The set you're looking for is $\cup_{i=1}^k X_i$.

4
On

If $A$ is a finite set of numbers with at least $k$ many elements, then the set of the first $k$ many elements can be written as $$ \{x \in A : \left| A \cap (-\infty,x) \right| < k \}. $$ Here the notation "$(-\infty, x)$" denotes an interval and the vertical bars denote cardinality.

This is the most compact notation I can think of for your set. But I should mention that it is often better to write what you mean in English than to use some notation that your reader might not be familiar with.

0
On

I haven't seen a notation for this. One idea would be to conceptualize it in terms of sequences, like so:

Definition. Let $X$ denote the set of interest. Then we will write $X^\sim$ for the unique sequence defined as follows.

  1. $X_0^\sim$ is the empty set
  2. $X_{i+1}^\sim = X_i^\sim\cup \{\mathrm{min}(X \setminus X_i^\sim)\}$

For example, $\{1,3,5,7,9,11\}_3^\sim = \{1,3,5\}.$

If its going to be used repeatedly, just tell the reader that you will tend to omit the superscript when no ambiguity arises. E.g $\{4,5\}_1 = \{4\}$.