其他分享
首页 > 其他分享> > 翻译

翻译

作者:互联网

 令 $m>n>1$ 为正整数. 一个集合含有 $m$ 个给定的实数. 我们从中选取任意 $n$ 个数, 记作 $a_1$, $a_2$, $\dotsc$, $a_n$, 并提问: 是否 $a_1<a_2<\dotsb < a_n$ 正确? 证明: 我们可以将所有的 $m$ 个数排序, 进而最多可以问 $n!-n^2+2n-2+m(n-1)(1+\lfloor \log_{n} m \rfloor)-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 $a_1<a_2<\dotsb<a_k$
and let us find where $a_{k+1}$ fits.
We use the following {\it binary search}:
pick $n-1$ numbers among $1,2,\dotsc,k$ that divide the interval $[1,k]$
most equally.
(This is achieved by taking the numbers
$a_{\left\lfloor \frac{k}{n}\right\rfloor},a_{\left\lfloor \frac{2k}{n}\right\rfloor},\ldots ,
a_{\left\lfloor \frac{(n-1)k}{n}\right\rfloor}$).
We can find the relative order of $a_{k+1}$ and these numbers by at most $n-1$ questions.
Indeed, for $1\leqslant j\leqslant n-1$, let $q_i$ be ``Is it true that
$a_{\left\lfloor \frac{k}{n}\right\rfloor}<\ldots <aa_{\left\lfloor \frac{ik}{n}\right\rfloor}
<a_{k+1}<a_{\left\lfloor \frac{(i+1)k}{n}\right\rfloor}<\ldots <a_{\left\lfloor \frac{(n-1)k}{n}\right\rfloor}$?''
Then we find an $i$ such that
$a_{\left\lfloor \frac{ik}{n}\right\rfloor}<a_{k+1}<a_{\left\lfloor \frac{(i+1)k}{n}\right\rfloor}$.
Therefore, by at most $n-1$ questions we reduce the length of the interval of searching
from $k$ to at most $\left\lceil \frac{k}{n}\right\rceil$, where $\lceil x\rceil$
is the least integer number not less than $x$.
We repeat this binary search until we find exactly the position of $a_{k+1}$
(that is, the interval of searching is 1 or 0).
Now if $k\leqslant n^j$, then after $i$ steps the interval will be at most $n^{j-i}$,
so we need at most $j=\lceil \log _n k\rceil$ steps to insert $a_{k+1}$ into the sequence.
Therefore, the number of questions needed is at most
$n!-1+(n-1)(\lceil \log_n(n+1)\rceil+\ldots +\lceil \log_n(m-1)\rceil)$.
All we need to do is to evaluate this number:
suppose that
$n^k\leqslant m<n^{k+1}$.
Then there are $n^2-n$ numbers $r$ for which
$\lceil \log_n r\rceil=2$, $n^3-n^2$ numbers for which
$\lceil \log_n r\rceil=3$, and so on until we have $m-1-n^k$ numbers $r$ for which
$\lceil \log_n r\rceil=k+1$.
Therefore the sum is
\begin{align*}
  n!-1+(n-1)(2(n^2-n)+3(n^3-n^2)+\dotsb +k(n^k-n^{k-1})+(k+1)(m-1-n^k))  \\
  =n!-1+(n-1)((k+1)(m-1)-n^k-n^{k-1}-\dotsb -n^2-2n).
\end{align*}
Because $n^{k+1}>m$,
\[ n^k+n^{k-1}+\dotsb +n^2+2n=\frac{n^{k+1}-1}{n-1}+n-1
\geqslant \frac{m}{n-1}+n-1. \]
Hence our sum is at most
\begin{align*}
  n!-1+(n-1)\left((k+1)(m-1)-\frac{m}{n-1}-n+1\right) \\
 = n!-n^2+2n-2+(n-1)(\lfloor \log_n m\rfloor+1)m-m,
\end{align*}
as desired.

标签:翻译,right,frac,log,lceil,most,rceil
来源: https://www.cnblogs.com/Eufisky/p/11142383.html