If a set A has 3 elements and a set B has 2 elements, how many non-empty relations can be defined from A to B?
63
31
7
15
Correct answer: 63
Solution
Each relation is a subset of A x B, which has n(A)*n(B) ordered pairs. The total number of subsets is 2 raised to that count; removing the empty set gives the non-empty relations.