This may be totally wrong but please let me know what is wrong with the following proof:

Give a bijective proof: The number of subsets of [n] equals the number of n-digit binary numbers.

Let A be the set of all subsets of P(n). Let B be the set of all binary numbers

.

Let a

A and b

B and b=

Define f: A

B where f(a)=b=

and

is a 1 or 0 according to whether i

a or i

a respectively.

Prove: f is bijective

One-to-One: Assume

and

where

and

. Now

which means that there is some i where

. This means that either (i

and i

) or (i

and i

), but

which is a contradiction. So

must =

which means

. This proves f is one-to-one.

ONTO: Given b=

where

is a 1 or 0 according to whether i

a or i

a respectively, we need to find a such that f(a)=b and a

A.

Choose a={

is the

member of P(n) and

= 1}. This means a

A which means f is ONTO. Since f is one-to-one and onto, f is a bijection.