翻译

 令 m>n>1 为正整数. 一个集合含有 m 个给定的实数. 我们从中选取任意 n 个数, 记作 a1a2an, 并提问: 是否 a1<a2<<an 正确? 证明: 我们可以最多问 n!n2+2n2+m(n1)(1+lognm)m 个问题,将所有的 m 个数排序.
 
We can find the order of the first n numbers n!1 questions,
looking at all possible orderings but one.
Suppose we have found the relative order of the first k numbers
and let us find the relative order of first k+1 numbers.
Suppose we have a1<a2<<ak
and let us find where ak+1 fits.
We use the following {\it binary search}:
pick n1 numbers among 1,2,,k that divide the interval [1,k]
most equally.
(This is achieved by taking the numbers
akn,a2kn,,a(n1)kn).
We can find the relative order of ak+1 and these numbers by at most n1 questions.
Indeed, for 1jn1, let qi be ``Is it true that
akn<<aaikn<ak+1<a(i+1)kn<<a(n1)kn?''
Then we find an i such that
aikn<ak+1<a(i+1)kn.
Therefore, by at most n1 questions we reduce the length of the interval of searching
from k to at most kn, where x
is the least integer number not less than x.
We repeat this binary search until we find exactly the position of ak+1
(that is, the interval of searching is 1 or 0).
Now if knj, then after i steps the interval will be at most nji,
so we need at most j=lognk steps to insert ak+1 into the sequence.
Therefore, the number of questions needed is at most
n!1+(n1)(logn(n+1)++logn(m1)).
All we need to do is to evaluate this number:
suppose that
nkm<nk+1.
Then there are n2n numbers r for which
lognr=2n3n2 numbers for which
lognr=3, and so on until we have m1nk numbers r for which
lognr=k+1.
Therefore the sum is
n!1+(n1)(2(n2n)+3(n3n2)++k(nknk1)+(k+1)(m1nk))=n!1+(n1)((k+1)(m1)nknk1n22n).
Because nk+1>m,
nk+nk1++n2+2n=nk+11n1+n1mn1+n1.
Hence our sum is at most
n!1+(n1)((k+1)(m1)mn1n+1)=n!n2+2n2+(n1)(lognm+1)mm,
as desired.

posted on   Eufisky  阅读(133)  评论(0编辑  收藏  举报

编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示