MHB What is the Minimum Distance B Must Travel While Maintaining Social Distancing?

  • Thread starter Thread starter MarkFL
  • Start date Start date
MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
Hello everyone! (Wave)

This problem was posted on another site (I am paraphrasing):

A and B are initially 12 feet apart, and they wish to swap positions. A moves directly towards B's initial position without regard for social distancing, while B wishes to maintain a minimum distance of 6 ft. from A. Both move at the same constant speed/. What is the minimum distance B must travel?

I have worked on this for some 5 days now, to no avail. I have filled pages of calculations, all leading to a huge intractable mess. I would be interested in seeing your thoughts on this extremely interesting yet difficult problem. (Whew)
 
Mathematics news on Phys.org
Nice problem that relates directly to our current world wide predicament.
What to do if someone approaches you head on when you really want to maintain the recommended social distance. ;)

I have no actual solution, just some thoughts and a TikZ graph.
I believe B should move the first 6 feet in a straight line at an angle of 60 degrees.
I can prove that is optimal.
Then B should move to stay at exactly 6 feet distance, until they can move straight to the opposite position.
Finally B should of course move in a straight line to the opposite position.

However the corresponding curve of the stay-at-6-feet phase is the solution of a differential equation that does not seem solvable in closed form. The best I think I can do is to solve it numerically.

Just for fun, here's a diagram of the first phase.
I've put B at the origin where they have A incoming.

\begin{tikzpicture}[
scale=1,
>=stealth,
declare function={
angleB(\d) = acos((\d^2+(12-\d)^2-6^2)/(2*\d*(12-\d)));
}
]
\foreach \d in {5,5.5,...,7} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\draw[help lines] (0,0) -- ({acos((\d^2+(12-\d)^2-6^2)/(2*\d*(12-\d)))}:\d);
\fill[help lines] ({angleB(\d)}:\d) circle (.03) node[above left] {\d};
};
\def\d{6}
\begin{scoped}
\draw[red] ({12-\d},0) circle (6) -- ({12-\d-1},0);
\fill[red] (12,0) circle (.06) node[above right] {A};
\fill[red] ({12-\d},0) circle (.06) node[above] {A};
\draw[->, red, ultra thick] ({12},0) -- ({12-1},0);
\draw[->, red, ultra thick] ({12-\d},0) -- ({12-\d-1},0);
\end{scoped}
\begin{scoped}
\draw[blue] (0,0) -- ({angleB(\d)}:\d);
\fill[blue] (0,0) circle (.06) node[above left] {B};
\fill[blue] ({angleB(\d)}:\d) circle (.06) node[below right] {B};
\draw[->, blue, ultra thick] (0,0) -- ({angleB(\d)}:1);
\draw[->, blue, ultra thick] ({angleB(\d)}:\d) -- +({angleB((\d+1))}:1);
\end{scoped}
\end{tikzpicture}

For the record, I think explaining the problem to the person in question works better than evasion.
And shout, put an obstacle in between, and/or show you're angry if it happens too fast or if they are not listening. (Bandit)
 
Klaas van Aarsen said:
Nice problem that relates directly to our current world wide predicament.
What to do if someone approaches you head on when you really want to maintain the recommended social distance. ;)

I have no actual solution, just some thoughts and a TikZ graph.
I believe B should move the first 6 feet in a straight line at an angle of 60 degrees.
I can prove that is optimal.
Then B should move to stay at exactly 6 feet distance, until they can move straight to the opposite position.
Finally B should of course move in a straight line to the opposite position.

However the corresponding curve of the stay-at-6-feet phase is the solution of a differential equation that does not seem solvable in closed form. The best I think I can do is to solve it numerically.

Just for fun, here's a diagram of the first phase.
I've put B at the origin where they have A incoming.

