First of all, is the following a well-defined function?
$f(\{x_1,\ldots,x_n\})=m$ such that $\sum_{i=1}^mx_i\ge\sum_{i=m+1}^nx_i$, where $\{x_1,\ldots,x_n\}$ is ordered in ascending order and $x_i\ge0$ for all $x_i\in\{x_1,\ldots,x_n\}$
If not, how do we define a function which takes a set of positive real numbers of arbitrary size, and returns an integer which is the index of the element in the input that satisfies the condition as above. And what would be the domain and range of this function?
Thanks!