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

If A and B are two different nonempty sets, how many distinct sets can be formed with these sets using as many unions,intersections,complements and parentheses as desired.

Four sets are fundamental:$A$,$B$,$A \cup B$,$A \cap B$.

Other sets are $A \cup B'$,$A' \cup B$,$A \cap B'$,$A' \cap B$,$A' \cup B'$,$A' \cap B'$. Any other sets are possible.

share|cite|improve this question
You could look at cartesian products and power sets. – PEV Jan 17 '11 at 15:27
@Trevor:Sorry,cartesian products and power sets are not allowed. – Vinod Jan 17 '11 at 15:30
To get a clear answer, you have to assume that A and B are not just distinct but also "as independent as possible" in some sense. Otherwise, it could be the case that A = {1} and B = {1,2}, and you only get 8 possible sets. – Rahul Jan 17 '11 at 16:02
up vote 5 down vote accepted

$16$. The corresponding Venn diagram has four parts, and you can get any combination of those four parts.

share|cite|improve this answer
@Yuan:Is there a formula for that.Is it 2^(2^n) where n is the number of distinct sets. – Vinod Jan 17 '11 at 15:33
@Vinod: yes, that sounds about right. – Qiaochu Yuan Jan 17 '11 at 15:47
@Vinod $2^{2^n - 1}$ to be accurate. – Sergey Filkin Apr 8 '12 at 8:30

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.