"Normal Palindromic" Date CalculationsUK Format only - dd/mm/yyyy
|
|
The approach for evaluating palindromes for the US date
format - mm/dd/yyyy - follows along pretty much the same lines. This is not intended to be a rigorous mathematical proof - it is more a layman's way of understanding what's going on. If you have any comments or disagreements, please contact me. |
As with "triple palindromicty", for the sake of both sanity and brevity, we'll consider only 4 digit years (i.e. from the year 1000 AD to 9999 AD). I think this is reasonable - apart from the fact that in his days Julius C didn't use a 24 hour clock, I'm pretty certain they did not insert a gratuitous zero in front of their 1, 2 and 3 digit years. At the other end of the scale - beyond the year 9999 - who really gives a damn anyway.
It has been suggested by Chris Rogers (Devon, UK) that we should also consider "normal palindromicity" - that is, where the time and date digits occur in the sequence abcdef fedcba. In this case we need to consider just 2 groups of 6 digits each for "normal palindromicity". If we do this, the calculations need to be modified as follows.
As with "triple palindromicity" we can start by defining the two digits of each element:
| H1H2 | Hours |
| Mi1Mi2 | Minutes |
| D1D2 | Day |
| Mo1Mo2 | Month |
| C1C2 | Century |
| Y1Y2 | Years |
Using this notation we can express the time and date as H1H2:Mi1Mi2 D1D2/Mo1Mo2 C1C2Y1Y2
Now we know that each of these elements is subject to certain constraints:-
1) We define normal palindromicity by the 6 relationships:-
| a) | H1 | = | Y2 |
| b) | H2 | = | Y1 |
| c) | Mi1 | = | C2 |
| d) | Mi2 | = | C1 |
| e) | D1 | = | Mo2 |
| f) | D2 | = | Mo1 |
2) Looking at the constraints of each element in turn:-
| a) | The hours (H1H2) must lie between 00 and 23: | H1 = 0, 1 or 2 and H2 = 0...9 and 00 <= H1H2 <= 23 |
| b) | The minutes (Mi1Mi2) must lie between 00 and 59 | Mi1 = 0...5 and Mi2 = 0...9 |
| c) | The days (D1D2) must lie between 01 and 31 (but watch out for 28, 29 and 30 as well) |
D1 = 0, 1, 2, or 3 and D2 = 0...9 and 01 <= D1D2 <= 31 |
| d) | The months (Mo1Mo2) must lie between 01 and 12 | Mo1 = 0 or 1 and Mo2 = 0...9 and 01 <= Mo1Mo2 <= 12 |
| e) | The century (C1C2) must lie between 10 and 99 (we're looking only at the years 1000 to 9999) |
C1 = 1...9 and C2 = 0...9 |
| f) | The years (Y1Y2) are totally unconstrained | Y1 = 0...9 and Y2 = 0...9 |
Table 1 - combining 1a above with 2a and 2f
| H1 = | 0,1,2 |
| Y2 = | 0,1,2,3,4,5,6,7,8,9 |
H1 and Y2 can each be only 1 or 2
Table 2 - combining 1b above with 2a and 2f
| H2 = | 0,1,2,3,4,5,6,7,8,9 |
| Y1 = | 0,1,2,3,4,5,6,7,8,9 |
H2 and Y1 can each be any digit
Table 3 - combining 1c above with 2b and 2e
| Mi1 = | 0,1,2,3,4,5 |
| C2 = | 0,1,2,3,4,5,6,7,8,9 |
Mi1 and C2 can each be in the range 0 to 5
Table 4 - combining 1d above with 2b and 2e
| Mi2 = | 0,1,2,3,4,5,6,7,8,9 |
| C1 = | 1,2,3,4,5,6,7,8,9 |
Mi2 and C1 can each be in the range 1 to 9
Table 5 - combining 1e above with 2c and 2d
| D1 = | 0,1,2,3 |
| Mo2 = | 0,1,2,3,4,5,6,7,8,9 |
D1 and Mo2 can each be in the range 0 to 3
Table 6 - combining 1f above with 2c and 2d
| D2 = | 0,1,2,3,4,5,6,7,8,9 |
| Mo1 = | 0,1 |
D2 and Mo1 can each be 0 or 1
If we combine the above six tables we arrive at the following matrix of possible combinations.
| Element | H1 | H2 | Mi1 | Mi2 | D1 | D2 | Mo1 | Mo2 | C1 | C2 | Y1 | Y2 |
| Possible Digits | 1,2 | 0-9 | 0-5 | 1-9 | 0-3 | 0,1 | 0,1 | 0-3 | 1-9 | 0-5 | 0-9 | 1,2 |
| Number of Possibilities | 2 | 10 | 6 | 9 | 4 | 2 | 2 | 4 | 9 | 6 | 10 | 2 |
At a rough approximation, without allowing for leap years, months with less than 31 days etc. this would appear to suggest that the number of possible "normally palindromic" date/time combinations is in the order of 2 x 10 x 6 x 9 x 4 x 2, which equals 8640. Even allowing for leap years etc. I suspect (I really don't have the time to pursue the matter in any more detail!) that the exact number of possible combinations would run to many hundreds (if not thousands) rather than the mere 4 "triple palindromic" combinations.
The point is, that there are relatively so many of the "normally palindromic" combinations as to make them somewhat less remarkable than the "triple palindromic" ones.
27 December, 2002
(a totally unpalindromic date!)
|