If A is a finite set, with $|A|=k$, how i can make a bijection between $\mathcal{P}(A)$ and $\{0,1\}×\{0,1\}×\{0,1\}×...×\{0,1\}$ ($k$ times)? I defined a indicator function:
Let $X\in \mathcal{P}(A)$ and $g_X(a)=\begin{cases}1\,,a\in X\\0,\,a\in A-X\end{cases}$
Let $B=\{0,1\}×\{0,1\}×\{0,1\}×...×\{0,1\}$ ($k$ times) to save writing
But, my problem is idk how I can relate $f:P(A)\to B$ with $g_X$ so that $f$ is bijective. I think it makes no sense to define $f(X) = g_X$ because $g_X=0$ or $1$ and $f(X)=$ something like $(0,0,1,0,1,...)$
Sorry if the question is silly or if it's duplicated, but I am a newbie at this.
Since $|A|=k$, we can find a bijection between $A$ and $\{1, \ldots, k\}$, hence we can index the elements of $A$ where $a_1, \ldots, a_k$
Let $f(X) = b$ where $b \in B$ where $b_i=1$ if $a_i \in X$ that is $$b_i = g_X(a_i)$$