RUШаг 1. Понижение размерности. Пусть $\mathcal{L}$ — плоскость, натянутая на $a$ и $l$. Для любого вектора $\psi$ рассмотрим его ортогональную проекцию $\psi_1$ на $\mathcal{L}$. Разность $\psi - \psi_1$ перпендикулярна плоскости, а значит и обоим векторам:
$$\langle a, \psi\rangle = \langle a, \psi_1\rangle, \qquad \langle l, \psi\rangle = \langle l, \psi_1\rangle$$Исход раунда зависит только от проекции. Задача из $n$-мерной стала плоской.
Шаг 2. Свойство нормального распределения. Проекция стандартного нормального вектора на плоскость — снова стандартный нормальный вектор, но размерности 2. Его направление распределено равномерно по окружности.
Шаг 3. Геометрическая вероятность. Условие $\langle\psi_1, a\rangle = 0$ задаёт на плоскости прямую, перпендикулярную $a$; условие $\langle\psi_1, l\rangle = 0$ — прямую, перпендикулярную $l$. Угол между этими двумя прямыми равен углу $\phi$ между самими $a$ и $l$. Две прямые режут плоскость на четыре сектора: два углового размера $\phi$, где знаки скалярных произведений расходятся, и два размера $\pi - \phi$, где знаки совпадают. Проверка: $2\phi + 2(\pi-\phi) = 2\pi$. Какая из двух пар шире, зависит от того, острый угол $\phi$ или тупой, и на ответ это не влияет.
Очко Артёму даётся ровно тогда, когда направление попало в сектор размера $\phi$, а направление распределено равномерно, значит
$$\P(\text{очко Артёму}) = \frac{2\phi}{2\pi} = \frac{\phi}{\pi}$$Это ровно та формула, которая была получена на плоскости в задаче b0904.
Шаг 4. Закон больших чисел. Раунды независимы и одинаково распределены, очки только начисляются, поэтому число очков Артёма — это просто число выигранных им раундов. Отношение к числу раундов есть частота события, и она стремится к его вероятности:
$$\frac{\text{очки Артёма}}{\text{число раундов}} \longrightarrow \frac{\phi}{\pi} = \frac{1}{\pi}\arccos\frac{\langle a,l\rangle}{\|a\|\,\|l\|}$$Подставляем данные. $\langle a,l\rangle = 1$, $\|a\| = 1$, $\|l\| = \sqrt2$, значит $\cos\phi = \frac{1}{\sqrt2}$ и $\phi = \frac{\pi}{4}$.
$$\frac{\phi}{\pi} = \frac{\pi/4}{\pi} = \frac14 = 0.2500$$Где здесь теряют ответСоблазн посчитать «перевес»: если обозначить долю раундов Лёши через $p = 1 - \phi/\pi$, то разность $p - (1 - p) = 2p - 1$ равна $0.5$ и выглядит красиво. Но это ответ на другой вопрос — так считают, когда за проигранный раунд снимают очко. В нашем условии сказано прямо, что очки только начисляются, поэтому нужна сама доля, а не перевес.
Проверка здравым смыслом: доля обязана лежать в $[0, 1]$ и при $\phi \to 0$ (векторы почти сонаправлены) стремиться к нулю — Артёму почти нечего ловить. Формула $\phi/\pi$ этому отвечает.
Три идеи в одной задачеПервая: проекция сохраняет скалярные произведения с векторами подпространства — поэтому многомерную задачу можно сплющить до плоской.
Вторая: направление нормального вектора распределено равномерно — здесь смыкаются линейная алгебра и геометрическая вероятность второго дня.
Третья: закон больших чисел превращает «отношение очков к раундам» в вероятность одного раунда.
Ни одна из них по отдельности не сложна, и каждая вполне может прийти на YMLS. Задача уровня ШАД отличается тем, что требует соединить все три.
ENStep 1. Reduce the dimension. Let $\mathcal{L}$ be the plane spanned by $a$ and $l$. For any vector $\psi$, let $\psi_1$ be its orthogonal projection onto $\mathcal{L}$. The difference $\psi - \psi_1$ is perpendicular to the plane and therefore to both vectors:
$$\langle a, \psi\rangle = \langle a, \psi_1\rangle, \qquad \langle l, \psi\rangle = \langle l, \psi_1\rangle$$Thus, the outcome of the round depends only on the projection. The $n$-dimensional problem has been reduced to a planar one.
Step 2. Use a property of the normal distribution. The projection of a standard normal vector onto a plane is again a standard normal vector, now in two dimensions. Its direction is uniformly distributed on the circle.
Step 3. Calculate the geometric probability. In the plane, the condition $\langle\psi_1, a\rangle = 0$ defines a line perpendicular to $a$, while $\langle\psi_1, l\rangle = 0$ defines a line perpendicular to $l$. Rotating both vectors by $\frac{\pi}{2}$ preserves their angular separation modulo $\pi$. The four boundary rays divide the plane into alternating sectors: two with angular measure $\phi$, where the signs of the inner products differ, and two with angular measure $\pi - \phi$, where the signs agree. As a check, $2\phi + 2(\pi-\phi) = 2\pi$. Which pair of sectors is wider depends on whether $\phi$ is acute or obtuse, but this does not affect the formula.
Artyom receives a point precisely when the direction lies in one of the sectors of angular measure $\phi$. Since the direction is uniformly distributed,
$$\P(\text{Artyom scores}) = \frac{2\phi}{2\pi} = \frac{\phi}{\pi}$$This is exactly the formula derived for the plane in problem b0904.
Step 4. Apply the law of large numbers. The rounds are independent and identically distributed, and points are only awarded, so Artyom's score is simply the number of rounds he wins. The ratio of his score to the number of rounds is the frequency of this event, which converges to its probability:
$$\frac{\text{Artyom's score}}{\text{number of rounds}} \longrightarrow \frac{\phi}{\pi} = \frac{1}{\pi}\arccos\frac{\langle a,l\rangle}{\|a\|\,\|l\|}$$Substitute the given vectors. We have $\langle a,l\rangle = 1$, $\|a\| = 1$, and $\|l\| = \sqrt2$. Hence $\cos\phi = \frac{1}{\sqrt2}$ and $\phi = \frac{\pi}{4}$.
$$\frac{\phi}{\pi} = \frac{\pi/4}{\pi} = \frac14 = 0.2500$$A common wrong turnIt is tempting to calculate the score margin. If $p = 1 - \phi/\pi$ denotes Lyosha's share of the rounds, then the difference $p - (1 - p) = 2p - 1$ equals $0.5$, which looks appealing. But that answers a different question: this calculation would apply if a point were deducted for losing a round. The problem explicitly states that points are only awarded, so we need the share itself, not the margin.
As a reasonableness check, the answer must lie in $[0, 1]$ and approach zero as $\phi \to 0$, when the vectors point in nearly the same direction and Artyom has almost no chance of scoring. The formula $\phi/\pi$ satisfies both conditions.
Three ideas in one problemFirst: projection preserves inner products with vectors in the subspace, allowing us to flatten a high-dimensional problem into a planar one.
Second: the direction of a normal vector is uniformly distributed. This connects linear algebra with the geometric probability studied on Day 2.
Third: the law of large numbers turns the ratio of points to rounds into the probability of the outcome in a single round.
None of these ideas is difficult on its own, and any one of them could readily appear on YMLS. What makes this a SHAD-level problem is the need to combine all three.