Live data from Hacker News

Lewis Carroll – computing the day of the week for any given date (1887)

futilitycloset.com

11–20 of 109 posts

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#12

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

A little pressed with time, but does it handle leap years properly? Since every year divisible by 100 is not a leap year, unless it is also divisible by 400?

(E.g. 1900 is not a leap year but 2000 is)

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#13
post #10

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

I am struggling to understand the advantages over the Lewis Carroll method, which I find very simple and quick. It seems to add quite a lot of complexity.

Really? Colin's method seems pretty simple to memorize and work with. Especially since it's all addition mod 7. Given that the mod operator distributes over addition you can work answers out easily while working with small numbers.

For example, what day of week was September 2, 1945?

    45/4 = 11 (mod 7 = 4)
    45 mod 7 = 3 (easy to work out from 7 times table)
    September = 6
    2
So you've got 4 + 3 (disappears under mod 7) and 6 + 2 mod 7 = 1. So, the second world war ended on a Sunday.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#14
post #10

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

I am struggling to understand the advantages over the Lewis Carroll method, which I find very simple and quick. It seems to add quite a lot of complexity.

I'm struggling to see why you think this is more complex ... the methods seem completely equivalent to me. The Carroll method does:

1: A calculation for the Century-Item ... divide by 4, take overplus from 3, multiply remainder by 2.

2: A calculation for the Year-Item ... Add together the number of dozens, the overplus, and the number of 4’s in the overplus.

3: A calculation for the Month-Item ... alternatively, memorise a table: the required final numbers after division by 7 are January, 0; February, 3; March, 3; April, 6; May, 1; June, 4; July, 6; August 2; September, 5; October, 0; November, 3; and December, 5.

Note that these numbers are exactly those in my table, minus 1.

4: Include the Day-Item.

Then add them all (mod 7) and convert the number to a month.

It's exactly equivalent to what I described, except the Carroll method has additional calculations for the year.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#15

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

> which I have swutch to That's a past participle I've never seent before

Second guessed myself and had to look up whether this was actually a word

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#16

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

> which I have swutch to That's a past participle I've never seent before

I find this all much ado ablaut nothing.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#17

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

A little pressed with time, but does it handle leap years properly? Since every year divisible by 100 is not a leap year, unless it is also divisible by 400? (E.g. 1900 is not a leap year but 2000 is)

There is a small correction needed for January and February in leap years, and I haven't included the corrections for pre-1900. The Carroll method does deal with these issues and I have internalised them, but I find I never use them, so I retain only the simpler version.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#18
post #7

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

I assume by 144 : Jan, Feb, Mar 025 : Apr, May, Jun 036 : Jul, Aug, Sep 146 : Oct, Nov, Dec You mean: Jan = 1, Feb = 4, Mar = 4, etc.

Exactly so.

I remember them in this table because they are squares (except for December), as well as "highlights" ... May=2 and August=3 are two that I have "to hand".

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#20
post #10

Earlier quoted context omitted.

I am struggling to understand the advantages over the Lewis Carroll method, which I find very simple and quick. It seems to add quite a lot of complexity.

I'm struggling to see why you think this is more complex ... the methods seem completely equivalent to me. The Carroll method does: 1: A calculation for the Century-Item ... divide by 4, take overplus from 3, multiply remainder by 2. 2: A calculation for the Year-Item ... Add together the number of dozens, the overplus, and the number of 4’s in the overplus. 3: A calculation for the Month-Item ... alternatively, memo…

Possibly it was in the clarity of his explanation. That makes sense, thank you.
Post reply on HN