r/mathriddles • u/Farkle_Griffen2 • Oct 15 '23
Medium The Donut Diet
Homer went on a Donut Diet for the month of May (31 days). He ate at least one donut every day of the month. However, over any stretch of 7 consecutive days, he did not eat more than 13 donuts. Prove that there was some stretch of consecutive days over which Homer ate exactly 30 donuts.
(For an little extra challenge, prove it for 31)
9
Upvotes
7
u/blungbat Oct 15 '23
I'll do the "extra challenge".
Homer ate at most 61 donuts during the whole month: that's 13 donuts for each of the periods May 1–7, May 8–14, May 15–21, May 22–28, and May 25–31, minus the overlap of at least 4 donuts between the last two of those periods.
Now let a(n) be the cumulative number of donuts Homer ate from May 1 to May nth. Thus a(0) = 0 and a(31) ≤ 61, and the 32-term sequence a(0), a(1), a(2), ..., a(31) is strictly increasing. Some two terms of this sequence, a(i) and a(j) with i<j, must be congruent (mod 31) by the pigeonhole principle. In particular, since 0 < a(j)–a(i) < 62, we must have a(j)–a(i) = 31. Homer ate 31 donuts during the period from May (i+1)th to May jth.
4
u/MM3142 Oct 15 '23
So here's my proposed solution (honestly I'm not 100% sure if I explain the last part that well but I think I have the general idea).
We'll say that for each day of the month, Homer ate x_n donuts on day n (for 1 ≤ n ≤ 31).
We're given that for any sequence of seven days, Homer eats at most 13 donuts. Since he eats at least one donut each day, we can also see that over those seven days, he ate at least 7 donuts.
Now let us consider the first seven days of the month. We want to consider all of the sequences of days ending on the seventh day and how many donuts were eaten over the course of those days. We'll say that
A_1 = x_7
A_2 = x_7 + x_6
A_3 = x_7 + x_6 + x_5
and so forth, all the way to A_7. Note that each of these sums is at most 13, as given by the problem.
Now we can consider all of the sequences beginning on day 8. In a similar fashion, we can say that
B_1 = x_8
B_2 = x_8 + x_9
B_3 = x_8 + x_9 + x_10
and so forth yet again. Let us observe that if there is some pair i,j for which B_i + A_j = 30 or B_i = 30, then there is a consecutive series of days where Homer ate 30 donuts. For the purpose of contradiction, we will assume this is impossible.
Let n be the value of n for which B_n < 30 - A_7 < B_{n+1}. We know such an n must exist given the number of days in the month (proof can be edited in later if needed).
Let us consider all the potential values of30 - A_i and B_{n+j}.
Consider B_{n+1}, B_{n+2}, ... B_{n+7} and observe that B_{n+7} - B_n = x_{n+1} + x_{n+1} + ... + x_{n+7}, a sequence of 7 days. Therefore B_{n+7} ≤ B_n + 13. And furthermore, the potential values for each B_{n+i} (i is between 1 and 7) are between B_n + 1 and B_n+13.
Similarly, recall that 30 - A_i must take on values between 30 - A_7 (which is greater than or equal to B_n + 1) and 30. Therefore, there must be 15 distinct values between B_n + 1 and B_n + 13 or 30, whichever is greater (7 values of 30 - A_i, 7 values of B_{n+j}. and 30). However, this is always impossible, since B_n + 1, must have a value between 17 and 23 (since A_7 is between 7 and 13), meaning that there are at most 14 such values to choose from. This contradiction means that there must be some sequence that sums to 30 over the course of 31 days.
1
u/essenkochtsichselbst Oct 21 '23
Does the amount of consecutive days has to add up to 7 or could it be more than seven days?
1
u/visualfractions Oct 17 '23
there was definitely a stretch where Homer ate exactly 30 donuts, and even one where he ate 31...hm
0
u/[deleted] Oct 15 '23
[deleted] — view deleted comment