Assume that a small universe has 10 distinct stars and 100 distinct planets so that 20 of them are habitable and 80 of them are nonhabitable by humans. How many ways are there to form a galaxy with exactly one star, 2 habitable planets and 8 nonhabitable planets such that there is at least six nonhabitable planets between the two habitable ones?
Note: For this question, a galaxy is a bound system with a star at the center and a group of planets that orbit the star. Different orders of the planets create different galaxies.
We start by choosing a star. There are $\binom{10}{1}$ ways to do this. We then choose our two habitable planets and $8$ non-habitables, which are the quantities: $\binom{20}{2}$ and $\binom{80}{8}$ respectively.
There are nine slots between the non-habitable planets, including before an after. You can visualize it below:
_N_N_N_N_N_N_N_N_
The first planet can only be in one of the first three slots. So if it is in the first slot, then there are $3$ options for habitable two. If it is in the second slot, there are two options for habitable planet $2$. And if it is in the third slot, we have only one option for habitable planet two. Notice this quantity is $\binom{4}{2}$.
And so by rule of product, we multiply to get our final answer:
$$\binom{10}{1} \binom{20}{2} \binom{80}{8} \binom{4}{2}$$
Edit: If the planets are distinct objects, we would multiply the above quantity by $2! 8!$. Permute the habitables and permute non-habitables.