5. A music lover, having numbered five newly listened to compact discs with the digits $1,2,3,4,5$, placed them in the cassette player in a random order. What is the probability that discs №1 and №2 will be placed next to each other in the cassette player and in ascending order of their numbers?
Solution. Let's denote the event: $A$ - compact discs №1 and №2 will be placed next to each other in the cassette holder and in ascending order of their numbers.

We will find the probability of event $A$ by applying formula (1).

The total number of $n$ outcomes of the experiment can be obtained using the formulas of combination theory. There are 5 elements in total - 5 numbered compact discs. These elements are represented on Fig. 2 by symbols $\oplus$ and marked with numbers from 1 to 5.

In the formation of different combinations, all 5 elements participate, and the combinations differ only in the order of the elements; therefore, these combinations are permutations of 5 elements. Using formula (2), we get: $n=P_{5}=5$ !.

We will find the number $m$ of outcomes favorable to event $A$.

![](https://cdn.mathpix.com/cropped/2024_05_22_c311c9dd990dc55c716eg-010.jpg?height=122&width=861&top_left_y=1027&top_left_x=191)

## Fig. 2

Let elements №1 and №2 occupy the first and second positions, respectively. In this case, the other three elements can be rearranged in all possible ways, occupying the three remaining free positions. The number of ways to rearrange elements №3, №4, and №5 is $P_{3}=3$ !.

Consider how many different positions elements №1 and №2 can occupy when they are next to each other and arranged in the given order. On Fig. 2, the possible positions of these elements are shown by the symbols $\vee$. As can be seen from Fig. 2, there are 4 such positions. Therefore, $m=3!\cdot 4=4$ !.

The desired probability $P(A)=\frac{m}{n}=\frac{4!}{5!}=\frac{1}{5}$.