Questa risposta ha due parti, mostrando insieme che il limite corretto è :Θ ( registroN)
- Un limite inferiore di (volte il raggio del primo cerchio).Ω ( logN)
- Un limite superiore corrispondente di .O ( logN)
Limite inferiore di Ω ( logN)
Considera due cerchi unitari che si toccano in un punto . (Vedi sotto; p è a destra, il bug inizia a sinistra.) Alternare tra un cerchio e l'altro. Il bug viaggerà su e giù a zig-zag attraverso la fessura tra i due cerchi, spostandosi principalmente su e giù ma anche procedendo lentamente verso destra. Se ho eseguito correttamente la trigonometria, dopopp passaggi, la distanza dal punto comune sarà Θ ( 1 / √N, e ilN° passo farà sì che il bug di camminareΘ(1/N)Θ ( 1 / N--√)NΘ ( 1 / N) , per una distanza totale di .Θ ( registroN)
Ecco uno schizzo dei calcoli. Considera due passaggi consecutivi eseguiti dal bug. Va da un punto , a b , a c . I punti a e c sono sullo stesso cerchio; il punto b si trova sull'altro cerchio. Diciamo o essere il centro del cerchio che una è in. Considera i tre triangoli seguenti, in ordine decrescente di dimensione:un'Bcun'cBoun'
- Il triangolo isocele (ricorda pA o a pp è il punto comune).
- Il triangolo △ a b p .
- Il piccolo triangolo △ a b c
Questi triangoli sono quasi simili (ad esempio, ridimensionamento del modulo congruente). Più precisamente, per , tutti e tre hanno la seguente proprietà:
il rapporto tra la lunghezza della gamba corta e quella lunga è Θ ( ϵ ) . (Non lo dimostrerò in modo più dettagliato qui, ma nota che ϵ → 0ϵ = | a p |Θ ( ϵ )ϵ → 0
mentre il bug cammina, e perturbando un vertice in ciascun triangolo di una quantità trascurabile, i triangoli possono essere resi simili.)
Le gambe lunghe e p o del primo triangolo hanno lunghezza 1. La gamba corta | a p | ha lunghezza ϵ . Il segmento a p è una gamba lunga del secondo triangolo, quindi la gamba corta del triangolo a b ha lunghezza Θ ( ϵ 2 ) . Il segmento a b è una gamba lunga del terzo triangolo, quindi la gamba corta del triangolo a c ha lunghezza Θ ( ϵ 3 ) . Pertanto, in questi due passaggi che il bug esegue:copo|ap|ϵapabΘ(ϵ2)abacΘ(ϵ3)
- La distanza il bug viaggia è|ab|+|bc| .Θ(ϵ2)
- La distanza dal bug al punto comune diminuisce da ϵ a ϵ - Θ ( ϵ 3 ) .pϵϵ−Θ(ϵ3)
Definire il tempo sia il numero di passi prima ε t ≈ 1 / 2 k . Di (2) sopra, ϵ diminuisce di un fattore costante dopo circa Θ ( 1 / ϵ 2 ) passi, quindi t k + 1 = t k + Θ ( 2 2 k ) = t k + Θ ( 4 k ) . Pertanto, t k = Θ ( 4 ktkϵt≈1/2kϵΘ(1/ϵ2)tk+1=tk+Θ(22k)=tk+Θ(4k)tk=Θ(4k) . Cioè, dopo Θ(4k) steps,
the distance from the bug to the common point p will be about 1/2k.
Changing variables, after N steps,
the distance from the bug to the common point will be ϵ=Θ(1/N−−√).
And, in the Nth step, the bug travels Θ(ϵ2)=Θ(1/N).
So the total distance traveled in the first N steps is Θ(1+1/2+1/3+...+1/N)=Θ(logN).
This is the lower bound.
It extends to proposed Variant 2 (as I understand it), as follows:
Adding the restriction that the bug should move to the nearest point in the intersection of the two most recently placed circles does not help. That is, the Ω(logN) lower bound above still applies. To see why, we will modify the example above by adding a single extraneous circle that allows the bug to meet the restriction while still traveling the same path:
The green and blue circles are the two circles from the example above. The intersection points a and b are the same a and b as in the example above. The red circle is the new "extraneous" circle. The previous sequence alternated between the blue and green circles. The new sequence will be this sequence, but with the red circle added before every circle in the old sequence: red, blue, red, green, red, blue, red, green, red, blue, ...
Suppose the bug is sitting at a after blue is placed. The next circle placed is red. Red contains the bug, so the bug doesn't move. The next circle placed is green. Now the bug moves to b (which is the closest point on the intersection of the green and red circles). By repeating this, the bug travels as before.
Upper bound of O(logN)
I only sketch the proof.
Fix any sequence of circles. We will argue that as N→∞,
the total distance traveled by the bug in the first N steps is O(logN).
Assume without loss of generality that the first circle has radius 1.
Fix an arbitrarily large N. Let p by any point in the intersection of the first N circles.
Note that because of the way the bug moves, in each step that the bug moves it gets closer to p.
First, consider steps where the following ratio is at least 1/logN:
the reduction in the distance to pthe distance traveled in the step.
The total distance traveled in such steps is
O(logN),
because the total distance traveled in such steps
is
O(logN) times the initial distance to
p.
So we only need to bound the total distance traveled in the other steps ---
those in which that ratio is at most
1/logN.
First, we argue something slightly weaker:
that the total distance traveled in such steps
before the circle radius decreases to 1/2 or less is O(logN).
(We show later this is enough to give the bound.)
Consider any such step.
Let a and b, respectively, denote the locations of the bug before and after the step.
Let o denote the center of the current circle.
Let b′ denote the point on the ray pb→ such that |pa|=|pb|:
Consider the following triangles:
- △opb
- △pba
- △abb′
By geometric arguments similar to those in the lower bound,
for some ϵ,
each of these triangles has two long legs and one short leg,
and the ratio (for each triangle) of the short leg length
to the long leg lengths is Θ(ϵ):
|bb′||ab|=Θ(|ab||pa|)=Θ(|pa||bo|)=Θ(ϵ).
This equation and the assumption that |bo|, which is the circle radius,
is in [1/2,1] imply
that |ab|=Θ(|pa|2/|bo|)=Θ(|pa|2),
and then that |bb′|=Θ(|ab||pa|/|bo|)=Θ(|pa|3).
Now we focus on the bug's distance to p.
Call it d before the step, and d′ after the step.
(Note d=|pa|, d′=|pb|, and d−d′=|bb′|.)
In this step, this distance d reduces by |bb′|,
which by the above observations is Ω(d3).
Thus, the number of additional steps required to reduce the distance
by a factor of 2 (to at most d/2) is O(1/d2).
Changing variables, if d=1/2k,
the number of additional steps required to bring the distance below
1/2k+1 is O(4k). Since the sum is geometric,
the total number of steps required to bring the distance below 1/2k is O(1/4k).
Changing variables again,
after n steps, the distance to p will be O(1/n−−√).
Finally, recalling the displayed equation several paragraphs up,
in the nth step, the distance that the bug travels, i.e. |ab|,
is O((the current distance to p)2)=O(1/n). Thus,
the total distance traveled in the first N such steps
while the circle radius is in [1/2,1]
is at most
∑n=1NO(1/n)=O(logN).
By scaling, we conclude that, for any k, the total distance traveled
while the circle radius is in the range [1/2k,1/2k+1]
is O(log(N)/2k).
Summing over k, the total distance traveled is O(logN).
QED