Why are there two different definitions of multiset union

582 Views Asked by At

I just realized that you can use two different definitions of multiset union:

First definition:

  • (M⊎N)(x)=M(x)+N(x)

Second definition:

  • (M⋓N)(x)=max(M(x),N(x))

I understand the difference between them but I'm not sure I understand why these two definitions exists, and in which real life use cases you would use the one over the other.

Does anyone have an example that can explain the need of these two different definitions?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $a$ and $b$ be positive integers and let $A$ and $B$ be the multiset of their prime factors. For example, if $a=60$ then $A=\{\{ 2,2,3,5\}\}$.

Then $A\uplus B$ is the prime factors of $ab$ and $A\Cup B$ is the prime factors of $\operatorname{lcm}(a,b)$.