How can I solve n-ary relations, is there a formula or something.I solved the first one but how can I solve more complicated than just with two, like the one in example $(d)$
EDIT: The problem is correct this way:
a. Give an explict subset of A for the given set.
b. Give an explict subset of $A^2$ for the given relation.
c. Give an explict subset of $A^3$ for the given relation.
d. Give an explict subset of $A^4$ for the given relation.

The problem is incorrect. The correct problem is:
a. Give an explict subset of A for the given set.
b. Give an explict subset of $A^2$ for the given relation.
c. Give an explict subset of $A^3$ for the given relation.
d. Give an explict subset of $A^4$ for the given relation.