2

Given a finite set of numbers $X =\{1, 2, 3, 4, 5\}$, define the upper half $U = \{4, 5\}$, and the lower half $L = \{1, 2\}$ (We omit $3$/median here if there are odd number of elements in $X$). So $L,U$ is not strictly a partition of $X$. There can be a function defined as $f(X): =\sum_{i \in U} i - \sum_{j \in L} j$.

I'm wondering if there is any name for this kind of function.

peng yu
  • 1,271
  • 2
    You could write it as $\sum_{x\in X}x\cdot \operatorname{sign}(x-\operatorname{median}(X))$. Out of curiosity, where does this function arise? – Karl Feb 02 '21 at 23:40
  • I'm trying to use this function to rank the powerset of some set. – peng yu Feb 03 '21 at 00:58
  • Ah. I'm not sure what you mean by rank, but if you just want to turn an injective function $f:S\to\mathbb{N}$ into an injective function $g:\mathcal{P}(S)\to\mathbb{N}$, then $g(X)=\sum_{x\in X}2^{f(x)}$ should work. Sounds like you're looking for something more statistics-based, though. – Karl Feb 03 '21 at 01:27
  • Since powerset $P(X)$ of some set $X$ is a set of sets. I'm trying to rank the sets in a powerset, using this function as a value function. e.g. find a subset of X have the biggest value based on f. – peng yu Feb 03 '21 at 01:31
  • My suggestion should work for that. Note that $|\mathcal{P}(X)|=2^{|X|}$, so if your ranking function is required to produce distinct ranks for distinct sets (i.e. be injective), then it needs to produce large numbers - it can't just add and subtract $f$ values, because this restricts the output to too small a range of integers. – Karl Feb 03 '21 at 01:52
  • i don't get this, why would $S^* = \text{argmax}_S g(S), S \subseteq X$ maximize the function $f$ ? – peng yu Feb 03 '21 at 02:27
  • Sounds like I'm misunderstanding your problem - probably best to clarify in a new question. – Karl Feb 03 '21 at 02:37
  • 1
    Thanks, yeah, I’ll do that, trying to see if the value function has a name or not, so that I can ask the second question more concisely – peng yu Feb 03 '21 at 02:38
  • here is the real question i'm interested in https://math.stackexchange.com/questions/4011696/partition-set-into-two-subsets-minimize-sum-of-some-value-function-of-both-subse in case you are wondering :) – peng yu Feb 03 '21 at 22:56

0 Answers0