## Wednesday, February 03, 2021

### A Blood Donation Puzzle

In the US you can donate whole blood every eight weeks. Suppose Elvira does exactly that. Will she hit every date of the year? For example, if Elvira gave blood today, will she in some future year give blood on the 4th of July? Can we figure it out without having to rely on a computer simulation or even a calculator?

Let's make the assumptions that the blood center is open every day and that Elvira gives blood exactly every 56 days for eternity.

A year has 365 days which is relatively prime to 56=23*7 since 365 mod 2 =1 and 365 mod 7 = 1. By the Chinese remainder theorem her next 365 blood donations will be on 365 distinct dates. If Elvira started giving blood at age 17, she will have hit every date at age 73.

That was easy but wrong. We have to account for those pesky leap years.

In a four year span, there will be one leap day. The total days in four years (using modular arithmetic) will still be odd and 5 mod 7, so still relatively prime to 56. So Elvira will donate on every day on the calendar exactly four times, except February 29th which she will hit once, over a period 56*4=224 years.

Alas not quite. Years ending 00 are not leap years, unless the year is divisible by 400. 2000 was a leap year but 2100 won't be. Any stretch of 224 years will hit at least one of those 00 non-leap years.

In 400 years, there will be 97 leap years. Since a regular year is 1 mod 7 days and a leap year is 2 mod 7 days, 400 years will be 497 mod 7 days. Since 497=71*7, 400 years has a multiple of 7 days. Every 400 years we have exactly the same calendar. February 3, 2421 is also a Wednesday.

The cycle of blood donations will repeat every 3200 years, the number of years in the least common multiple of 56 and the odd multiple of seven number of days in 400 years. But we can no longer directly apply the Chinese remainder theorem and argue that every day of the year will be hit. In those 3200 years Elvira will have over 20,000 blood donations. If the dates were chosen randomly the expected number to hit all dates would be 2372 by coupon collector. So one would expect Elvira would hit every day, but that's not a proof.

So I had to dust off my Python skills and do the computer simulation after all. No matter what day Elvira starts donating she will eventually hit every date of the year. If Elvira starts donating today, she would give blood on the 4th of July for the first time in 2035 and hit all dates on January 8, 2087 after 431 donations. The longest sequence is 3235 donations starting April 25, 2140 and hitting all dates on February 29, 2636.

1. I like this post! It reminds me of a question I was asked in a University interview at Pembroke College, Oxford to read Maths - gosh - 18 years ago.

The interviewer simply asked me whether all days of the week are evenly distributed as the starting day of the year throughout time.

I tackled the question much the same way you do in the post, by observing that 365 mod 7 = 1 so naively the first day of each year "shifts" by 1 as we progress. Then I worked in leap years which shift the day by 2, and I started to explain that I believed there was some extra rule about years ending in 00 and multiples of 400, so we probably needed to consider those too and it might get a bit complicated. At this point the interviewer stopped me and said "yup, you've got there, we just show that with all those extra rules considered we never get a "short" repetition and there is always a non-zero shift, so what does that tell you about the period of the repetition?" I said "it must be seven, because not matter the shift it will be relatively prime to seven" and he said "yup, great, next question".

I often think about that as a weird situation where I felt like I hadn't really fully solved the question myself and they'd just said "yeah, he gets it, let's move on".

Over time I've thought that the purpose of that question was not to observe my precise and rigorous solution to the problem but just to see how I would REACT to a question that they had deliberately pitched to be unfamiliar territory off the beaten track of the A-level syllabus. By rolling with it and picking out the important features they'd got what they wanted and could go onto the next thing.

I've used that idea in my own interviewing of candidates later in life too.

(Pembroke gave me a backup offer to my first choice college of Queen's but alas I didn't get my A in Further Maths A-level and ended up going to Warwick. Everything worked out, but always a bit sad to tell these stories with the sting that, no, I didn't go to Oxford in the end XD)

1. Because 400 years has a multiple of 7 days, the days of the week are not evenly distributed. January 1 occurs 14.5% of the time on Sundays and only 14% on Mondays.

2. Wow, so it is! 146097 = 20871 * 7

I've reminisced about that experience every now and then for years but never thought to double check that what the interviewer had claimed was actually correct.

Now I wonder if maybe he hadn't realised the rules got more complicated and perhaps THAT was why they hurried onto the next thing ðŸ˜‚

Great spot!

2. "The interviewer simply asked me whether all days of the week are evenly distributed as the starting day of the year throughout time."

Trick question. Throughout time they all go to infinity!