Intersection & union

481 Views Asked by At

If I have two sets $A$ and $B$. where $A=\{A_1,A_2,A_3,...,A_N\}$, $B=\{B_1,B_2,B_3,...,B_M\}$ and $N$ not equal to $M$, how do I write the union of all the elements of $A$ with all the elements of $B$ if and only the elements are intersecting together. i.e. something like $$X= \big\{ \{A_1 \cup B_1\,\text{ if }\, A_1 \cap B_1= B_1\} \cup \{A_1 \cup B_2 \,\text{ if }\, A_1 \cap B_2 = B_2\} \cup \{A_2 \cup B_1 \text{ if } A_2 \cap B_1= B_1\} \cup \{A_2 \cup B_2 \text{ if }\, A_2\cap B_2= B_2\} \cup \ldots \big\} $$ for all combinations up to $N$ and $M$.

1

There are 1 best solutions below

2
On

There are two possibilities I can think of :

Below is the most general way of writing it, the roaming over all elements of $A$ and $B$ is implicit and not described by indexation.

$X=\bigcup\limits_{\substack{a\in A \\ b\in B}}\{a\cup b\ \mid\ a\cap b\neq\varnothing\}$

If we know about the existence of the indicing $A_i,B_j$ we could write

$X=\bigcup\limits_{\substack{i=1..N \\ j=1..M \\ A_i\cap B_j\neq\varnothing}}\{A_i\cup B_j\}$

Note that in your text you wrote "iff the elements are intersecting together"

This is written $A_i\cap B_j\neq\varnothing$, it is different from what you wrote : $A_i\cap B_j=B_j\iff B_j\subset A_i$ and in this case $A_i\cup B_j=A_i$, is this really what you meant ?