Loading [MathJax]/jax/output/HTML-CSS/jax.js

Sunday, January 9, 2022

When the ant hits the line, ... that's Amare

Amare the ant is traveling within Triangle ABC, as shown below. Angle A measures 15 degrees, and sides AB and AC both have length 1.

Amare starts at point B and wants to ultimately arrive on side AC. However, the queen of his colony has asked him to make several stops along the way. Specifically, his path must:

Start at point B.

Second, touch a point — any point — on side AC.

Third, touch a point — any point — back on side AB.

Finally, proceed to a point — any point — on side AC (not necessarily the same point he touched earlier).

What is the shortest distance Amare can travel to complete the queen’s desired path?

Amare the evidently male ant knows that that his colony has to travel along the isoceles triagle ABC with smallest angle 15 degrees, but he wants to solve the general problem knowing that almost all queens have the same obscure rules and if he cannot mate with his queen perhaps he can abscond to some other colony to mate with that queen dazzling her with an optimal route, or something, I'm not an myrmecologist. So instead, he will solve the case where the smallest angle is some θ[0,π3).

Amare decides to set up an optimization problem by labeling setting the point A as the origin and B at the point (1,0), thus surmising that C is the point (cosθ,sinθ). He decides to model his first point on the AC side of the triangle by the variable (αcosθ,αsinθ) then the point he visits along the AB side as (β,0) and finally returning to the AC side at (γcosθ,γsinθ) for some 0α,β,γ1. Let d1(α)=α22cosθα+1 be the length of Amare's first transit from AB to AC, let d2(α,β)=α22αβcosθ+β2 be the length of his passage from AC back to AB and d3(β,γ)=β22βγcosθ+γ2 the length of the final leg of his journey. Then Amare's total distance traveled is d(α,β,γ)=d1(α)+d2(α,β)+d3(β,γ)=α22cosθα+1+α22αβcosθ+β2+β22βγcosθ+γ2.

Taking the gradient, Amare gets that d=(αcosθd1(α)+αβcosθd2(α,β)βαcosθd2(α,β)+βγcosθd3(β,γ)γβcosθd3(β,γ)). For the time being, Amare just wants to find when d=0, so he first notices that if this is the case then γ=βcosθ, which in turn means that d3(β,γ)=β22βγcosθ+γ2=βsinθ.

Therefore, if d=0, then γ=βcosθ and plugging back into βd=0, we also have the equation βαcosθd2(α,β)+βγcosθd3(β,γ)=βαcosθd2(α,β)+sinθ=0, or equivalently, β=d2sinθ+αcosθ. Plugging this value of β, back into d2(α,β)2, we get d22=α22α(d2sinθ+αcosθ)cosθ+(d2sinθ+αcosθ)2=α22α2cos2θ+2αd2sinθcosθ+d22sin2θ2αd2sinθcosθ+α2cos2θ=(1cos2θ)α2+d22sin2θ or equivalently d2(α,β)=αtanθ. Plugging this value back into the formula for β, we get β=d2sinθ+αcosθ=α(cosθsinθtanθ)=αcos2θcosθ.

So finally, plugging back into αd=0 we get 0=αcosθd1+αβcosθd2=αcosθd1+ααcos2θcosθcosθαtanθ=αcosθd1+1cos2θtanθ=αcosθd1+sin2θ or equivalently d1=cosθαsin2θ. Plugging this back into d21 we get α22αcosθ+1=cos2θ2αcosθ+α2sin22θ or equivalently cos22θα22cosθcos22θα+cos2θsin22θ=0. Solving the quadratic equation we get α=2cosθcos22θ±4cos2θcos42θ4(cos22θ)(cos2θsin22θ)2cos22θ=cosθ±2cos2θcos2θcos22θcos2θ+sin22θ2cos22θ=cosθ±cos2θ(cos22θ1)+sin22θcos2θ=cosθ±sin22θ(1cos2θ)cos2θ=cosθ±sin2θsinθcos2θ=cosθ±sinθtan2θ=cosθcos2θ±sinθsin2θcos2θ that is either α=cosθcos2θ or α=cos3θcos2θ. Since cosθcos2θ[0,1] for any θ[0,π3), Amare will go with α=cos3θcos2θ whenever θ[0,π6) and in this case, d1=cosθcos3θcos2θsin2θ=sinθcos2θ. Note that when θ[π6,π3) we have α=0 and d1=1.

So if θ[0,π6), then ˆα=cos3θcos2θ,ˆβ=ˆαcos2θcosθ=cos3θcosθˆγ=ˆβcosθ=cos3θ and the shortest distance is ˆd=d(ˆα,ˆβ,ˆγ)=d1+d2+d3==sinθcos2θ+cos3θcos2θtanθ+cos3θcosθsinθ=sinθ(cosθ+cos3θ+cos2θcos3θcosθcos2θ)=sinθ(cosθ+2cos2θcos3θcosθcos2θ)=sinθ(1+2cosθcos3θcos2θ)=sinθ(1+cos4θ+cos2θcos2θ)=sinθ(2cos22θ+cos2θcos2θ)=sinθ(2cos2θ+1)=sinθ(2cos2θ+cos2θ)=sin2θcosθ+sinθcos2θ=sin3θ. In particular, when θ=π12, we get that Amare's shortest path for his home colony's queen is ˆd=sinπ4=22. Whenever θ[π6,π3) then ˆα=ˆβ=ˆγ=0 and ˆd=1.

No comments:

Post a Comment