This is based on a question I posed in The Nineteenth Byte:
What group of 5 states have the longest total name, under the constraint that you must be able to travel from one state to another in the group, and form a cycle where you return the original start?
For example, California → Oregon → Washington → Idaho → Nevada → California
forms such a loop, and the string CaliforniaOregonWashingtonIdahoNevada
is 37 characters long. Note that this means states must have a land border, so Alaska and Hawaii cannot be included. However, something like Michigan → Indiana → Illinois → Iowa → Wisconsin
would be valid, as each subsequent state in the loop shares a land border with the previous one, even though Michigan is split into two land masses.
Subsequent discussion lead to DLosc and emanresu A finding multiple different loops of 52 characters:
North Carolina -> South Carolina -> Georgia -> Tennessee -> Virginia
West Virginia -> Virginia -> North Carolina -> Tennessee -> Kentucky
Massachusetts -> New Hampshire -> Vermont -> New York -> Connecticut
However, it hasn't yet been shown that this is the maximum possible length. Are you able to find and prove the maximal length?
For further consideration, there are generalisations that are also worth thinking about:
What about for loops of different
n
states? Is there any link betweenn
and the resulting maximum length?How does "doubling back" affect the maximum possible length, where you can include a state more than once in order to reach other states:
e.g.
New York -> New Jersey -> Connecticut -> Massachusetts -> Vermont
is allowed, doubling back through NY to get from NJ to Connecticut SourceThis does increase the maximum length, as we can now get a 57 character solution:
Connecticut -> Rhode Island -> Massachusetts -> New Hampshire -> (MA ->) New York
Found by DLosc
Are there any particular different regions which give interesting answers, using a similar delineation as states? For example, what if we're considering countries of the world instead of US states?