This puzzle is a variant of the Doctor's Dilemma.
There are two patients in a hospital (let's call them A and B), both of them need an operation by two different doctors (let's call them X and Y) -- so four different operations in total. However, just before the first operation, it is discovered that the hospital has only two surgeon gloves. Only one glove is needed for each operation.
Just like in the original puzzle, any of the surgeons may be infected with a rare flu, and the two patients may be affected as well. The virus that causes the flu transfers readily from flesh to flesh, or from flesh to any object which in turn can contaminate any flesh or object it touches. People avoid touching one another, or touching objects that may be contaminated. In particular, one can catch the flu:
- if they wear a glove that has been previously used by another person.
- if they are touched by (the exterior of) a glove that has been previously used to operate another person.
- if they take a glove that has been previously used to operate another person, turn it inside-out and then wear it.
How can all the four operations can be performed using only two gloves and without the risk of anyone catching the flu from one another? For the sake of simplicity ignore the risk of contamination while preparing the gloves (put them on hands of doctors and turn them inside-out).
Just like the original puzzle, a vulgar version of this puzzle exists, involving rot13(pbaqbzf naq univat crargengvir frk).