|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
Exploring strings for which only one character comes lexicographically after its neighbour to the left
Taking three different letters from the 26 letters of the alphabet, character strings of length three can be formed.
Examples are 'abc', 'hat' and 'zyx'.
When we study these three examples we see that for 'abc' two characters come lexicographically after its neighbour to the left.
For 'hat' there is exactly one character that comes lexicographically after its neighbour to the left. For 'zyx' there are zero characters that come lexicographically after its neighbour to the left.
In all there are 10400 strings of length 3 for which exactly one character comes lexicographically after its neighbour to the left.
We now consider strings of n ≤ 26 different characters from the alphabet.
For every n, p(n) is the number of strings of length n for which exactly one character comes lexicographically after its neighbour to the left.
What is the maximum value of p(n)?
题目:
从字母表中取三个字母,可以形成长度为三的字符串。
比如,'abc', 'hat' and 'zyx'。
当我们仔细研究这三个例子,我们可以发现,'abc'这个串中,有两个字符是以词典序排在它的左邻居之后。
'hat' 这个串中,只有一个字母是以词典序排在它的左邻居之后。 'zyx' 则是没有
在所有长度为 3 的字符串中,有 10400 个满足“只有一个字母是以词典序排在它的左邻居之后的”。
我们现在研究长度为 n ≤ 26 的不同字母组成的字符串。
p(n) 表示长度为 n,且只有一个字母是以词典序排在它的左邻居之后的字符串的个数。
求 p(n) 的最大值。
|
|