# How many different sets can be formed by two nonempty sets

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.

-
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

1
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 Narain Jan 17 '11 at 16:02

## 1 Answer

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

-

@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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9332471489906311, "perplexity_flag": "middle"}