# Solution.

a) For the teams to meet in the semifinal, they must end up in different but converging to one semifinal subgroups (Event $X$).

Note: On the diagram, one subgroup consists of positions "1" and "2", "3" and "4", etc.

Team "A" can end up in any subgroup. For Team "B" to meet "A" in the semifinal, it must end up in an adjacent subgroup. The probability of this is $\frac{2}{7}$.

Then both "A" and "B" must win their matches (Event $Y$). The probability of this is $\frac{1}{4}$.

Since the teams play football equally well, the probability of winning in a subgroup is $\frac{1}{2}$, and the wins of teams "A" and "B" are independent events, so $\mathrm{P}(Y)=\frac{1}{2} \cdot \frac{1}{2}=\frac{1}{4}$.

Since events $X$ and $Y$ are independent,

$$
\begin{gathered}
\mathrm{P}(\{\text{ teams A and B will meet in the semifinal }\})= \\
=\mathrm{P}(X) \mathrm{P}(Y)=\frac{2}{7} \cdot \frac{1}{4}=\frac{1}{14}
\end{gathered}
$$

Answer: $\frac{1}{14}$.

b) For the teams to meet in the final, Team "B" must end up in the half of the table where Team "A" is not. Accordingly, $\mathrm{P}(X)=\frac{4}{7}$.

In addition, each team must win two matches.

$$
\mathrm{P}(Y)=\frac{1}{2} \cdot \frac{1}{2} \cdot \frac{1}{2} \cdot \frac{1}{2}=\frac{1}{16}
$$

In the end:

$$
\begin{gathered}
\mathrm{P}(\{\text{ teams A and B will meet in the final }\})= \\
=\mathrm{P}(X) \mathrm{P}(Y)=\frac{4}{7} \cdot \frac{1}{16}=\frac{1}{28}
\end{gathered}
$$

Answer: $\frac{1}{28}$.
2. In a school football tournament, 8 teams of equal skill are participating. Each game ends with one team winning. A randomly drawn number determines a team's position in the tournament table:

| Quarterfinals |  | Semifinals | Final |
| :---: | :---: | :---: | :---: |
| 1 | ? |  |  |
| 2 | ? | 0 |  |
|  |  |  |  |
| 3 | ? |  |  |
| 4 | ? |  | $?$ |
| 5 | 7 |  | $?$ |
| 6 | $?$ |  |  |
|  |  | ? |  |
| 7 | ? | $?$ |  |
| 8 | ? |  |  |

What is the probability that teams "A" and "B":

a) will meet in the semifinals;

b) will meet in the final.