Artificial intelligent assistant

Cardial of $X=\{(A,B):A,B \subseteq \{1,...,n\}, A \cap B= \emptyset\}$ I have to compute the cardial of $X=\\{(A,B):A,B \subseteq \\{1,...,n\\}, A \cap B= \emptyset\\}$.I started computed de cardinal of $Y=\\{(A,B):A,B \subseteq \\{1,...,n\\}\\}$. Using the multiplication principle $|Y|=|P(\\{1,...,n\\}) x P(\\{1,...,n\\})|=|P(\\{1,...,n\\})| x |P(\\{1,...,n\\})|= 2^n + 2^n=2^{n+1}$. Now, i want use the Inclusion–exclusion principle to compute the sets which have intersecction but i dont know how

If $A$ has cardinal $j \in \lbrace 0, ..., n \rbrace$, the number of $B$ such that $A \cap B = \emptyset$ is equal to the number of subsets of a set of cardinal $n-j$, i.e. is equal to $2^{n-j}$.

And you have ${n \choose j}$ subsets of cardinal $j$, so the number of pairs $(A,B)$ such that $A \cap B = \emptyset$ is equal to $$\sum_{j=0}^n {n \choose j} 2^{n-j} = 3^n$$

**Another way to see this result :** for each element of $\lbrace 1, ..., n \rbrace$, you have $3$ choices : put it in $A$, put it in $B$, or put it in $\lbrace 1, ..., n \rbrace \setminus (A \cup B)$. Because you want $A \cap B = \emptyset$, these choices are disjoint. So the total number of choices is $$3^n$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy afcac281417e81b2588b2fcbf81bd87d