All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Full Set of Calendars (Posted on 2010-09-17) Difficulty: 1 of 5
It's 2010 and you have a full calendar for that year. You decide to keep your calendars until you have a full set from which you can choose one that will work for any given year whatsoever. What will be the final calendar year that will complete your collection?

See The Solution Submitted by Charlie    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 3
In order to find when we will have a full set of calendars, we must look at the day on which the 1st of January falls, and also whether there is a leap year. First, let's build a full set of non-Leap year calendars.

Year --- Starting day
=============
2010 --- Friday
2011 --- Saturday
2013 --- Tuesday
2014 --- Wednesday
2015 --- Thursday
2017 --- Sunday
2018 --- Monday

Now we can represent any non-Leap year with the above 7 calendars. Looking at the leap year cycle, we see that each one begins 5 days (2 + 1 + 1 + 1) after the previous leap year. When we look at the multiples of 5, mod 7:

5 = 5 mod 7
10 = 3 mod 7
15 = 1 mod 7
20 = 6 mod 7
25 = 4 mod 7
30 = 2 mod 7
35 = 0 mod 7

We can see that any sequence of 7 consecutive leap years will give us a full set of starting days. So, to complete our full calendar set:

Year --- Starting Day --- Leap Day
======================
2012 --- Sunday --- Wednesday
2016 --- Friday --- Monday
2020 --- Wednesday --- Saturday
2024 --- Monday --- Thursday
2028 --- Saturday --- Tuesday
2032 --- Thursday --- Sunday
2036 --- Tuesday --- Friday

To build a complete set, we would need the 14 years:
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2024, 2028, 2032, and 2036

With the last year needed being 2036.

  Posted by Justin on 2010-09-17 13:49:09
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (22)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information