Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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$?

share|improve this question
7  
Just take out the old pair and insert the new one. If you do this a lot, you can define a specific, more compact, notation for the operation. –  Henning Makholm Oct 27 '11 at 18:23
    
@HenningMakholm, consider to post your comment as an answer. –  Oleksandr Kozlov Oct 28 '11 at 6:46
1  
If you are after a shorter notation for this, it can be expressed using 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. –  Martin Sleziak Oct 28 '11 at 9:54
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
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. –  J. M. Oct 28 '11 at 10:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.