What criteria?
1. Wyoming
2. Delaware
3. Virginia
4. Washington
5. Utah
6. Tennessee
7. Texas
8. Georgia
9. Kansas
10. Ohio
11. Colorado
12. Alaska
13. Michigan
14. Vermont
15. Wisconsin
16. Kentucky
17. Arkansas
18. West Virginia
19. Minnesota
20. California
21. Maine
22. Arizona
23. Nebraska
24. Indiana
25. Iowa
26. Pennsylvania
27. Alabama
28. New York
29. Florida
30. New Mexico
31. Maryland
32. Louisiana
33. Missouri
(Thanks to R.H. Draney for the email that inspired this.)
--
Mark Brader "Oh, I'm a programmer and I'm O.K....
Toronto I work all night and I sleep all day"
m...@vex.net -- Trygve Lode (after Monty Python)
My text in this article is in the public domain.
spoiler space
Each consecutive pair on the list forms the name of a populated place:
Wyoming, Delaware
Delaware, Virginia
Virginia, Washington
Washington, Utah
etc.
(Determined using GNIS data, I presume!)
(There was one additional constraint that he didn't mention -- each
state had to appear at most once on the list.)
--
Mark Brader, Toronto | This is Programming as a True Art Form, where style
m...@vex.net | is more important than correctness... --Pontus Hedman
What is the longest list you can make, if you remove this restriction?
Probably infinite (circular). There should be a rule disallowing infinite
circular lists, but still allowing repetition of pairs. For example, you
should be allowed to list "Ohio, Idaho" twice if there is both an "Idaho,
Florida" and an "Idaho, Arizona".
Bill Smythe
Would extra words make a link invalid, e.g. Kansas City, Missouri?
--
Paul Townsend
I put it down there, and when I went back to it, there it was GONE!
Interchange the alphabetic elements to reply
It's an arbitrary choice, of course, but that is the basis I did it on.
--
Mark Brader | (Monosyllables being forbidden to doctors of philosophy,
Toronto | such truths are called "invariants" in the trade.)
m...@vex.net | -- Jeff Prothero
I think it would be better to disallow repitition of pairs; your
condition seems too lax to be rigorously definable.
--
------------------------
Mark Jeffrey Tilford
til...@ugcs.caltech.edu
This is a sort of puzzle in itself. How about allowing repetition
of pairs, but disallowing repetition of loops? That is, for each
sub-sequence of size > 1 that starts and ends with the same pair,
that sub-sequence must appear in the list at most once. (Overlapping
instances of the same sub-sequence are included in this prohibition.)
> Ben Zimmer's answer is correct. If the time on his posting is
> also correct, the puzzle was solved in 1 hour 45 minutes from
> the time of posting.
>
> (There was one additional constraint that he didn't mention --
> each state had to appear at most once on the list.)
I didn't write a program[1] and didn't restrict my data to just
GNIS, but...
http://www.nwlink.com/~dtilque/WWarticles/StatenameChain.html
--
Dan Tilque
[1] Figured it'd be more fun to work it out by hand.