Barber Billy has made a separate waiting room for his barber shop. In the haircut room, there is just one barber chair though.
Billy does the following every time he finishes cutting someone's hair:
Clients in his shop behave in the following way:
Could it ever be the case that Billy would be sleeping indefinitely even though a customer is waiting in the waiting room?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I do not often post solutions, so I'm not sure if my logic is correct here, but here it goes:
The outlined tasks seem to cover every possible scenario, except for one. To find it, we must first rationalize to where the hole in the tasks might be.
In order for the barber to be asleep, he must first see no one through the CCTV camera. However, if any sets foot into the shop, they will proceed to the room with the sleeping barber and thus follow the tasks to wake up the barber.
THEREFORE, we are looking for a scenario where there IS a customer already in the shop when the barber sees no one on the CCTV camera. Assuming that the camera provides a full and clear view of the entire waiting room, we must conclude that the customer is in a different room.
The only rooms that any of the tasks allow a customer to be in (unless there is an assumed public restroom that hopefully would not have a surveillance camera) are the waiting room and the barber's haircutting room.
So, if the customer were to check on the status of the barber and see that he is NOT asleep (rather, he is checking his camera), then the customer would proceed to go back to the waiting room to wait.
Unfortunately, the barber would then go to sleep until another customer came, so let's hope this barber gets frequent business!!