Problems on lcm and gcd.

49 Views Asked by At

Mario has a rest shift every $8$ days; Luigi every $24$ days; Paolo every $16$-th days. Today all three are off. In how many days will all three be back in rest shift for the first time? There are days when Mario and Luigi rest not Paul? And days in which Luigi and Paolo rest but not Mario?

Easy solution: $\text{lcm}(8,24,16)=48$; Yes and no.

In my opinion the solution of the problem $48$ is not correct. There is an important difference: in this problem we talk about days of rest. Let us see in detail for Mario the schedule of his days off. After $8$ days from today rests again; the next round of rest is after $2 \cdot 8 + 1$ days from today, we need to take into account of the fact that he was off one day; in general the $m$-eighth day of rest after today occurs after $m \cdot 8 + (m - 1)$ days from today. Similarly, Luigi has his $n$-th rest day after $n \cdot 24 + (n - 1)$ days after today, and Paul his $p$-esimo after $p \cdot 16 + (p - 1)$ after today. I think that the problem is solvable anyway, but the answer is more complex, at least with the given numbers. If instead of day off there was something else that does not involve skipping the day itself, e.g. " Mario gets pay every $8$ days, Luigi every $24$ days, etc." then everything would be correct.

In this case what is the solution?

1

There are 1 best solutions below

1
On BEST ANSWER

Your version is equivalent to original one with all numbers increased by $1$: having a rest after every $n$ work days is equivalent to having a rest every $n+1$-th day. So, the next day they will all rest will be $\operatorname{lcm}(9,25,17) = 3825$-th (assuming today is day $0$), and as all this numbers are coprime, there will be all possible combinations of people.

I guess it's linguistic and not mathematical question, but I would be surprised if "has a rest shift every 8 days" means "rest, work 8 days, rest" and not "rest, work 7 deys, rest" (but English isn't my native language, so my opinion is not very important here).