Difference between revisions of "2025 SSMO Accuracy Round Problems/Problem 8"
(→Solution) |
(→Solution) |
||
Line 7: | Line 7: | ||
Let <math>A = (a_1, a_2, \dots, a_{10})</math> be an arbitrary permutation in <math>\mathcal{S}</math>, let <math>p</math> and <math>q</math> be as in the problem statement, and let <math>1\le r \le 10</math> be the integer such that <math>a_r = 10</math>. | Let <math>A = (a_1, a_2, \dots, a_{10})</math> be an arbitrary permutation in <math>\mathcal{S}</math>, let <math>p</math> and <math>q</math> be as in the problem statement, and let <math>1\le r \le 10</math> be the integer such that <math>a_r = 10</math>. | ||
− | The key to solving this problem is to formulate a way of uniquely constructing every possible <math>A</math>. To do this, we first introduce two bits of intuitive terminology; we say that a term <math>a_x \ne a_r</math> of <math>A</math> is <i>lefty</i> if <math>x<r</math> and <i>righty</i> if <math>x>r</math>. An example showcases | + | The key to solving this problem is to formulate a way of uniquely constructing every possible <math>A</math>. To do this, we first introduce two bits of intuitive terminology; we say that a term <math>a_x \ne a_r</math> of <math>A</math> is <i>lefty</i> if <math>x<r</math> and <i>righty</i> if <math>x>r</math>. An example showcases these definitions best: |
<cmath>A = (\underbrace{2,4,5,6}_{\text{Lefty terms}},10,\underbrace{9,8,7,3,1}_{\text{Righty terms}}).</cmath> | <cmath>A = (\underbrace{2,4,5,6}_{\text{Lefty terms}},10,\underbrace{9,8,7,3,1}_{\text{Righty terms}}).</cmath> | ||
− | Assign every | + | Assign every term of <math>A</math> not equal to <math>10</math> to be either lefty or righty. We claim that this uniquely determines a peaked permutation <math>A</math>; in fact, we show that the lefty terms must be in increasing order and the righty terms must be in decreasing order (and if this is the case, it is easy to verify that <math>A</math> is indeed peaked). For the sake of contradiction, suppose that there exist two lefty terms <math>a_{x_1} > a_{x_2}</math> with <math>x_1 < x_2</math>. However, we then have <math>a_{x_1} > a_{x_2}</math> and <math>a_{x_2} < a_r</math> with <math>1 \le x_1 < x_2 < r \le 10</math>; contradiction. |
− | Therefore, the lefty terms are in increasing order. | + | Therefore, the lefty terms are in increasing order. A similar argument proves that the righty terms are in decreasing order. |
+ | Let <math>N</math> be the number of indices <math>\ell</math> such that <math>a_\ell</math> lies between <math>a_p = 4</math> and <math>a_q = 9</math> in <math>A</math>; that is, when either <math>p < \ell < q</math> or <math>p > \ell > q</math>. Note that <math>\mathbb{E}[|p-q|] = \mathbb{E}[N] + 1</math>, so we focus on finding <math>\mathbb{E}[N]</math>. We do this via casework on whether each of <math>4</math> and <math>9</math> is lefty or righty. By symmetry, the case where <math>4</math> and <math>9</math> are both lefty is equivalent to the case where <math>4</math> and <math>9</math> are both righty, and the case where <math>4</math> is left and <math>9</math> is righty is equivalent to the case where <math>4</math> is righty and <math>9</math> is lefty. Hence, we really only have two cases to consider. | ||
− | |||
− | |||
− | + | For the sake of notation, let <math>P_d</math> denote the probability that the term <math>1\le d\le 10</math> lies between the terms <math>a_p = 4</math> and <math>a_p = 9</math>. In particular, linearity of expected value tells us that <math>\mathbb{E}[N] = P_1 + P_2 + \cdots + P_{10}</math>. | |
+ | |||
+ | <i>Case 1:</i> <math>4</math> and <math>9</math> are both lefty | ||
+ | |||
+ | <i>Case 2:</i> <math>4</math> and <math>9</math> are both righty. By symmetry, this case is equivalent to the previous one, so the expected value | ||
+ | |||
+ | <i>Case 3:</i> <math>d=10</math>. | ||
+ | |||
+ | <i>Case 4:</i> <math>d=4,9</math>. Trivially, we have <math>P_4 = P_9 = 0</math>. | ||
+ | |||
+ | |||
When <math>A</math> is written as <math>(a_1, a_2, \dots, a_{10})</math>, either <math>a_r = 10</math> lies between <math>a_p = 4</math> and <math>a_q = 9</math> or it does not. Each possibility is equally likely; whether <math>4</math> is assigned to left or to the right of <math>10</math>, there is a <math>\tfrac{1}{2}</math> chance that <math>9</math> is assigned to the same side of <math>10</math> as <math>4</math>. Thus, we will determine the expected value of <math>N</math> in each of these cases and then take their average to find <math>\mathbb{E}[N]</math>. We introduce some useful notation right before we do so; for each term <math>1\le d \le 10</math>, let <math>P_d</math> denote the probability that <math>d</math> lies between the terms <math>4</math> and <math>9</math> in <math>A</math>. In particular, note that <math>\mathbb{E}[N] = P_1 + P_2 + \cdots + P_{10}</math> by the linearity of expected value. | When <math>A</math> is written as <math>(a_1, a_2, \dots, a_{10})</math>, either <math>a_r = 10</math> lies between <math>a_p = 4</math> and <math>a_q = 9</math> or it does not. Each possibility is equally likely; whether <math>4</math> is assigned to left or to the right of <math>10</math>, there is a <math>\tfrac{1}{2}</math> chance that <math>9</math> is assigned to the same side of <math>10</math> as <math>4</math>. Thus, we will determine the expected value of <math>N</math> in each of these cases and then take their average to find <math>\mathbb{E}[N]</math>. We introduce some useful notation right before we do so; for each term <math>1\le d \le 10</math>, let <math>P_d</math> denote the probability that <math>d</math> lies between the terms <math>4</math> and <math>9</math> in <math>A</math>. In particular, note that <math>\mathbb{E}[N] = P_1 + P_2 + \cdots + P_{10}</math> by the linearity of expected value. |
Revision as of 13:29, 18 September 2025
Problem
We say that a permutation of the integers
through
inclusive is peaked if there do not exist three integers
such that
and
. Let
be the set of all peaked permutations. If
and
, the expected value of
over all permutations in
can be written as
, where
and
are relatively prime positive integers. What is the value of
?
Solution
Let be an arbitrary permutation in
, let
and
be as in the problem statement, and let
be the integer such that
.
The key to solving this problem is to formulate a way of uniquely constructing every possible . To do this, we first introduce two bits of intuitive terminology; we say that a term
of
is lefty if
and righty if
. An example showcases these definitions best:
Assign every term of
not equal to
to be either lefty or righty. We claim that this uniquely determines a peaked permutation
; in fact, we show that the lefty terms must be in increasing order and the righty terms must be in decreasing order (and if this is the case, it is easy to verify that
is indeed peaked). For the sake of contradiction, suppose that there exist two lefty terms
with
. However, we then have
and
with
; contradiction.
Therefore, the lefty terms are in increasing order. A similar argument proves that the righty terms are in decreasing order.
Let be the number of indices
such that
lies between
and
in
; that is, when either
or
. Note that
, so we focus on finding
. We do this via casework on whether each of
and
is lefty or righty. By symmetry, the case where
and
are both lefty is equivalent to the case where
and
are both righty, and the case where
is left and
is righty is equivalent to the case where
is righty and
is lefty. Hence, we really only have two cases to consider.
For the sake of notation, let denote the probability that the term
lies between the terms
and
. In particular, linearity of expected value tells us that
.
Case 1: and
are both lefty
Case 2: and
are both righty. By symmetry, this case is equivalent to the previous one, so the expected value
Case 3: .
Case 4: . Trivially, we have
.
When is written as
, either
lies between
and
or it does not. Each possibility is equally likely; whether
is assigned to left or to the right of
, there is a
chance that
is assigned to the same side of
as
. Thus, we will determine the expected value of
in each of these cases and then take their average to find
. We introduce some useful notation right before we do so; for each term
, let
denote the probability that
lies between the terms
and
in
. In particular, note that
by the linearity of expected value.
Case 1: and
lie on opposite sides of
. If this is the case, note that:
- For terms
, we have
because
cannot lie between
and
or between
and
; otherwise, the sequence of consecutive terms from
to
or from
to
would not be strictly monotonic.
- For terms
, we have
because
lies between
and
when , but
cannot lie between
and
for the reason outlined in the previous bullet. The probability that
lies on the same side of
as
is
.
- Trivially,
and
.
Therefore, the expected value of in this case is
.
Case 2: and
lie on the same side of
.