鱼C论坛

 找回密码
 立即注册
查看: 2680|回复: 0

题目158:考察只有一个字母是以词典序排在它的左邻居之后的字符串

[复制链接]
发表于 2016-9-14 16:00:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

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) 的最大值。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-12-22 20:57

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表