Normally Davide needs to sleep at least 8 hours per night. If on one night he sleeps hours less than he needs, he finds himself needing hours more sleep for the following nights. Every night he sleeps in any case an integer number of hours less than or equal to his requirement. For example, if on Monday night he needs 8 hours, but sleeps only 7, on Tuesday he will need 9 hours. If on Wednesday he needs 8 hours, but sleeps only 6, on Thursday and Friday he will need at least 10 hours of sleep; if on Thursday he sleeps only 9, on Friday he will feel the need for 11 hours (, plus 2 for the hours lost on Wednesday, plus 1 for the one not slept on Thursday).
On a certain Monday night Davide would need to sleep 8 hours; the same occurs on the Monday night of the following week. During the course of the week there were 7 hours in which he would have needed to sleep but did not: what is the minimum number of hours Davide slept in the seven nights from Monday to Sunday?
Solution
Solution:
Davide slept a minimum of 58 hours.
Let us number the days of the week from 1 to 7 and suppose that Davide sleeps hours less than his requirement on Monday, hours on Tuesday, ..., hours on Sunday. We know that .
Since after a week has passed Davide would need to sleep the same number of hours as on the previous Monday, the hours added to his requirement due to the various sleep deficits must all fall within the week; in particular, the sum of the values of his requirement for each of the seven nights can be calculated as . Moreover it must be that , otherwise Davide would need to sleep more than 8 hours the following Monday.
Davide therefore sleeps hours during the course of the week.
Certainly, in order for and for to be 0, there must be a day (with different from 7) on which Davide sleeps at least 2 hours less than needed . Note that setting, for example, and gives a total of hours over the course of the week.
We show that it is not possible for Davide to sleep less than 58 hours: if there is a day for which , Davide will sleep strictly more than hours; we may therefore assume that for , . If Davide had a deficit of 2 hours more than once during the course of the week, again he would have to sleep more than hours.
Thus the configuration in which he has a single deficit of 2 hours and 5 deficits of one hour is indeed minimal.
We have thus shown that on one hand Davide cannot sleep fewer than 58 hours, and on the other hand a configuration like the one described (for example: 6 hours of sleep on Monday, 9 on Tuesday, 10 on Wednesday, 8 from Thursday to Saturday and 9 on Sunday) accounts for exactly 58.