2

I am struggling with a proof from my discrete mathematics class. We have to prove that multiset union is idempotent, i.e. $M \sqcup M = M$, where $\sqcup $ denotes the union of multisets.

We have defined multiset union (using lambda notation) as $M_1 \sqcup M_2 := \lambda x : X \cdot M_1(x) + M_2(x)$, which means that the union operated on a value will output the number of times the value appears in their union. However, if we apply union to the same set, won't the number of times a value appears in the union be twice that of the multiset on its own? How do I go about proving this?

Edit: Is this even correct? Might there be a mistake in the book?

sigma
  • 31
  • 4
  • 3
    Welcome to CS.SE! Note that you can use LaTeX to easily typeset math. Could you check that the definition you wrote is actually the one your class is using? Multiset union between multisets $M_1$ and $M_2$ is usually defined as the set that contains an element $X$ in as many copies as the maximum between $M_1$ and $M_2$. – quicksort Feb 06 '17 at 22:13
  • @quicksort Yep just figured that out (thanks for pointing it out though!) Yes, that's the way it's written in the book (unfortunately doesn't mention taking the maximum number of times it appears). – sigma Feb 06 '17 at 22:23
  • 2
    If it is indeed the plus-based union, it can't be idempotent. As quicksort mentions, we need the max-based union for that. – chi Feb 06 '17 at 22:32
  • @StefaniaDamato Could you update your question with the proper definition and answer it? – Yuval Filmus Feb 07 '17 at 06:49
  • @YuvalFilmus Ok I'll try that :) – sigma Feb 07 '17 at 07:20

0 Answers0