Let S = {1,2,3,.....,n} and A={(a,b) | 1<=a, b<=n}=S*S. A subset B of A is such that (x,x) belongs to B for every x belongs to S. Then find the number of subsets B.

VishAl KumAr's image