$S$ is a set of $n$ elements.
Number of ordered pairs possible in $S*S = n^{2}$.
$a.)$ $(a,b)$ must belong to the relation , thus elements left after keeping the required pair = $n^{2}-1$.
Number of relations possible = $2^{n^{2}-1}$.
$b.)$ Similar case as the 1st one , here too the answer will be $2^{n^{2}-1}$..
$c.)$ Number of ordered pairs with $a$ as first element is = $n$.
These $n$ pairs must be excluded , thus remaining pairs = $n^{2}-n$.
Number of relations possible = $2^{n^{2}-n}$.
$d.)$ At least one ordered pair in R has $a$ as it's first element.
This is same as , Total number of Relations - Relations having no $a$ as it's first element.
Thus total number of relations = $2^{n^{2}} - 2^{n^{2}-n}$ .
$e.)$ No ordered pair has $a$ as it's first element , or $b$ as it's second element .
Total ordered pairs having $a$ as first element = $n$ and similarly total ordered pairs having $b$ as it's second element = $n$.
Thus , number of ordered pairs required for the condition is = $n^{2}-2n$.
But here the pair $(a,b)$ has been excluded twice , thus decreasing the actual figure , thus actual = $n^{2}-2n+1 = (n-1)^{2}$.
Thus total number of relations = $2^{(n-1)^{2}}$.
$f.)$ This is like subproblem $d$ only , thus total number of relations here = $2^{n^{2}} - 2^{(n-1)^{2}}$