\begin{tikzpicture}[
scale=1,
>=stealth,
declare function={
angleB(\d) = acos((\d^2+(12-\d)^2-6^2)/(2*\d*(12-\d)));
}
]
\foreach \d in {5,5.5,...,7} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\draw[help lines] (0,0) -- ({acos((\d^2+(12-\d)^2-6^2)/(2*\d*(12-\d)))}:\d);
\fill[help lines] ({angleB(\d)}:\d) circle (.03) node[above left] {\d};
};
\def\d{6}
\begin{scoped}
\draw[red] ({12-\d},0) circle (6) -- ({12-\d-1},0);
\fill[red] (12,0) circle (.06) node[above right] {A};
\fill[red] ({12-\d},0) circle (.06) node[above] {A};
\draw[->, red, ultra thick] ({12},0) -- ({12-1},0);
\draw[->, red, ultra thick] ({12-\d},0) -- ({12-\d-1},0);
\end{scoped}
\begin{scoped}
\draw[blue] (0,0) -- ({angleB(\d)}:\d);
\fill[blue] (0,0) circle (.06) node[above left] {B};
\fill[blue] ({angleB(\d)}:\d) circle (.06) node[below right] {B};
\draw[->, blue, ultra thick] (0,0) -- ({angleB(\d)}:1);
\draw[->, blue, ultra thick] ({angleB(\d)}:\d) -- +({angleB((\d+1))}:1);
\end{scoped}
\end{tikzpicture}

For the record, I think explaining the problem to the person in question works better than evasion.
And shout, put an obstacle in between, and/or show you're angry if it happens too fast or if they are not listening. (Bandit)

Hello, Klaas! (Wave)

It sounds like we came to the same conclusion for this problem. Here is my first post on the other site in response to the problem:

I would use coordinate geometry, and put A initially at \((12,0)\) and B at the origin. Without loss of generality we can let their speeds be 1 unit of distance per 1 unit of time.For the first leg of B's path, let's let that path be described parametrically by the line:$$\left\langle \frac{1}{\sqrt{a^2+1}}t,\frac{a}{\sqrt{a^2+1}}t \right\rangle$$A's location is on the line:$$\langle 12-t,0\rangle$$The square of distance \(D\) between A and B is then:$$D^2=\left(\frac{1}{\sqrt{a^2+1}}t-(12-t)\right)^2+\left(\frac{a}{\sqrt{a^2+1}}t\right)^2$$Use of differential calculus reveals that the minimum distance is$$D_{\min}=72\left(1-\frac{1}{\sqrt{a^2+1}}\right)$$We want this to be 36 units, hence:$$72\left(1-\frac{1}{\sqrt{a^2+1}}\right)=36$$And taking the positive root, we obtain:$$a=\sqrt{3}$$This minimum occurs then for:$$6^2=\left(\frac{3}{2}t-12\right)^2+\left(\frac{\sqrt{3}}{2}t\right)^2$$$$48=3(t-8)^2+t^2$$$$t=6$$And so B has traveled 6 units of distance. Here's a live graph of this first leg of the journey:https://www.desmos.com/calculator/gcb6znf6l8Beyond this point, I am thinking B should cannot walk along the moving circumference of A's position without simply being pushed back along a horizontal line. It seems to me B should continue the linear trajectory until reaching the line \(y=6\), or for:$$0\le t\le\frac{12}{\sqrt{3}}$$Then B should travel some distance long this horizontal line until the moment it can begin a linear trajectory towards the final destination being tangent to the moving circle as it was during the first leg of the journey.I will leave you to work with that for now, and revisit this topic later. :)

After some reflection I next posted this:

The more I think about it, the more I have doubt about whether what I posted above is on the right track. Once point B moves beyond the tangent point, it rises above the circle, which means there is some part of the upward component of the velocity function that should be utilized to move the point forward instead. The slope of the trajectory should match that of the moving circle.I'm going to have to ponder this some more...

Some time later I posted this:

I'm still working on this...I have approximated what I think the path up to \(y=6\) should look like here:https://www.desmos.com/calculator/0to8vbwfudI'm continuing to work with some rather difficult differential equations in the meantime.

This is the work I did, but did not post because I don't think it's correct:

