1
$\begingroup$

I am trying out operations on sets and i have become stuck on how you could update set of pairs, say I have a set $A$: $A = \{(a,3),(b,5),(c,7)\}.$

If I wanted to add a pair I would use the union of the two sets; $A \cup \{(x,8)\}.$ Or remove one I would use the set difference; $A \setminus \{(b,5)\}$ How do you go about updating $a$, $b$ in the pair $(a,b)$ in set $A$?

  • 1
    If you are after a shorter notation for this, it can be expressed using [symmetric difference](http://en.wikipedia.org/wiki/Symmetric_difference) as $A\triangle\{(b,5),(x,8)\}$. Of course, this is not ideal - from this notation you don't see which pair is replaced by the other one.2011-10-28

1 Answers 1

4

There is no standard notation for this, but it is clear what to do: simply remove the old pair and then insert the new one: $ (A\setminus\{(a,b_1)\})\cup\{(a,b_2)\} $ or possibly even (if your relation is known to be functional): $ \{(x,y)\in A\mid x\neq a\}\cup\{(a,b)\} $ If you find yourself doing this a lot, you're free to define a more compact notation for it yourself. Just make sure to explain it to your reader before using it.

  • 1
    "...you're free to define a more compact notation for it yourself. Just make sure to explain it to your reader before using it." - this deserves a +1 on its own.2011-10-28