![]() |
How many days are there *really* in a year?
Happy New Year everyone! We have entered uncharted territory for GIMPS - two consecutive full calendar years without a prime. Hope we make up for it in 2012!
Because my Roman numeral puzzler was such a thrill last year...let's again start the year off with an interesting(?) problem: We work with the set of dates 1/1 through 12/31 (include 2/29 as this is a leap year). There are 366 distinct dates...or are there? See, I say that 1/1 = 2/2 = 3/3 = 4/4 = ... = 12/12 = 1. Which means that there are at most 355 distinct dates. But I also claim that 1/2 = 2/4 = 3/6 = 4/8 = 5/10 = ... = 12/24. That means we're down to 344 distinct dates. See where I'm going? How many *truly* distinct dates are there in a year? Extra credit: Note that 1/3 = 11/33 = 12/36, where 11/33 = 12/3 and 12/36 = 1/5. Similarly, 1/8 = 12/96 = 1/65 = 2/34 = 3/5. Allowing these extra weird dates, how many distinct dates are there in a year? |
[QUOTE=NBtarheel_33;284408]We work with the set of dates 1/1 through 12/31 (include 2/29 as this is a leap year). There are 366 distinct dates...or are there?
See, I say that 1/1 = 2/2 = 3/3 = 4/4 = ... = 12/12 = 1. Which means that there are at most 355 distinct dates. But I also claim that 1/2 = 2/4 = 3/6 = 4/8 = 5/10 = ... = 12/24. That means we're down to 344 distinct dates. See where I'm going? How many *truly* distinct dates are there in a year?[/QUOTE] I don't see why you are subtracting only 11 each time: 1/1=2/2=3/3=4/4=5/5=6/6=7/7=8/8=9/9=10/10/=11/11=12/12 is 12 dates that are not distinct. 12/6=10/5=8/4=6/3=4/2=2/1 is another 6 that aren't distinct. |
[QUOTE=science_man_88;284410]I don't see why you are subtracting only 11 each time:
1/1=2/2=3/3=4/4=5/5=6/6=7/7=8/8=9/9=10/10/=11/11=12/12 is 12 dates that are not distinct. 12/6=10/5=8/4=6/3=4/2=2/1 is another 6 that aren't distinct.[/QUOTE] using m/d and fractions of form 1/d r=31 maximum allowed in any month: 3*12>31 so 12 goes out with 3 11*3>31 so does 11 10*4>31 so 10 get knocked out at 4 9*4>31 so does 9 8*4>31 so does 8 7*5>31 so that knocks out 7 6*6>31 so that knocks out 6 ... <- able to be figured out from lines above ... ... 2*15>29 ( the maximum in February) |
FWIW, note that this year is a birthday year for the trolls.
[QUOTE]Trolls usually live a very long time and only celebrate birthdays on leap years. Even though their actual birthday might be in September or December, they celebrate it on February 29th.[/QUOTE][URL="http://www.mersenneforum.org/showthread.php?t=10536"][SIZE=1]http://www.mersenneforum.org/showthread.php?t=10536[/SIZE][/URL] |
[QUOTE=NBtarheel_33;284408]Happy New Year everyone! We have entered uncharted territory for GIMPS - two consecutive full calendar years without a prime. Hope we make up for it in 2012!
Because my Roman numeral puzzler was such a thrill last year...let's again start the year off with an interesting(?) problem: We work with the set of dates 1/1 through 12/31 (include 2/29 as this is a leap year). There are 366 distinct dates...or are there? See, I say that 1/1 = 2/2 = 3/3 = 4/4 = ... = 12/12 = 1. Which means that there are at most 355 distinct dates. But I also claim that 1/2 = 2/4 = 3/6 = 4/8 = 5/10 = ... = 12/24. That means we're down to 344 distinct dates. See where I'm going? How many *truly* distinct dates are there in a year? Extra credit: Note that 1/3 = 11/33 = 12/36, where 11/33 = 12/3 and 12/36 = 1/5. Similarly, 1/8 = 12/96 = 1/65 = 2/34 = 3/5. Allowing these extra weird dates, how many distinct dates are there in a year?[/QUOTE] [CODE](20:50)>p=[];for(m=1,12,for(d=1,if((m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12),31,if(m!=2,30,29)),p=concat(p,m/d)));p=vecsort(eval(p),,8);#p [/CODE] closest I'm going to get. |
[SPOILER]232[/SPOILER] using the NBtarheel_33 implied rules that if 12 are "duplicated" it counts as 1.
[SPOILER]175[/SPOILER] using science_man_88 prosed rules (remove all duplicates) |
[QUOTE=petrw1;284418][SPOILER]232[/SPOILER] using the NBtarheel_33 implied rules that if 12 are "duplicated" it counts as 1.
[SPOILER]175[/SPOILER] using science_man_88 prosed rules (remove all duplicates)[/QUOTE] if it counts my code got 232. |
[QUOTE=NBtarheel_33;284408]Extra credit: Note that 1/3 = 11/33 = 12/36, where 11/33 = 12/3 and 12/36 = 1/5. Similarly, 1/8 = 12/96 = 1/65 = 2/34 = 3/5. Allowing these extra weird dates, how many distinct dates are there in a year?[/QUOTE]
Since "extra weird dates" is poorly defined, I've went with my own interpretation. Accordingly: [CODE]? d=[31,29,31,30,31,30,31,31,30,31,30,31]; ? d1=vector(12); ? s=366; for(i=1, 12, d1[i] = s; s -= d[i]); ? d1 [366, 335, 306, 275, 245, 214, 184, 153, 122, 92, 61, 31] ? sum(i=1,12,d1[i]) 2384 ? q=vector(%); ? c=0; for(i=1,12, for(j=1, d1[i], c++; q[c] = i/j)) ? q=vecsort(q,,8); ? #q [B]1564[/B][/CODE] |
Perhaps this is closer to what OP wanted.
[CODE]? d=[31,29,31,30,31,30,31,31,30,31,30,31]; ? q=vector(366*(1+11*6),i,1/1); ? add(m,d)={c++; q[c] = m/d } ? iterate(m,d)={ my(mm=2*m, dd=2*d); while(mm <= 12, reduce(mm, dd); mm += m; dd += d) } ? reduce(mm, dd)={ while(dd > d[mm], add(mm, dd); dd -= d[mm]; mm++; if(mm > 12, mm-=12)) } ? c=0; for(i=1,12, for(j=1, d[i], add(i,j); iterate(i, j))) ? c 1830 ? r=vecsort(q,,8); ? #r [B]784[/B][/CODE] |
[QUOTE=axn;284442]Since "extra weird dates" is poorly defined, I've went with my own interpretation. Accordingly:
[CODE]? d=[31,29,31,30,31,30,31,31,30,31,30,31]; ? d1=vector(12); ? s=366; for(i=1, 12, d1[i] = s; s -= d[i]); ? d1 [366, 335, 306, 275, 245, 214, 184, 153, 122, 92, 61, 31] ? sum(i=1,12,d1[i]) 2384 ? q=vector(%); ? c=0; for(i=1,12, for(j=1, d1[i], c++; q[c] = i/j)) ? q=vecsort(q,,8); ? #q [B]1564[/B][/CODE][/QUOTE] Remember, we're working within a single year. Eventually, everything resolves to a single "correct form" date, e.g. 1/11 = 4/44 = 5/14, or 2/20 = 12/120 = 3/29. So, there will be no more than 366 possible outcomes (and in fact, a lot fewer!) |
"Weird" dates
Let me add some information to help define the "weird" dates.
A "weird" date has a month 1-12 but *any integer* for the day. For instance, my birthday is September 2nd, but that's also August 33rd, or July 64th, or June 94th. It's also May 125th, or January 246th. If you get a date that "wraps around" the calendar, like 12/77, just treat the next month as January again. So 12/77 = 1/46 = 2/15. Keep reducing the day number until it is "correct" for the month that it is paired with. Another example: What is November 359th? Well, 11/359 = 12/329 = 1/298 = 2/267 = 3/238 = 4/207 = 5/177 = 6/146 = 7/116 = 8/85 = 9/54 = 10/24. That is, November 359th is the same as October 24th. Basically, what is happening is that you're working with modular arithmetic, as you would with weird times like 8:75 = 9:15, or 11:136 = 1:16. Believe it or not, I started thinking about weird stuff like this when I was eight or so. I realized that my birthday was August 33rd. I was using modular arithmetic without even knowing it. But now, I can do calendar arithmetic with the best of them. :smile: Remember, that the set of "valid" dates to end up must be in the range 1/1 - 12/31. So your answer for the number of distinct dates will be at most 366. I will reveal the answers in a couple of days (i.e. when I get them calculated! Shame on me!). |
| All times are UTC. The time now is 20:45. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.