跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2016年8月実施 専門科目II 問題3

Author

祭音Myyura (co-authored with GPT 5.6 SOL)

Description

Given a sequence A:a1,a2,,anA:a_1,a_2,\ldots,a_n of pairwise distinct numbers, a sequence ac1,ac2,,acka_{c_1},a_{c_2},\ldots,a_{c_k} with 1c1<c2<<ckn1\le c_1<c_2<\cdots<c_k\le n is called a subsequence of AA. A subsequence ac1,ac2,,acka_{c_1},a_{c_2},\ldots,a_{c_k} is called an increasing subsequence if aci<acja_{c_i}<a_{c_j} holds for all i,ji,j such that i<ji<j. Similarly, it is called a decreasing subsequence if aci>acja_{c_i}>a_{c_j} holds for all i,ji,j such that i<ji<j.

Answer the following question.

(1) For the sequence

A0: 5,2,3,9,6,8A_0:\ 5,2,3,9,6,8

show its longest increasing subsequence.

Given a sequence A:a1,a2,,anA:a_1,a_2,\ldots,a_n of pairwise distinct numbers and an integer ii such that 1in1\le i\le n, consider the set SiS_i of increasing subsequences of AA whose last element is aia_i, and let i\ell_i denote the length of a longest element of SiS_i. For example, for the sequence A0A_0 in Question (1) we have S4={(9),(5,9),(2,9),(3,9),(2,3,9)}S_4=\{(9),(5,9),(2,9),(3,9),(2,3,9)\} and 4=3\ell_4=3.

Answer the following questions.

(2) For the sequence A0A_0 in Question (1), compute 1,2,3\ell_1,\ell_2,\ell_3 and 5,6\ell_5,\ell_6.

(3) Given a sequence A:a1,a2,,anA:a_1,a_2,\ldots,a_n of pairwise distinct numbers, let \ell denote the length of a longest increasing subsequence. Using i\ell_i that is defined above, we let dmd_m denote the number of ii's such that i=m\ell_i=m. Show that there exists mm such that dmn/d_m\ge n/\ell.

(4) In the setting of Question (3), the length of a longest decreasing subsequence of AA is not smaller than n/n/\ell. Show this fact.

(5) Every sequence of pairwise distinct numbers of length nn has, either: an increasing subsequence of length not smaller than n\sqrt n; or a decreasing subsequence of length not smaller than n\sqrt n. Show this fact.

题目描述

给定两两不同的数列 A=(a1,,an)A=(a_1,\ldots,a_n)。保持下标递增而抽取的序列称为子列;其值严格递增或严格递减时,分别称为递增子列或递减子列。

(1)求 A0=(5,2,3,9,6,8)A_0=(5,2,3,9,6,8) 的一个最长递增子列。

对每个整数 1in1\le i\le n,令 SiS_i 为以 aia_i 结尾的所有递增子列之集,i\ell_i 为其中最长者的长度。例如,对第(1)问的 A0A_0,有 S4={(9),(5,9),(2,9),(3,9),(2,3,9)}S_4=\{(9),(5,9),(2,9),(3,9),(2,3,9)\},且 4=3\ell_4=3

(2)对 A0A_01,2,3,5,6\ell_1,\ell_2,\ell_3,\ell_5,\ell_6

(3)对一般的 AA,设最长递增子列长度为 \ell;对 m=1,,m=1,\ldots,\ell,令 dm={ii=m}d_m=|\{i\mid\ell_i=m\}|。证明存在 mm 使 dmn/d_m\ge n/\ell

(4)证明 AA 的最长递减子列长度不少于 n/n/\ell

(5)证明:任意长度为 nn 且元素两两不同的数列,必有长度不少于 n\sqrt n 的递增子列,或长度不少于 n\sqrt n 的递减子列。

Kai

(1)

一个最长递增子列为

(2,3,6,8).(2,3,6,8).

其长度为 44

(2)

逐项使用递推式

i=1+max{jj<i, aj<ai},\ell_i=1+\max\{\ell_j\mid j<i,\ a_j<a_i\},

空集的最大值按 00 计。得到

(1,2,3,4,5,6)=(1,1,2,3,3,4).(\ell_1,\ell_2,\ell_3,\ell_4,\ell_5,\ell_6)=(1,1,2,3,3,4).

故所求为 1=1,2=1,3=2,5=3,6=4\ell_1=1,\ell_2=1,\ell_3=2,\ell_5=3,\ell_6=4

(3)

每个 i\ell_i 恰为 1,,1,\ldots,\ell 中的一个值,故

m=1dm=n.\sum_{m=1}^{\ell}d_m=n.

由平均值原理,至少存在一个 mm 满足 dmn/d_m\ge n/\ell

(4)

固定(3)中这样的 mm,按下标递增排列所有满足 i=m\ell_i=m 的项。若其中 i<ji<jai<aja_i<a_j,则可把 aja_j 接在以 aia_i 结尾、长度为 mm 的递增子列之后,从而 jm+1\ell_j\ge m+1,矛盾。

各项两两不同,故必有 ai>aja_i>a_j。因此这些项按原顺序构成长度

dmnd_m\ge\frac n\ell

的递减子列。

(5)

n\ell\ge\sqrt n,最长递增子列已经满足要求。若 <n\ell<\sqrt n,由(4),最长递减子列长度至少为

n>n.\frac n\ell>\sqrt n.

故两者至少有一个长度不小于 n\sqrt n