Problem 4. A gardener has to plant in a row along a path three oaks, four oaks, and five beeches. He plants the trees at random; the probability of planting one tree or another is the same.

Find the probability that, once all the trees are planted, no two beeches are consecutive.
Solution. One way to arrange the trees so that no two beeches are consecutive is to imagine all the oaks and all the pines planted, and place the five beeches among the gaps and the ends; we thus have eight gaps to place the beeches.

The problem can be approached with two different assumptions, although the final result is the same.

Assumption 1. It is not possible to distinguish between the oaks, the pines, and the beeches. The total number of arrangements is equal to the permutations with repetition of 12 elements, of which 3, 4, and 5 are identical; this is $\frac{12 !}{3 ! 4 ! 5 !}$. The number of favorable arrangements is equal to the combinations of 8 elements taken 5 at a time multiplied by the number of permutations with repetition of 7 elements, of which 3 and 4 are identical. The probability is:

$$
p_{1}=\frac{\frac{8 !}{5 ! 3 !} \frac{7 !}{3 ! 4 !}}{\frac{12 !}{3 ! 4 ! 5 !}}=\frac{7}{11 \times 9}=\frac{7}{99}
$$

Assumption 2. It is possible to distinguish between the oaks, pines, and beeches. In this case, the total number of arrangements is 12!, and the number of favorable arrangements is the product of 7!, the ways to place the oaks and the pines, by $8 \times 7 \times 6 \times 5 \times 4$, the ways to place the five beeches so that no two beeches are consecutive. The probability is:

$$
p_{2}=\frac{(8 \times 7 \times 6 \times 5 \times 4)(7 !)}{12 !}=\frac{7}{11 \times 9}=\frac{7}{99}
$$