Clear Notion Academy

Sets, Relations and Functions (Beyond Advanced) Practice: A relation R from A= 1,2,3,4 to B= a,b,c is a subset of A B . How many relations R from A…

Question

A relation RR from A={1,2,3,4}A=\{1,2,3,4\} to B={a,b,c}B=\{a,b,c\} is a subset of A×BA\times B. How many relations RR from AA to BB have domain equal to AA and range equal to BB (every element of AA is related to at least one element of BB, and every element of BB is related to at least one element of AA)?

Answer

Answer: 2161

Hint

Count relations whose values lie inside a chosen kk-element part of BB (each element of AA picks a non-empty subset of it), then use inclusion-exclusion on the missed elements of BB.

Solution

If all images must lie within a given kk-element subset of BB and every element of AA has at least one image, each element of AA picks a non-empty subset of that kk-set: (2k−1)4(2^k-1)^4 relations. Inclusion-exclusion over the elements of BB missing from the range: ∑k=03(−1)3−k(3k)(2k−1)4=74−3⋅34+3⋅14−0=2401−243+3=2161\sum_{k=0}^{3}(-1)^{3-k}\binom3k(2^k-1)^4=7^4-3\cdot3^4+3\cdot1^4-0=2401-243+3=2161. The domain condition alone gives 74=24017^4=2401; subtracting only the three single misses without adding back gives 21582158.

More questions from Sets, Relations and Functions (Beyond Advanced) Practice

Practise the full set: Sets, Relations and Functions — Beyond Advanced