The number of ways to do this is given by the permutation formula, which is $P(n, r) = \frac{n!}{(n-r)!}$. Here, $n$ is the total number of houses (8) and $r$ is the number of houses to be arranged (5). So, we have $P(8, 5) = \frac{8!}{(8-5)!}$.
Show more…