Can you solve this pier puzzle?

Dead wrong.
The example used towns implying people are involved. If that
means government, you need to use "public choice analysis" which
brings into play the self-interest of politicians which is dominated first of
all by what it takes to gain more political power. That result will probably
put a straighter path to the shore from the city of the more deviously clever
politicians. And more importantly ONLY ONE pier and ONLY ONE road to it.

If the society has evolved to be market based, entrepreneurs
will spontaneously emerge to create more than one pier and more than one toll
road. Those who profit the most will be the ones that serve the higher need of
those that vote with their money, again and again. What will the pier and road
look like? Impossible to say and that’s the most important lesson. Where, when
and the details of piers and roads should be a matter of discovery. Historically
non-government decision-making creates a society where the poorest live like
kings of old. Societies that hire experts as Physics Girl would do, can only
implement their change by centralized planning which means many people must be
forced and discovered creativity is discouraged.