Difference between revisions of "2025 SSMO Accuracy Round Problems/Problem 8"
(→Problem) |
(→Solution) |
||
Line 4: | Line 4: | ||
==Solution== | ==Solution== | ||
+ | |||
+ | 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 this definition best: | ||
+ | <cmath>A = (\underbrace{2,4,5,6}_{\text{Lefty terms}},10,\underbrace{9,8,7,3,1}_{\text{Righty terms}}).</cmath> | ||
+ | Assign every element 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. 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>. | ||
+ | Therefore, the lefty terms are in increasing order. An analogous argument proves that the righty terms are in decreasing order. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | If <math>a_{r-1}</math> is defined (that is, if <math>r > 1</math>), we have <math>a_{r} > a_{r-1}</math> because the largest term of <math>A</math> is <math>10</math>. Next, consider <math>a_{r-2}</math> if it is defined. Notice that by the definition of a peaked permutation, we cannot have <math>a_{r-1} < a_{r-2}</math>. Since we obviously cannot have <math>a_{r-2} = a_{r-1}</math>, it follows that <math>a_{r-1} > a_{r-2}</math>. By analogous reasoning, <math>a_{r-1} > a_{r-2}</math> implies <math>a_{r-2} > a_{r-3}</math> if <math>a_{r-3}</math> is defined, and so on, until we arrive at <math>a_2 > a_1</math>. Therefore, the sequence <math>a_1, a_2, \dots, a_r</math> is increasing. Analogously, we can show that the sequence <math>a_r, a_{r+1}, \dots, a_{10}</math> is decreasing. | ||
+ | |||
+ | It is straightforward to verify that every permutation <math>(b_1, b_2, \dots, b_{10})</math> of <math>(1,2,\dots, 10)</math> satisfying <math>b_1 < b_2 < \cdots b_s = 10</math> and <math>10 = b_s > b_{s+1} > \cdots > b_{10}</math> is in fact peaked. Thus, we have here a more convenient definition of a peaked permutation. | ||
+ | |||
+ | Let <math>N</math> be the number of indices <math>\ell</math> such that <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>. The key to finding this value is to think about how to construct <math>A</math>, utilizing our new characterization of peaked permutations. Begin with the term <math>10</math> of <math>A</math>. For each term <math>1\le d \le 9</math> of <math>A</math>, we choose whether <math>d</math> will lie to the left or to the right of <math>a_r=10</math> when <math>A</math> is written as <math>(a_1,a_2,\dots, a_{10})</math>. Then, arranging the terms left of <math>10</math> in increasing order and arranging the terms right of <math>10</math> in decreasing order yields a peaked permutation <math>A</math>. Importantly, this <math>A</math> is uniquely determined by how we assign each term <math>1\le d\le 9</math> either to the right or to the left of <math>10</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. | ||
+ | |||
+ | <i>Case 1:</i> <math>4</math> and <math>9</math> lie on opposite sides of <math>10</math>. If this is the case, note that: | ||
+ | <UL> | ||
+ | <LI>For terms <math>1\le d < 4</math>, we have <math>P_d = 0</math> because <math>d</math> cannot lie between <math>4</math> and <math>10</math> or between <math>9</math> and <math>10</math>; otherwise, the sequence of consecutive terms from <math>4</math> to <math>10</math> or from <math>9</math> to <math>10</math> would not be strictly monotonic.</LI> | ||
+ | <LI>For terms <math>4< d < 9</math>, we have <math>P_d = \tfrac{1}{2}</math> because <math>d</math> lies between <math>4</math> and <math>10</math> when , but <math>d</math> cannot lie between <math>9</math> and <math>10</math> for the reason outlined in the previous bullet. The probability that <math>d</math> lies on the same side of <math>10</math> as <math>4</math> is <math>\tfrac{1}{2}</math>.</LI> | ||
+ | <LI>Trivially, <math>P_4 = P_9 = 0</math> and <math>P_{10} = 1</math>.</LI> | ||
+ | </UL> | ||
+ | Therefore, the expected value of <math>N</math> in this case is <math>4(\tfrac{1}{2})+1 = 3</math>. | ||
+ | |||
+ | <i>Case 2:</i> <math>4</math> and <math>9</math> lie on the same side of <math>10</math>. |
Revision as of 01:54, 17 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 this definition best:
Assign every element 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. For the sake of contradiction, suppose that there exist two lefty terms
with
.
Therefore, the lefty terms are in increasing order. An analogous argument proves that the righty terms are in decreasing order.
If is defined (that is, if
), we have
because the largest term of
is
. Next, consider
if it is defined. Notice that by the definition of a peaked permutation, we cannot have
. Since we obviously cannot have
, it follows that
. By analogous reasoning,
implies
if
is defined, and so on, until we arrive at
. Therefore, the sequence
is increasing. Analogously, we can show that the sequence
is decreasing.
It is straightforward to verify that every permutation of
satisfying
and
is in fact peaked. Thus, we have here a more convenient definition of a peaked permutation.
Let be the number of indices
such that
. Note that
, so we focus on finding
. The key to finding this value is to think about how to construct
, utilizing our new characterization of peaked permutations. Begin with the term
of
. For each term
of
, we choose whether
will lie to the left or to the right of
when
is written as
. Then, arranging the terms left of
in increasing order and arranging the terms right of
in decreasing order yields a peaked permutation
. Importantly, this
is uniquely determined by how we assign each term
either to the right or to the left of
.
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
.