[Math] Find bijective correspondence between the sets

elementary-set-theoryfunctions

Find bijective correspondence between the set of all functions of $X$
in the set $\left\{ 0,1 \right\}$ and the power set of set $X$ and
find $| 2 ^ X |$, if $| X | = n.$


My thoughts: number of functions between set $X$ and $\left\{ 0,1 \right\}$ = $2 ^ n$, because $| X | = n$. Power of power set is $| 2 ^ X | = 2 ^ n$. Therefore, between the two sets can be bijection. It remains to figure out now how to do it to each element of the power set put in correspondence exactly one function of $X$ into $\left\{ 0,1 \right\}$.

Best Answer

Given a particular function $f:X\to\{0,1\}$, let $S$ be the preimage of $1$. In other words,

$$S=\{x\in X\mid f(x)=1\}$$

This is your desired bijection.

For the inverse bijection, given a subset $S\subseteq X$, define $f:X\to\{0,1\}$ by

$$f(x) = \begin{cases} 0, & \text{if $x\not\in S$} \\ 1, & \text{if $x\in S$} \end{cases}$$