Sunday, October 23, 2011

The Doomsday Rule and the Odd+11 Method

the doomsday rule and the odd+11 method:

the doomsday rule is an algorithm or method of calculation to find the day of the week of any given date.

it is noted that 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5 and 7/11, 11/7 all fall on the same day of the week in any year. this is the "doomsday". from knowing which day of the week this is you are able to calculate the day of the week on any given date in the year relatively easily.

what about another year? it is known that with each additional non leap year, the doomsday advances by one day of the week, or two days for a leap year. if the doomsday for the start of the century is known you can calculate the drift by the odd+11 method.

1. look only at the last 2 digits of the year
2. if it is odd, add 11
3. divide by 2
4. if this result is odd, add 11
5. divide this result by 7 and subtract the remainder from 7

the result is the number of days of the week drift from the doomsday for the start of the century.

let us examine some of the number patterns involved in this algorithm. there are four possible types of numbers.

1. those that are divisible by 4 exactly
2. those even but not divisible by 4 exactly
3. those odd but when 11 is added, the result is divisible by 4 exactly
4. those odd but when 11 is added, the result is even but not divisible by 4 exactly

note that for all odd years, the doomsday is the same as 11 years later, after 3 leap years have passed. this is why 11 is added to all odd years.

note that for case 2, even years not divisible by 4 exactly, the doomsday is the same as 22 years later, after 6 leap years have passed, and which is a number divisible by 4 exactly. let us examine the calculation using the example of 14.

14/2 = 7
7 + 11 = 18

which is the same as starting with 36 as the year as

36/2 = 18

and yes

14 + 22 = 36

let us examine case 4, when 11 is added to an odd number and the result is even but not divisible by 4 exactly. we know that the doomsday is the same as 11 years later and also that for an even year not divisible by 4 exactly, the doomsday is the same as 22 years later. therefore, in this case, the doomsday is the same as 33 years later as

11 + 22 = 33

and which gives us a number again divisible by 4 exactly.

let us use the example of 15.

15 + 11 = 26 and 26 + 22 = 48

therefore 15 is the same as 26 which is the same as 48.

we can conclude that all years not divisible by 4 exactly however have an equivalent year that is divisible by 4 exactly. let us examine the years divisible by 4 exactly.

YEAR, YEAR/2, REMAINDER AFTER DIVIDED BY 7, DRIFT

4, 2, 2, 5
8, 4, 4, 3
12, 6, 6, 1
16, 8, 1, 6
20, 10, 3, 4
24, 12, 5, 2
28, 14, 0, 0

etc.

note the drift series

5, 3, 1, 6, 4, 2, 0

is recurring as 28 years, with 7 leap years, is a cycle in the calendar.

we see the algorithm holds.

note it can be stated

7 - (x/2)mod7 = (x + x/4)mod7
for x = 4, 8, 12, 16, 20, 24, 28....

References:

[1] Wikipedia contributors, "Doomsday Rule", Wikipedia, the free encyclopedia
[2] Chamberlain Fong, Michael K. Walters, "Methods for Accelerating Conway's Doomsday Algorithm"
[3] Chamberlain Fong, "What Day Is Doomsday? How to Mentally Calculate the Day of the Week for Any Date", Scientific American, October 18, 2011

CLEARCHARGE

1 comment: