0
$\begingroup$

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!

2 Answers 2

1

With the extra condition it is well defined.

The set $\{ m | \sum_i^mx_i\ge\sum_{i=m+1}^nx_i \}$ is finite and nonempty since it contains $n$, and your function is actually the min of this set.

BTW, if you don't want to worry about ordering your set increasing, here is what you can do:

First observe that your condition is equivalent to

$2\sum_i^mx_i\ge \sum_{i=1}^nx_i$

Now, you can define :

$f(\{x_1,\ldots,x_n\})= \min \{ m| \exists \sigma \in S_n \, {\rm s.t.} \, 2\sum_i^mx_{\sigma(i)} \ge \sum_{i=1}^nx_i \}$

  • 0
    $\sigma$ is a bijection from $\{1,2,..,n\}$ to $\{ 1,2,..,n \}$; basically it is a reordering of the sets $\{1,2,..,n \}$ (and in this case the value of the function $\sigma(i)$ is the ith element in the new order). $S_n$ is the set of all such possible bijections.2012-02-15
1

Presumably the lower limit on the first sum is $i=1$. The function is not well-defined. For example, what is $f(-1,0,0,0,0)?$

  • 0
    @N.S. thanks for the clarification.2012-02-16