編集:Lemmas 2および3を追加しました。
ここに部分的な答えがあります:位置Nに到達できますN
- in Nは、スペースN O (ϵ (N ))を使用して移動します。ここで、ϵ (N )= 1 / √NNO(ϵ(N))ログN。(補題1)ϵ(N)=1/logN−−−−−√
- in N 1 + δは、スペースO (log N )を使用して移動します(δ > 0の定数の場合)(補題2)。N1+δO(logN)δ>0
また、下限(補題3)をスケッチします:特定のクラスのいわゆる行儀の良いソリューションでは、補題1はタイト(指数の定数因子まで)であり、ポリログ空間を使用したそのようなソリューションは到達できません時間Oの位置N (NNポリログN )。O(NpolylogN)
補題1. 全てについてnが、位置に到達することが可能であるNにN個の空間用いて移動EXP (O (√をnnnlog n))=n O (1 / √ log n)exp(O(logn−−−−√)) = nO(1/logn√)
証明。下の図に示すように、スキームは再帰的です。次の表記法を使用します。
- kは再帰のレベル数ですk
- P (k )は、形成された解( kレベルの再帰)です。P(k)k
- N (k )は、 P (k )(時間 N (k ))が到達する最大位置です。N(k)P(k)N(k)
- S (k )は P (k )によって使用されるスペースです。S(k)P(k)
- L (k )は P (k )によって使用される層の数ですL(k)P(k)以下に示すように、。
図では、時間が上から下に進みます。解P (k )は時間N (k )で停止せず、代わりに(再帰で使用するため)時間2まで継続します。P(k)N(k)N (k )、動きを正確に反転させ、時間 2で単一の小石に戻る2N(k)N (k )。2N(k)
実線の縦線は、P (k )のL (k )層を分割します。図では、L (k )は5であるため、P (k )は5つの層で構成されます。P (k )の各L (k )レイヤー(右端を除く)には、2つのサブ問題があり、1つはレイヤーの上部に、もう1つは下部にあり、実線(小石を表す)で接続されていますその期間)。この図では、5つのレイヤーがあるため、9つのサブ問題があります。一般的に、P (L(k)P(k)L(k)P(k)L(k)P(k)、K )P(k)は2で構成されるL (k )− 1つのサブ問題。P (k )の各部分問題には解 P (k − 1 )があります。2L(k)−1P(k)P(k−1)
空間を区切るための重要な観察は、常に、2つのレイヤーのみが「アクティブな」サブ問題を抱えているということです。残りはそれぞれ1つの小石だけを提供します
- S (K )≤ L (K )+ 2S (k − 1 )、およびS(k)≤L(k)+2S(k−1)
- N (K )= L (K )⋅ N (K - 1 )N(k)=L(k)⋅N(k−1)
今、我々は選択したL (kは)完全に決定するためにP (K )。この選択が最適かどうかはわかりませんが、近いようです:take L (k )= 2 k。その後、上記の繰り返しはL(k)P(k)L(k)=2k
- S (K )≤ K ⋅ 2 K、及びS(k)≤k⋅2k
- N (k )= 2 k (k + 1 )/ 2N(k)=2k(k+1)/2
だから、解決のために、N = N (K )、我々は持っているkは≈n=N(k)√2lognk≈2logn−−−−−√
and S(k)≈√2logn2√2logn=exp(O(√logn))S(k)≈2logn−−−−−√22logn√=exp(O(logn−−−−√)).
This takes care of all positions nn in the set {N(k):k∈{1,2,…}}{N(k):k∈{1,2,…}}. For arbitrary nn, trim the bottom of the solution P(k)P(k) for the smallest kk with N(k)≥nN(k)≥n. The desired bound holds because S(k)/S(k−1)=O(1)S(k)/S(k−1)=O(1). QED
Lemma 2. For any δ>0δ>0, for all nn, it is possible to reach position nn in n1+δn1+δ moves using space O(δ21/δlogn).O(δ21/δlogn).
Proof. Modify the construction from the proof of Lemma 1 to delay starting each subproblem until the previous subproblem has finished, as shown below:
Let T(k)T(k) denote the time for the modified solution P(k)P(k) to finish. Now at each time step, only one layer has a subproblem that contributes more than one pebble, so
- S(k)≤L(k)+S(k−1)S(k)≤L(k)+S(k−1),
- N(k)=L(k)⋅N(k−1)N(k)=L(k)⋅N(k−1),
- T(k)=(2L(k)−1)⋅T(k−1)≤2L(k)⋅T(k−1)≤2kN(k)T(k)=(2L(k)−1)⋅T(k−1)≤2L(k)⋅T(k−1)≤2kN(k).
Choosing L(k)=21/δL(k)=21/δ, we get
- S(k)≤k21/δS(k)≤k21/δ,
- N(k)=2k/δN(k)=2k/δ,
- T(k)≤2kN(k)T(k)≤2kN(k).
Solving for S=S(k)S=S(k) and T=T(k)T=T(k) in terms of n=N(k)n=N(k), we have k=δlognk=δlogn, and
- S≤δ21/δlognS≤δ21/δlogn, and
- T≤n1+δT≤n1+δ.
This takes care of all positions nn in the set {N(k):k∈{1,2,…}}{N(k):k∈{1,2,…}}. For arbitrary nn, trim the bottom of the solution P(k)P(k) for the smallest kk with N(k)≥nN(k)≥n. The desired bound holds because S(k)/S(k−1)=O(1)S(k)/S(k−1)=O(1). QED
The solutions in the proofs of Lemmas 1 and 2 are well-behaved, in that, for sufficiently large nn, for each solution P(n)P(n) that reaches position nn there is a position k≤n/2k≤n/2 such that only one pebble is ever placed at position kk, and the solution decomposes into a (well-behaved) solution P(N−k)P(N−k) for positions k+1,k+2,…,nk+1,k+2,…,n and two (well-behaved) solutions P(k)P(k), each for positions 1,2,…,k1,2,…,k, connected by the pebble at position kk. With an appropriate definition of well-behaved, let V(n)V(n) denote the minimum pebble volume (the sum over time of the number of pebbles at each time) for any well-behaved solution. The definition implies that for sufficiently large nn, for δ=1>0δ=1>0,
V(n)≥mink<nV(n−k)+max(n/2,(1+δ)V(k)).
V(n)≥mink<nV(n−k)+max(n/2,(1+δ)V(k)).
I conjecture that for every sufficiently large nn there is a well-behaved solution that minimizes pebble volume. Maybe somebody can prove it? (Or just that some near-optimal solution satisfies the recurrence...)
Recall that ϵ(n)=1/√lognϵ(n)=1/logn−−−−√.
Lemma 3. For any constant δ>0δ>0, the above recurrence implies V(n)≥n1+Ω(ϵ(n))V(n)≥n1+Ω(ϵ(n)).
Before we sketch the proof of the lemma, note that it implies that any well-behaved solution that reaches position nn in tt steps has to take space at least n1+Ω(ϵ(n))/tn1+Ω(ϵ(n))/t at some step. This yields corollaries such as:
- Lemma 1 is tight up to constant factors in the exponent (for well-behaved solutions).
- No well-behaved solution can reach position nn in npolylognnpolylogn time steps using space polylognpolylogn. (Using here that nΩ(ϵ(n))=exp(Ω(√logn))⊈polylognnΩ(ϵ(n))=exp(Ω(logn−−−−√))⊈polylogn.)
Proof sketch. We show 2V(n)≥f(n)2V(n)≥f(n) where f(n)=n1+cϵ(n)f(n)=n1+cϵ(n) for some sufficiently small constant c.c. We assume WLOG that nn is arbitrarily large, because by taking c>0c>0 small enough, we can ensure 2V(n)≥f(n)2V(n)≥f(n) for any finite set of nn (using here that V(n)≥nV(n)≥n, say).
The lemma will follow inductively from the recurrence as long as, for all sufficiently large nn, we have f(n)≤mink<nf(n−k)+max(n,2f(k))f(n)≤mink<nf(n−k)+max(n,2f(k)), that is, f(n)−f(n−k)≤max(n,(1+δ)f(k))f(n)−f(n−k)≤max(n,(1+δ)f(k)) for k<n.k<n.
Since ff is convex, we have f(n)−f(n−k)≤kf′(n)f(n)−f(n−k)≤kf′(n). So it suffices if kf′(n)≤max(n,(1+δ)f(k)).kf′(n)≤max(n,(1+δ)f(k)).
By a short calculation (using f(n)/n=ec√lognf(n)/n=eclogn√ and f′(n)=(f(n)/n)(1+c/(2√logn)),f′(n)=(f(n)/n)(1+c/(2logn−−−−√)), and using a change of variables x=√logkx=logk−−−−√ and y=√logny=logn−−−−√), this inequality is equivalent to the following:
for all sufficiently large yy and x≤yx≤y, ecy(1+c/(2y))≤max(ey2−x2,(1+δ)ecx)ecy(1+c/(2y))≤max(ey2−x2,(1+δ)ecx). Since 1+z≤ez1+z≤ez, and ez≤1+2z for z≤1, it suffices to show
ecy+c/(2y)≤max(ey2−x2,e2δ+cx), that is,
cy+c/(2y)≤max(y2−x2,2δ+cx).
If y≤x+0.1δ/c, then cy+c/(2y)≤cx+0.2δ (for large y) and we are done, so assume y≥x+0.1δ/c. Then y2−x2≥0.1yδ/c (for large y), so it suffices to show
cy+c/(2y)≤0.1yδ/c.
This holds for sufficiently small
c and large
y. QED