Let $A={1,2,3,4}$, and $f$ and $g$ be randomly chosen (not necessarily distinct) functions from $A$ to $A$. Find the probability that the range of $f$ and the range of $g$ are disjoint.
The number of total possible cases is $4^4\times 4^4=4^8$ becase each of $f$ and $g$ has $4^4$ ways to map $A$ to $A$.
To calculate the number of qualified cases, we turn to the casework method. Let $f_1$, $f_2$, $f_3$ represent the functions having $1$, $2$, and $3$ elements in their range, respectively. We use a similar notion for $g$. Then, $f_1g_2$ represents the case where there are $1$ element in $f$'s range and $2$ elements in $g$'s range. In order for their ranges to be disjoint, we can only have the following cases $$f_1g_1\quad f_1g_2\quad f_1g_3\quad f_2g_1\quad f_2g_2\quad f_3g_1$$
- $f_1g_1$: $4$ ways to choose the range for $f$, and $3$ ways for $g$. Hence, the total is $4\times 3=12$.
- $f_1g_2$: $4$ ways to choose the range for $f$, and $C_3^2=3$ ways for $g$. Meanwhile, there are $2^4 - 2$ cases to map $4$ inputs to exactly $2$ outputs. Hence, the total number of cases in this scenario is $4\times3\times (2^4-2)=168$.
- $f_1g_3$: $4$ ways to choose the range for $f$, and only $1$ way for $g$. To compute the ways of mapping $4$ inputs to exactly $3$ outputs, we employ the bundling technique because there must be exactly $2$ inputs maping to $1$ output and the other two inputs mapping to other two outputs, respectively. There are $C_4^2=6$ ways to find a bundle of $2$ inputs. Then we have $3\times 2\times 1$ ways to mapping three inputs (one of which is a bundle) to $3$ outputs. Hence, the total is $4\times 6\times 6=144$.
- $f_2g_1$: by the principle of symmetry, it should be the same as $f_1g_2$, i.e. $168$.
- $f_2g_2$: during the calculation of $f_1g_2$ we have already know there are $14$ ways to map four inputs to exactly two puts. Meanwhile, we have $C_4^2=6$ ways to choose two outputs for $f$. Hence the number of cases in this scenario is $6\times 14\times 14 = 1176$.
- $f_3g_1$: by the principle of symmetry, it should the same as $f_1g_3$, i.e. $36$.
Hence, the number of total cases is $12+168+144+168+1176+144=1812$. Accordingly the probability is $$\frac{1812}{4^8}=\frac{453}{4^7}=\boxed{\frac{453}{16384}}$$