I have $n=2$ numbers $a$ and $b$, $a\in\Bbb{N}$ and $b\in\Bbb{N}$.
Then I have the function $f$ defined as:
$ f(x,y) = \begin{cases} -1, & \text{if $x<y$} \\ 0, & \text{if $x=y$} \\ +1, & \text{if $x>y$} \end{cases} $
Now with $f$ and the $n=2$ numbers $a$ and $b$ I have $m=3$ cases which are:
- $a<b$
- $a=b$
- $a>b$
How much will be $m$ when I increase $n$?
Let's say $n=3$ and so I have $a$, $b$ and $c$, my $m$ cases are
- $a=b$ and $b=c$
- $a=b$ and $b<c$
- $\ldots$
How can I count all of them?
Update:
The answer is Fubini numbers.
Let $\mathfrak A$ be the set of all partitions of $X = \{ 1, \dots, n\}$. Then I believe the number you're looking for is $$ \sum_{A \in \mathfrak A} \lvert A \rvert ! $$ for which I doubt there is a simple expression.
For instance when $n = 2$ $$ {\mathfrak A} = \{ \{ \{ 1, 2\} \}, \{ \{1\}, \{2 \}\} \}. $$ The partition $\{ \{ 1, 2\} \}$ corresponds to $a_{1} = a_{2}$, and the partition $\{ \{1\}, \{2 \}\}$ corresponds to the two cases $a_{1} > a_{2}$ and $a_{2} > a_{1}$. And your number is indeed $$ 1! + 2! = 3. $$
For $n = 3$ one should have $$ {\mathfrak A} = \{ \{ \{ 1, 2, 3\} \}, \{ \{1, 2\}, \{3 \} \}, \{ \{1, 3\}, \{2 \} \}, \{ \{2, 3\}, \{1 \} \}, \{ \{1\} , \{2\}, \{3 \}\}\}. $$ Here the first partition corresponds to $a_{1} = a_{2} = a_{3}$, the second to the two cases $a_{1} = a_{2} > a_{3}$ and $a_{3} > a_{1} = a_{2}$, etc., and the last one to the six cases when $a_{1}, a_{2}, a_{3}$ are distinct. And your number should be $$ 1! + 3 \cdot 2! + 3! = 13. $$