We have let A so far move along the \(x\)-axis and B move along the line \(y=\sqrt{3}x\) until both have moved a distance of 6 units.During this next phase of the journey A is at the point:$$(6-t,0)$$And B is at the point:$$(x,y)$$The line normal to B's path can be given by:$$y=-\frac{dx}{dy}(x-(6-t))$$$$\frac{dy}{dx}=\frac{6-t-x}{y}$$Since B moves \(t\) units of distance in that amount of time, we may write:$$t=\int_0^x \sqrt{1+\left(y'(u) \right)^2}\,du$$And so this implies:$$6-x-y\frac{dy}{dx}=\int_0^x \sqrt{1+\left(y'(u) \right)^2}\,du$$Differentiating with respect to \(x\), we obtain:$$-\left(1+\left(\frac{dy}{dx}\right)^2+y\frac{d^2y}{dx^2}\right)=\sqrt{1+\left(\frac{dy}{dx}\right)^2}$$Let:$$u=1+\left(\frac{dy}{dx}\right)^2\implies \frac{du}{dx}=2\frac{dy}{dx}\frac{d^2y}{dx^2}\implies \frac{d^2y}{dx^2}=\frac{1}{2}\frac{du}{dy}$$Now we have:$$-\left(u+\frac{1}{2}y\frac{du}{dy}\right)=\sqrt{u}$$Solving this ODE, we obtain:$$u=\left(\frac{c_1-y}{y}\right)^2$$Recall, we must have:$$\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2=1\implies 1+\left(\frac{dy}{dx}\right)^2=\left(\frac{dt}{dx}\right)^2$$$$\frac{dx}{dt}=\frac{y}{c_1-y}$$$$\left(\frac{dy}{dt}\right)^2=1-\left(\frac{y}{c_1-y}\right)^2=\frac{c_1(c_1-2y)}{(c_1-y)^2}$$$$\frac{dy}{dt}=\frac{\sqrt{c_1(c_1-2y)}}{c_1-y}$$$$\frac{dy}{dx}=\frac{\sqrt{c_1(c_1-2y)}}{y}$$$$\int \frac{y}{\sqrt{c_1(c_1-2y)}}\,dy=\int\,dx$$$$-\frac{1}{3\sqrt{c_1}}(c_1+y)\sqrt{c_1-2y}=x+c_2$$Now to determine the parameters.$$c_1=3(2+\sqrt{3}),\,c_2=-(1+2\sqrt{3})$$Hence:$$-\frac{1}{3\sqrt{3(2+\sqrt{3})}}(3(2+\sqrt{3})+y)\sqrt{3(2+\sqrt{3})-2y}=x-(1+2\sqrt{3})$$

Let's look now at the parametric equations, specifically:$$\frac{dy}{dt}=\frac{\sqrt{c_1(c_1-2y)}}{c_1-y}$$$$\frac{y-2c_1}{3\sqrt{c_1}}\sqrt{c_1-2y}=t+c_2$$Ugh. Okay, for the 2nd leg of the journey, let's try:$$x(t)=6-t+6\cos\left(\frac{2\pi}{3}-f(t)\right)$$$$y(t)=6\sin\left(\frac{2\pi}{3}-f(t)\right)$$Considering speed, we require:$$\left(-1-\sin\left(\frac{2\pi}{3}-f(t)\right)(-f'(t))\right)^2+\left(\cos\left(\frac{2\pi}{3}-f(t)\right)(-f'(t))\right)^2=1$$$$\left(1-\sin\left(\frac{2\pi}{3}-f(t)\right)f'(t))\right)^2+\left(\cos\left(\frac{2\pi}{3}-f(t)\right)f'(t)\right)^2=1$$$$f'(t)=2\sin\left(\frac{2\pi}{3}-f(t)\right)$$$$-\artanh\left(\frac{1}{2}\left(1-\sqrt{3}\tan\left(\frac{f(t)}{2}\right)\right)\right)=t+c_1$$$$f(t)=2\arctan\left(\frac{1+2\tanh(t+c_1)}{\sqrt{3}}\right)$$$$c_1=-\artanh\left(\frac{1}{2}\right)$$$$f(t)=2\arctan\left(\frac{1+2\tanh\left(t-\artanh\left(\frac{1}{2}\right)\right)}{\sqrt{3}}\right)$$

When I tried the resulting parametric equations, it was obvious B was moving far too quickly, and it was at that point I threw in the towel. :)
 
Following up, I came up with this complete path for B with an approximate length of 17.5 feet.

\begin{tikzpicture}[
scale=1,
>=stealth,
declare function={
anglePhi(\t) = 2*atan(exp(2*((\t)-6)/6)/sqrt(3));
}
]
\foreach \d in {0,0.5,...,4.5} {
\fill[blue] ({\d/2},{\d*sqrt(3)/2}) circle (.06);
};
\foreach \d in {5,5.5,...,6} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\fill[blue] ({\d/2},{\d*sqrt(3)/2}) circle (.06);
};
\foreach \d in {6,6.5,...,8} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\draw[blue] ({12-\d-6*cos(anglePhi(\d))},{6*sin(anglePhi(\d))})
-- ({12-(\d+0.5)-6*cos(anglePhi(\d+0.5))},{6*sin(anglePhi(\d+0.5))});
\fill[blue] ({12-\d-6*cos(anglePhi(\d))},{6*sin(anglePhi(\d))}) circle (.06);
};
\def\dtwo{8.5}
\def\dthree{17.5}
\def\x2{12-\dtwo-6*cos(anglePhi(\dtwo))}
\def\y2{6*sin(anglePhi(\dtwo))}
\def\dx2{cos(atan(\y2/(12-\x2))}
\def\dy2{sin(atan(\y2/(12-\x2))}
\draw[blue] ({\x2},{\y2}) -- (12,0);
\foreach \d in {8.5,9,...,9.5} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\fill[blue] ({\x2 + (\d-\dtwo)*\dx2},{\y2 + (\d-\dtwo)*\dy2}) circle (0.06);
};
\foreach \d in {10,10.5,...,17.5} {
\fill[blue] ({\x2 + (\d-\dtwo)*\dx2},{\y2 + (\d-\dtwo)*\dy2}) circle (0.06);
};
\def\d1{6}
\begin{scoped}
\draw[red] ({12-\d1},0) circle (6);
\draw[red] ({12-\dtwo},0) circle (6);
\fill[red] (12,0) circle (.06) node[below right] {A};
\fill[red] ({12-\d1},0) circle (.06) node[above] {\d1};
\fill[red] ({12-\dtwo},0) circle (.06) node[above] {\dtwo};
\fill[red] (0,0) circle (.06) node[above left] {12};
\draw[->, red, ultra thick] ({12},0) -- ({12-1},0);
\end{scoped}
\begin{scoped}
\draw[blue] (0,0) -- (60:\d1);
\fill[blue] (0,0) circle (.06) node[below left] {B};
\fill[blue] (60:\d1) circle (.06) node[above left] {\d1};
\fill[blue] ({12-\dtwo-6*cos(anglePhi(\dtwo))},{6*sin(anglePhi(\dtwo))}) circle (.06) node[above right] {\dtwo};
\fill[blue] (12,0) node[above right] {\dthree};
\draw[->, blue, ultra thick] (0,0) -- (60:1);
\end{scoped}
\end{tikzpicture}

In particular I found that the stay-at-6-feet phase follows the curve
$$\begin{cases}x(t)=12 - vt - 6\cos(\phi(t)) \\ y(t) = 6\sin(\phi(t))\end{cases}$$
with $x(0)=6\cos(60^\circ)$ and $y(0)=6\sin(60^\circ)$, and where $\phi(t)$ is the angle where B is from the perspective of A.
It is given by:
$$\phi(t)=2\arctan\left(\frac 1{\sqrt 3} e^{2vt/6}\right)$$

Sorry, I'm currently too lazy to write down the derivation.
 
Klaas van Aarsen said:
Following up, I came up with this complete path for B with an approximate length of 17.5 feet.

\begin{tikzpicture}[
scale=1,
>=stealth,
declare function={
anglePhi(\t) = 2*atan(exp(2*((\t)-6)/6)/sqrt(3));
}
]
\foreach \d in {0,0.5,...,4.5} {
\fill[blue] ({\d/2},{\d*sqrt(3)/2}) circle (.06);
};
\foreach \d in {5,5.5,...,6} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\fill[blue] ({\d/2},{\d*sqrt(3)/2}) circle (.06);
};
\foreach \d in {6,6.5,...,8} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\draw[blue] ({12-\d-6*cos(anglePhi(\d))},{6*sin(anglePhi(\d))})
-- ({12-(\d+0.5)-6*cos(anglePhi(\d+0.5))},{6*sin(anglePhi(\d+0.5))});
\fill[blue] ({12-\d-6*cos(anglePhi(\d))},{6*sin(anglePhi(\d))}) circle (.06);
};
\def\dtwo{8.5}
\def\dthree{17.5}
\def\x2{12-\dtwo-6*cos(anglePhi(\dtwo))}
\def\y2{6*sin(anglePhi(\dtwo))}
\def\dx2{cos(atan(\y2/(12-\x2))}
\def\dy2{sin(atan(\y2/(12-\x2))}
\draw[blue] ({\x2},{\y2}) -- (12,0);
\foreach \d in {8.5,9,...,9.5} {
\fill[help lines] ({12-\d},0) circle (.03);
\draw[help lines] ({12-\d},0) circle (6);
\fill[blue] ({\x2 + (\d-\dtwo)*\dx2},{\y2 + (\d-\dtwo)*\dy2}) circle (0.06);
};
\foreach \d in {10,10.5,...,17.5} {
\fill[blue] ({\x2 + (\d-\dtwo)*\dx2},{\y2 + (\d-\dtwo)*\dy2}) circle (0.06);
};
\def\d1{6}
\begin{scoped}
\draw[red] ({12-\d1},0) circle (6);
\draw[red] ({12-\dtwo},0) circle (6);
\fill[red] (12,0) circle (.06) node[below right] {A};
\fill[red] ({12-\d1},0) circle (.06) node[above] {\d1};
\fill[red] ({12-\dtwo},0) circle (.06) node[above] {\dtwo};
\fill[red] (0,0) circle (.06) node[above left] {12};
\draw[->, red, ultra thick] ({12},0) -- ({12-1},0);
\end{scoped}
\begin{scoped}
\draw[blue] (0,0) -- (60:\d1);
\fill[blue] (0,0) circle (.06) node[below left] {B};
\fill[blue] (60:\d1) circle (.06) node[above left] {\d1};
\fill[blue] ({12-\dtwo-6*cos(anglePhi(\dtwo))},{6*sin(anglePhi(\dtwo))}) circle (.06) node[above right] {\dtwo};
\fill[blue] (12,0) node[above right] {\dthree};
\draw[->, blue, ultra thick] (0,0) -- (60:1);
\end{scoped}
\end{tikzpicture}

In particular I found that the stay-at-6-feet phase follows the curve
$$\begin{cases}x(t)=12 - vt - 6\cos(\phi(t)) \\ y(t) = 6\sin(\phi(t))\end{cases}$$
with $x(0)=6\cos(60^\circ)$ and $y(0)=6\sin(60^\circ)$, and where $\phi(t)$ is the angle where B is from the perspective of A.
It is given by:
$$\phi(t)=2\arctan\left(\frac 1{\sqrt 3} e^{2vt/6}\right)$$

Sorry, I'm currently too lazy to write down the derivation.

Thank you Klaas! Looks like I slipped somewhere there. I have forwarded your results to the growing list of people I have engaged with this problem. A friend of mine on another site, not a math site, who uses AutoCAD in his work, estimated the "stay at 6 ft" path with 2 inch line segments and got about 17' 5".
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.
Back
Top