Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With reference to the question, posted by me at Stackoverflow here, i want to know the mathematical details about the concept.

Below is my question.

In multiple set, which contains Integers, I want to get all those elements, which has no duplicate. i.e. which came only once in union of all the Set. Ex: consider set first contains {2,4,6,8,9}, second set contains {2,8,9} and third set contains {2,4,8,9}. In all these sets, element 6 occurs only once.

Somebody please explain the set theory behind it.

share|cite|improve this question
I'm not sure what is the question, but I am fairly certain that it's not set theory. I have tagged it as elementary set theory, but I'm not 100% convinced that it fits either. Someone else who understands what is asked here please retag or confirm my retag. Thanks. – Asaf Karagila Dec 8 '12 at 14:58
@AsafKaragila: Hey, it is elementary set theory only. Basic set theory operations may help. But don't know how :( – Ravi Joshi Dec 8 '12 at 15:01
The word "intersection" comes to mind. – Asaf Karagila Dec 8 '12 at 17:14

Here's what I see in the question:

  1. Union of the 3 sets: U = {2,4,6,8,9}
  2. A counter -function which counts how many times each number is used: $$f : U\rightarrow N,$$ $$f = \{2\rightarrow 3, 4 \rightarrow 2, 6 \rightarrow 1, 8 \rightarrow 3, 9\rightarrow 3\}$$
  3. An equation which chooses the elements where count is one: f(X)=1.
  4. The resulting set: X = {6}
share|cite|improve this answer
I think you have it right, but in step 2 the function could just return 1 or "more than 1". I don't know if that makes it easier. – Ross Millikan Dec 8 '12 at 16:54

The set theory formulation of your problem would be to let $A_i$ be your input sets. Let $\phi(x)=\exists i \exists j (i \neq j \wedge x \in A_i \wedge x \in A_j)$ Then your output is the set $\{y | y \in \bigcup A_i \wedge \lnot \phi(y)\}$. I'm not sure this explains anything.

share|cite|improve this answer

Your Answer


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.