I think the intended answer is
$1.0$ and met at exactly ${(0.5,0.5)}$
but the actual answer according to my code is
$0.9999994$, probably the difference is the small error since my methodology is not pure math.
I have written a code which represents the integration of their movement which takes like 10 mins programming and thinking in total instead of pure math and it is a bit more fun :)
The algorithm was simple, each dog moves $0.00000001$ unit distance to their destination in a coordinate system in an order. When the distance between dogs becomes less than $0.00000001$, I just add the actual distance between dogs and find the answer. So when this value goes to 0, the answer becomes $1$ as it is intended in a math method.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _4dogsrun
{
class Program
{
static double Hypo (double x, double y, double z, double t)
{ double hypo;
hypo = Math.Sqrt(Math.Pow((t - y), 2) + Math.Pow((z - x), 2));
return (hypo);
}
static double[,] d = new double[4, 2] { { 0, 0}, { 0, 10000000 }, { 10000000, 10000000 }, { 10000000, 0 } };
static void Main(string[] args)
{
bool theymet = false;
double distance = 0;
do
{
for (int i = 3; i >= 0; i--)
{
if (Hypo(d[i, 0], d[i, 1], d[(i + 1) % 4, 0], d[(i + 1) % 4, 1]) > 1)
{
d[i, 0] = d[i, 0] + (d[(i + 1) % 4, 0] - d[i, 0]) / (Hypo(d[i, 0], d[i, 1], d[(i + 1) % 4, 0], d[(i + 1) % 4, 1]));
d[i, 1] = d[i, 1] + (d[(i + 1) % 4, 1] - d[i, 1]) / (Hypo(d[i, 0], d[i, 1], d[(i + 1) % 4, 0], d[(i + 1) % 4, 1]));
if (i==3)
{
distance = distance + 1;
}
}
else
{
distance = distance+Hypo(d[i, 0], d[i, 1], d[(i + 1) % 4, 0], d[(i + 1) % 4, 1]);
theymet = true;
break;
}
}
}
while (theymet==false);
Console.WriteLine(distance);
Console.ReadLine();
}
}
}
Lastly, you can modify the code to find the answer with more dogs and more dimensions easily!