Monday, March 25, 2013

Connect The Towns



Courtesy of singingbanana for the problem.






Imagine you work for a construction company, you are asked to find the best way to connect these towns that will optimize the building materials.(building materials -> materials required to build roads i.e cement, concrete, sand etc ) For convenience of calculation, the towns can be considered as being the four corners of a unit square.


How would you connect these four towns?


Give it a try!


One naive way to connect is as follows which has a total length of 4 units.


Can we do better?











SPOILER!!


A slightly better way is as follows with total length of 3 units.




any better way?



We can do even better than that with above. The above construction has total length of 2.82.


Turns out there is even a better approach than that. I confess i had to look up the solution for this one. This might not seem very intuitive but the best solution is as follows:


The angle between the lines is 120 degrees.


What's the reasoning behind such strange shape?


In order to better understand it. Lets consider the best way to connect three towns of unit length shown as corners of an equilateral triangle. The solution is as follows:



Forgive me for the length of one of the lines not being long enough but it carries the point.

So, the solution for 4 towns is basically hidden in the unit square as the combination of solutions of triangles whose bases are two opposite sides of the triangle.




Start by making an equilateral triangle with unit length sides with its base as one of the sides of the unit length square. Make another similar triangle with base as the opposite side of the unit square. Then, draw the solutions of these two triangles. Then finally connect these two minimal solutions. You can better see the solution if you rotate the above picture 90 degrees clock or counter clockwise direction. That's my reasoning.






No comments:

Post a Comment