Q:

Probability that 4/4, 2/4 Discrete Uniform RVs aren't equal

If I have four discrete $uniform(1,32)$ RVs. I'm trying to figure out the probability that 
a) None are the same
b) exactly two are the same
I thought that the probability that none are the same would be $\frac{1}{(1/31)^4} = 0.00000108281241$ although I might be over simplifying this
for exactly 2 I'm not sure where to start I was thinking maybe I should use either counting methods or summing the PMFs by convolving 4 uniform PMFs and dividing by 4 which would give me something like a triangle distribution? 
Would someone please point me in the right direction?

A:

Consider a sequence of four observations, one from each random variable: $$(x_1,x_2,x_3,x_4).$$ There are $32^4 = 1{,}048{,}576$ such sequences, each of which is equally likely.
For a), there are 32 choices for $x_1$, leaving 31 choices for $x_2$, leaving 30 choices for $x_3$, leaving 29 choices for $x_4$. By the multiplication principle, there are $32 \times 31 \times 30 \times 29 = \frac{32!}{28!} = 863{,}040$ sequences $(x_1,x_2,x_3,x_4)$ in which each $x_i$ is distinct from the others. Each of those sequences is equally likely. Therefore, the probability in question is $\frac{863{,}040}{1{,}048{,}576} = \frac{13{,}485}{16{,}384}$.
For (b), choose:

two of the observations to be equal;
a single integer in $[1,32]$ for those two observations;
two integers (distinct from the previous choice and from each other) in $[1,32]$ for the remaining two observations;

There are $\binom{4}{2}$ ways to make the first choice, $32$ ways to make the second choice, leaving $31 \times 30$ ways to make the third, and final, choice. By the multiplication principle, there are $\binom{4}{2} \times 32 \times 31 \times 30 = 178{,}560$ sequences $(x_1,x_2,x_3,x_4)$ in which exactly two observations are the same. Each of those sequences is equally likely. Therefore, the probability in question is $\frac{178{,}560}{1{,}048{,}576} = \frac{1{,}395}{8{,}192}$.

