Another week, another Riddler. The question:
Consider four towns arranged to form the corners of a square, where each side is 10 miles long. You own a road-building company. The state has offered you $28 million to construct a road system linking all four towns in some way, and it costs you $1 million to build one mile of road. Can you turn a profit if you take the job?
Extra credit: How does your business calculus change if there were five towns arranged as a pentagon? Six as a hexagon? Etc.?
After a few napkin drawings I landed on this shape:
Then I set up this series of equations:
Plugging that into Python we get answer of 27.3205 miles of bridges with an x_1 distance of 2.887.
Pretty simple but fun!
Advertisements