in reply to Symmetrical Date Golf

Ryan-

I got a chain letter two weeks back that claimed that 20:02 20/02 2002 was a miraculous phenomenon that has only happened once before and won't ever happen again... not sure whether they meant simply the date being a palindrome or, more likely, the fact that the date can be split by whitespace in 3 identical palindromes. Well, I didn't believe it, so i wrote this script:

http://www.parseerror.com/perl/date_palindrome.pl
http://www.parseerror.com/perl/date_palindrome.txt (in case your browser doesn't like .pl files)

Which finds a total of 1164 palindromes between 1001-3003 AD. Of these, 4 turn out to be the "three identical palindromes"...

10:01 10/01 1001
11:11 11/11 1111
20:02 20/02 2002
21:12 21/12 2112

Anywho, all my results are included in the file and the source code is alot shorter and simpler than what you have, though it does take a while for the script to chug through all the dates from 1001-3003 AD.

Hope someone finds this interesting... i figured i could do it with a one-liner, but was suprirsed to find out how complex this actual problem was.

ryan aka pizza_milkshake

Replies are listed 'Best First'.
Re: Re: Symmetrical Date Golf
by ryan (Pilgrim) on Mar 01, 2002 at 04:48 UTC
    Yes, I got that email too. It wrongly claimed that this event would NEVER happen again, when infact 21:12 21/12 2112 will occur in the future ... maybe not in our lifetime though :)

    It also did not explicitely specify that each component had to be symmetrical, that was at best only implied ... hence our broader interpretation of the problem.

    Thanks for the linkage.