Define an explicit bijection between N times 1 2 and N and p
     Define an explicit bijection between N times {1, 2} and N and prove that it is injective and surjective. 
  
  Solution
Define
f((n,1))=2n
f((n,2)=2n-1
Proof :
1. f is injective
Note: f((m,1))=f((n,2)) is not possible
Because they are of different parity
So, let, f((m,1))=f((n,1))
So, 2m=2n ie m=n
or let, f((m,2))=f((n,2))
2m-1=2n-1
So, m=n
Hence, f is injective
2. f is surjective
Let, n be in N
Case 1. n is even
So, n =2m for some natural number, m
So, f((m,1))=2m=n
Case 2. n is odd.
SO, n=2m-1 for some natural number, m
So, f((m,1))=2m-1=n
Hence, f is surjective

