Machine/Person A: Works for 20 hours and take break for 4 hours (repeated cycle) Machine/Person B: Works for 40 hours and take break for 8 hours (repeated cycle)
In X amount of hours ( say x is 24*7= a week ) starting at same time how many days do both machines/person are at break at the same time?
Currently I'm solving them by trying out all option but would like to know if there is a faster way to do them. I'm suspecting that you need to find the least common multiple of some sort.
Any help is appreciated
Both workers start a new cycle after $48$ hours. During each $48$ hour cycle worker $A$ is at break between hours $20$ and $24$ and $44$ and $48$. On the other hand worker $B$ is on break between hours $40$ and $48$.
We conclude that in every $48$ hour cycle workers $A$ and $B$ rest simultaneously during four hours, they are between hours $44$ and $48$.
When we are given $X$ write $X$ as $48q+r$ with $r<48$. Then the number of hours they rested together is equal to $4q$ plus the maximum between $0$ and $r-44$.
Example: let $X=137$. Then $X=48\cdot2+41$ and so the number of hours is $2\cdot 4=8$ plus the maximum between zero and $41-44=-3$. So they where simultaneously on break during $8$ hours.
If $X=143$ then $X=48\cdot 2+47$ and so the number of hours is $2\cdot4=8$ plus the maximum between $0$ and $47-44=3$. So they where simultaneously on break during $11$ hours.