Here is an example, let us assume we have the following collection of sets $$A_{1}:=\{1,2,3\}, A_{2}:=\{3,4\}, A_{3}:=\{4,5\}, A_{4}:=\{6\}, A_{5}:=\{6,7\}.$$ Now I would love to define a collection of disjoint sets, where I merge two sets whenever their intersection is nonempty. For this example this means: $$B_{1}:=A_{1}\cup A_{2}\cup A_{3},$$ $$B_{2}:=A_{4}\cup A_{5}.$$ What is the name of the collection $\mathcal{B}=\{B_{1},B_{2}\}$, formed by $\mathcal{A}=\{A_{1},...,A_{5}\}$? Is there a nice way to define $\mathcal{B}$?
Sorry for the very basic question, but all I was able to find is "Disjoint-set data structures" and I was not sure if this corresponds to my problem.