An official website of the United States government
Here's how you know
A .gov website belongs to an official government organization in the United States.
A lock (lock ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

News | July 18, 2017

July 2017 Puzzle Periodical - Weekend Volunteering

By Chris B. ("cgb"), NSA Capability Development Analyst

Solve this puzzle to see if there are any years where Ed will have at least one day of every weekend free.

Problem:

Ed has been volunteering at the food pantry the 4th Sunday of every month, and recently signed up to volunteer at the animal shelter the 3rd Saturday of every month. Now he realizes in October 2017 both commitments will occur in the same weekend. Are there any years where Ed has at least one day of every weekend free?

Click to see the answer!

Solution:

 

No. Every calendar year has at least one month where the 3rd Saturday is the same weekend as the 4th Sunday.

The 3rd Saturday is the same weekend as the 4th Sunday if, and only if, the first of that month is a Sunday. So the original question is equivalent to "Does any calendar year have no month where the first is a Sunday?" But as we will see, in a given calendar year every Day of the Week (DOW) is the first of one or more months.

The science of finding the DOW some number of days from now is familiar to us all. We simply subtract multiples of 7 until we get a remainder less than 7. That is the only math we will need.

January is 31 days long, so whatever DOW New Year's Day is, February 1's DOW is 3 days later, e.g. if New Year's Day is Friday, February 1st is Monday. More generally, if New Year's Day is DOW "X," February 1 is DOW "X+3." For a non-Leap Year:

Non-Leap Year
Month Number of Days Days Less Multiple of 7 DOW
January 1 31 3 X
February 1 28 0 X+3
March 1 31 3 X+3
April 1 30 2 X+6
May 1 31 3 X+1
June 1 30 2 X+4
July 1 31 3 X+6
August 1 31 3 X+2
September 1 30 2 X+5
October 1 31 3 X
November 1 30 2 X+3
December 1 31 3 X+5

By September of a non-Leap Year, each DOW has been the first of some month, i.e. X, X+1, X+2, X+3, X+4, X+5, X+6 have all been the first of some month.

For a Leap Year:

Leap Year
Month Number of Days Days Less Multiple of 7 DOW
January 1 31 3 X
February 1 29 1 X+3
March 1 31 3 X+4
April 1 30 2 X
May 1 31 3 X+2
June 1 30 2 X+5
July 1 31 3 X
August 1 31 3 X+3
September 1 30 2 X+6
October 1 31 3 X+1
November 1 30 2 X+4
December 1 31 3 X+6

 

By October of a Leap Year, each DOW has been the first of some month.

So for any year, Sunday will be the first of some month and hence that month Ed's volunteer commitments will both occur in the same weekend.