# Aggregation functions

1. Jun 19, 2010

### Gerenuk

Is the set of aggregation functions easy to characterise? I mean functions like addition, multiplication, maximum, minimum, count...
So basically everything thats commutative and associative:
$$f(x,y)=f(y,x)$$
$$f(f(x,y),z)=f(x,f(y,z))$$

What are other classes of such functions?
I can't all map to just addition, can I? I'd have no idea how to do it with the max(x,y) function?!

2. Jun 19, 2010

### boboYO

Every function on the set of n-element subsets of X is an aggregation function on X^n in the obvious way, right? Which would imply there's too many of them to characterize easily.
edit: oops, I forgot about associativity.

3. Jun 19, 2010

### Gerenuk

I'm not sure what this means. Can you say it with an example?

(Of course all functions that somehow map to normal addition are one class only.)

4. Jun 19, 2010

### Gerenuk

I noticed that even the max function maps onto addition by
$$max(x,y)=\lim_{p\to\infty}\sqrt[p]{x^p+y^p}$$
Are there aggregate functions that do not map to addition?

5. Jun 19, 2010

### Staff: Mentor

What about something like f(x, y) = x - y? This is not commutative. The function could be thought of as the signed distance between two numbers on the real line.

6. Jun 19, 2010

### Gerenuk

But it is not associative nor commutative. So not an aggregate function I'm considering.

7. Jun 19, 2010

### Staff: Mentor

OK.
$$\prod_{i = 1}^n a_i$$
?
That doesn't map to addition, and it's commutative and associative.

8. Jun 19, 2010

### Gerenuk

Hmm? You mean multiplication?
It easily maps to addition through logarithms.

9. Jun 19, 2010

### boboYO

could you be more precise with what you mean by 'maps to addition'?

10. Jun 20, 2010

### Gerenuk

Instead of multiplying, I only need to "translate" the variables by logarithms and then the "structure" is the same as addition.
$$b_i=\ln a_i$$
$$b_\text{tot}=\sum_{i=1}^n b_i$$
I'm not sure what the mathematical terms are, but with this view all two value functions f(x,y) which can be created with an arbitrary one value function g(x) are "one class" and uninteresting.
$$f(x,y)=g^{-1}(g(x)+g(y))$$
Because its obviously easy to use this procedure to generate more aggregate functions.

11. Jun 20, 2010

### boboYO

I see, so 2 aggregate functions f(x,y) and g(x,y) are equivalent if there exists a 'translation' t such that

$$f(x,y)= t^{-1} \circ g( tx, ty)$$

product is equivalent to addition by setting t=log
max is equivalent to addition by setting $$t: x \mapsto x^\infty$$
etc

and we are trying to classify these equivalence classes of aggregate functions.

One aggregation that isn't equivalent to addition is the constant function. Also all the constant functions are in the same class (take t to be any map that takes c to d, then c=t^-1 d).

btw, what is 'count' (your last example in the first post) ?

12. Jun 20, 2010

### Gerenuk

Maybe I shouldn't require for $g^{-1}$ to exist. So it doesn't have to be 1-to-1.
Then the constant function and also COUNT also somehow map onto addition?
I could map constants to infinity. And for COUNT I map all values to 1 and then add.

COUNT counts the number of variables. So
Count(a1,a2,...,aN)=N