## Look Like a Genius

Calculating the day of the week for historical date is impressive, but it isn’t as hard as it seems. Several methods have been shown to work and be performable by average humans. This is an improvement to one of the simplest methods.

## The Doomsday Rule

Paraphrased from wikipedia:

The Doomsday rule or Doomsday algorithm is a relatively simple way to calculate the day of the week of a given date. It was devised by John Conway, drawing inspiration from Lewis Carroll’s work on a perpetual calendar algorithm. The algorithm takes advantage of the fact that several easy-to-remember dates fall on the same day each year; for example, 4/4, 6/6, 8/8, 10/10, 12/12, and the last day of February are all the same day of the week.

Conway’s original algorithm required dividing by 12 and 4, and remembering several intermediate values. It’s achievable, but not simple.

## Odd+11

The Odd+11 rule simplifies the math, requiring nothing more than knowing if a number is odd, and adding 11.

## The Difficulty

The Doomsday Rule and the Odd+11 update both start with the actual day of the week. From the Wikipedia article:

Suppose that you want to find the day of week that the September 11, 2001 attacks on the World Trade Center occurred. The century anchor was Tuesday, and Doomsday for 2001 is one day beyond, which is Wednesday. September 5 was a Doomsday, and September 11, six days later, fell on a Tuesday.

Having converted to the day of the week, adding numbers to it can be tough — what day of the week is 11 days after a Friday? Further, the methods require remembering the century day while doing the year calculation (per the Wikipedia article), or remembering the century while doing the year calculation and then evaluating the actual day of the week — the doomsday — from both.

Finally, to find the desired date, work theough the weeks mentally (perhaps backwards). This can be simplified by memorizing additional doomsdays. Conway’s mnemonics are very useful, but they only cover one date per month.

## The Modification

Instead of starting with a day of the week for the century, this method delays conversion to the day of the week until the last step. Before that, everything is simply in terms of numbers. This avoids having to do week-based calculations, memorizing additional doomsdays, or remembering multiple intermediate steps.

Two variants of the algorithm are given. The first works in the same order as the Conway algorithm, starting from the year and century and then adding in the month and finally subtracting the day. The second algorithm starts with the month, then subtracts the day, then adds in the century and year. This allows the user to process the information in the order that it is ordinarily given: March 23rd, 1974 (a Saturday) — although the algorithm has a few more steps.

## Century First

Here is an example for January 18, 1936:

- 1900s: start with 8
- Add the year: 8 + 36 = 44
- 44 is even so don’t add 11
- 44/2 = 22
- 22 is even so don’t add 11
- Add the month “doomsday” number for January: 22 + 3 = 25
- It’s January in a leap year, so 25 + 1 = 26
- Subtract the day: 26 – 18 = 8
- Take the 7s complement — this is the number of days until the next multiple of 7, which is probably the easiest way to produce it. Technically it is: (7 – 8 mod 7) mod 7 = 6
- Convert to a day of the week starting from Sunday = 0, so 6 = Saturday.

Here is a flowchart:

## Month First

Here is an example for September 16th, 2065:

- Start with the month number (the “doomsday” date for the month): September = 5
- Subtract the day. 16 > 5, so first add a multiple of 7: 5 + 14 = 19, 19 – 16 = 3
- It’s not January or February in a leap year, so don’t add 1
- 3 is odd, so: 3 + 7 = 10
- 10 * 2 = 20
- Add the century number for 2000s: 20 + 24 = 44
- Add the year: 44 + 65 = 109
- 109 is odd, so: 109 + 11 = 120
- 120/2 = 60
- 60 is even, so don’t add 11
- Take the 7s complement — this is the number of days until the next multiple of 7, which is probably the easiest way to produce it. Technically it is: (7 – 60 mod 7) mod 7 = 3
- Convert to a day of the week starting from Sunday = 0, so 3 = Wednesday.

Here is a flowchart:

Traviscool explanation and flowcharts!!

mathtuition88Reblogged this on Singapore Maths Tuition.