公式

F - Beautiful Kadomatsu 解説 by en_translator

Editorial (former half)

Original proposer: blackyuki


Examples of kadomatsu-like sequences include:

1 3 2
4 6 5 3 8 2 7 1
2 7 6 1 3 4 8 5
4 9 3 7 6 8 1 5 2
2 7 3 9 1 8 5 6 4
1 6 2 3 5 4
1 4 3 2
4 6 3 2 5 1
2 7 3 1 6 5 4
1 9 7 5 2 8 4 6 3

Can we guess the conditions for a sequence to be kadomatsu-like?


Since the input sequence is a permutation, we do not have to worry about cases like \(a_i=a_{i+1}\) were adjacent terms are equal. Also, what only matters is the ordering between adjacent elements, so let us rewrite the sequence in the form that clarify the ordering for the sake of observations.

Denote by < a pair with \(a_i < a_{i+1}\), and > with \(a_i > a_{i+1}\).
Then the orderings between adjacent terms can be represented as a string of < and >. \(x\) corresponds to the number of substring <>, and \(y\) for ><.

The examples above are transformed into:

<>
<>><><>
<>><<<>
<><><><>
<><><><>
<><<>
<>>
<>><>
<>><>>
<>>><><>

Do they suggest some conditions of being kadomatsu-like?

Continued to the latter half.

投稿日時:
最終更新: