Isaac Asimov's Science Fiction Magazine, spring 1977

I found the following puzzle by Martin Gardner in an archived copy of Isaac Asimov's Science Fiction Magazine. I've heard it before, but in a more vulgar setting, involving condoms instead of gloves. I think mr. Gardner knew this version too, hence the gender and the name of the patient.

The first earth colony on Mars has been swept by an epidemic of Barsoomian flu. The cause: a native Martian virus not yet isolated.

There is no way to identify a newly infected person until the symptoms appear weeks later. The flu is highly contagious, but only by direct contact. The virus transfers readily from flesh to flesh, or from flesh to any object which in turn can contaminate any flesh it touches. Residents are going to extreme lengths to avoid touching one another, or touching objects that may be contaminated.

Ms. Hooker, director of the colony, has been seriously injured in a rocket accident.
Three immediate operations are required. The first will be performed by Dr. Xenophon, the second by Dr. Ypsilanti, the third by Dr. Zeno. Any of the surgeons may be infected with Barsoomian flu. Ms. Hooker, too, may have caught the disease.

Just before the first operation it is discovered that the colony's hospital has only two pairs of sterile surgeon's gloves. No others are obtainable and there is no time for resterilizing. Each surgeon must operate with both hands.

"I don't see how we can avoid the risk of one of us becoming infected," says Dr. Xenophon to Dr. Zeno. "When I operate, my hands may contaminate the insides of my gloves. Ms. Hooker's body may contaminate the outsides. The same thing will happen to the gloves worn by Dr. Ypsilanti. When it's your turn, you'll have to wear gloves that could be contaminated on both sides."

"Au contraire," says Dr. Zeno, who had taken a course in topology when he was a young medical student in Paris. "There's a simple procedure that will eliminate all risk of any of us catching the flu from one another or from Ms. Hooker."

What does Dr. Zeno have in mind?

  • $\begingroup$ The answer ought to be boil the gloves between each use. $\endgroup$
    – Joshua
    Dec 6, 2016 at 20:06
  • $\begingroup$ +1 for Ypsilanti reference! $\endgroup$
    – Jiminion
    Apr 1, 2020 at 17:27

4 Answers 4


Let 1A stand for the insides of the first pair of gloves, 1B for the outsides. Let 2A stand for the insides of the second pair, 2B for the outsides.


Dr. Xenophon wears both pairs, the second on top of the first. Sides 1A and 2B may become contaminated. Sides 1B and 2A remain sterile. Dr. Ypsilanti wears the second pair, with sterile sides 2A touching his hands. Dr. Zeno turns the first pair inside out before putting them on. Sterile sides 1B will then be touching his hands.


After Dr. Zeno finished operating, his nurse, Ms. Frisbie, was furious. "You boneheads ought to be ashamed! You protected yourselves, but forgot about poor Ms. Hooker. If Dr. Xenophon has the flu, Mrs. Hooker could catch it from the gloves you and Dr. Ypsilanti wore."

"Are you suggesting, Ms. Frisbie," asked Dr. Zeno, "that we could have prevented that?"

"That's exactly what I'm suggesting."

Then, to Dr. Zeno's amazement, Ms. Frisbie explained how they could have followed another procedure that would have eliminated not only the possibility of the surgeons catching the Barsoomian flu from one another or from Ms. Hooker, but also the possibility of Ms. Hooker catching it from the surgeons.


Dr. Xenophon wears both pairs of gloves. Sides 1A and 2B may become contaminated, while 1B and 2A remain sterile.

Dr. Ypsilanti wears the second pair, with sterile sides 2A against his hands.

Dr. Zeno turns the first pair inside out and then puts them on with sterile sides 1B against his hands. Then he puts on the second pair, with sides 2A over sides 1A and sides 2B outermost.

Because only sides 2B touch Ms. Hooker in all three operations, she runs no risk of catching the Barsoomian flu from any of the surgeons.

  • $\begingroup$ I think the second solution makes more sense if the 1st and 2nd doctors are the ones wearing two pairs of gloves, rather than the 1st and 3rd. But the end result is the same. $\endgroup$
    – Bobson
    Jun 23, 2014 at 17:50
  • 5
    $\begingroup$ @Bobson The end result is the same only if infection cannot be transferred from one pair of gloves to the other pair of gloves. I think the version where the second doctor wears only one pair makes more sense, because it is safe even if the infection can be transferred between gloves. $\endgroup$
    – kasperd
    Jun 23, 2014 at 18:18
  • $\begingroup$ @kasperd - Hmm. That is a valid point. $\endgroup$
    – Bobson
    Jun 23, 2014 at 18:20
  • 7
    $\begingroup$ Additional interesting question to consider is who and how should prepare the gloves (put them on hands of doctors and turn them inside-out). $\endgroup$
    – klm123
    Jun 23, 2014 at 18:29
  • $\begingroup$ @Bobson, No, because that would contaminate 2A with 1A (which is already contaminated by the 1st doctor wearing them). With the proposed solution, the sides of the gloves stay clean until used by the person they're 'assigned' to: Ms. H: 2B, Dr. X: 1A, Dr. Y: 2A, Dr. Z: 1B. $\endgroup$
    – SQB
    Jun 24, 2014 at 6:23

There is a big difference between a condom and a pair of sugical gloves. Anyone who has tried to use the one for the purpose of the other would agree. But the difference we are concerned with is that gloves are used in pairs while the others are used one at a time. You can transfer gloves from one hand to the other, which you cannot do with the other product. Therefore there is a simple solution to the doctor's dilemma problem that the other problem doesn't allow.

This is probably why the vulgar version of the problem sticks around, it is because they are not equivalent, the vulgar version is actually a much harder problem to solve.

Here is a better solution for the doctor's dilemma. It doesn't render the gloves useless afterwards. Instead, you can repeat all operations again and again in any order you like.

Here is how: There are 4 gloves. I’ll label each glove with 2 letters identifying who is allowed to touch each side of the glove. There is uppercase and lowercase to help identify the surfaces. The labels are as follows: Hx Xy Yz Zh. You'll need sometimes to return some glove inside out. Hx and xH are the same glove, but reversed.

The operation program is as follows:

Dr. X operates:
left hand: Xy Yz Zh
right hand: xH

Dr. Y operates:
left hand: Yz Zh
right hand: yX xH

Dr. Z operates:
left hand: Zh
right hand: zY yX xH

As you can see, no surface gets contaminated directly or indirectly by 2 different people. Therefore, all operations can be repeated indefinitely in any order.

... and they operated happily ever after.

  • $\begingroup$ I love how this answer is to a more difficult question than the one that is asked. Can I ask why the vulgar version is more difficult? The first user doubles up, the second user uses the outer layer, and the third user doubles up, but inverts the first user's inner layer. That sounds a lot like SQB's answer to me. $\endgroup$
    – blakeoft
    Jan 16, 2015 at 16:48
  • 1
    $\begingroup$ The difference is that the gloves answer can be extended to N doctors and M patients and the procedure can be repeated with the same gloves. $\endgroup$
    – Florian F
    Jan 17, 2015 at 11:29

Additional interesting question to consider is who and how should prepare the gloves and move them between doctors.

Basing on answer of SQB I give the answer that takes into account this problem:

Let 1A stand for the insides of the first pair of gloves, 1B for the outsides. Let 2A stand for the insides of the second pair, 2B for the outsides.

0. There are 4 persons and 4 sides of gloves, therefore each person must contaminate exactly one side. Unfortunately, the operation must be split into 3 separate operations, because Ms. Hooker is the only one who can help to move 2-nd pair of gloves between doctors.

1. Dr. Xenophon wears 1-st pair of gloves side A in. He asks Ms. Hooker to take 2-nd pair and touching side 2B only put them on 1-st gloves.
Side 1A may become contaminated by Dr. Xenophon.
Side 2B may become contaminated by Ms. Hooker.

2. Ones Dr. Xenophon is finished he wakes the patient. Ms. Hooker takes 2-nd pair out from Dr. Xenophon hands and puts them on Dr. Ypsilanti.
Side 2A may become contaminated by Dr. Ypsilanti.

3. Ones Dr. Ypsilanti is finished he wakes the patient. Ms. Hooker takes 2-nd pair out from Dr. Ypsilanti hands. Dr. Zeno takes 1-st pair out from Dr. Xenophon hands touching side 1B only, and (with help of Dr. Xenophon) turns them inside out and puts them on. Ms. Hooker takes 2-nd pair and puts them on Dr. Zeno.
Side 1B may become contaminated by Dr. Zeno. But the operations are finished successfully! No one must touch more than one side and the Barsoomian flu will not be spread.

P.S. I believe with the mentioned gloves movement problem, this algorithm becomes the only possible answer to the problem. One can switch doctors and gloves since they are equal, but the idea (1 side per person + first doctor put two pairs on) must stay the same.

  • 3
    $\begingroup$ Of course, if you're talking about waking a patient out of anesthesia in between operations to a sufficient degree to assist with transferal of gloves from one person to another, aren't we getting to the point where 'resterilizing' becomes practical again? $\endgroup$ Aug 19, 2014 at 16:27

2 pairs is enough, because between them we already have 4 separate surfaces needed by 4 different people (3 doctors + 1 patient). Those are first pair's outside, first pair's inside, second pair's outside and second pair's inside, and each will be used by / on the patient (3 times), Dr Y (once in second round), Dr Z (once in third round) and Dr X (once in first round) respectively.

If we denote the surfaces as 1T, 1N, 2T and 2N accordingly (numbering the pairs, N for iN and T for ouT), I can show the contact made between them. Additionally, we use C for Contaminated and S for Safe.

First round :
Dr X's hand --> 2N / 2T(S) --> 1N(S) / 1T --> patient

Second round :
Dr Y's hand --> 1N / 1T(C) --> patient

Third round :
Dr Z's hand --> 2T / 2N(C) --> 1N(C) / 1T(C) --> patient

  • $\begingroup$ This appears to be the same as previous answers? Is there a way this answer adds significant new value to what is already here? $\endgroup$
    – bobble
    Jun 4, 2021 at 1:47
  • $\begingroup$ I don't know, I didn't read other answers first. I don't mind a deletion. $\endgroup$ Jun 4, 2021 at 1:52
  • 3
    $\begingroup$ Please always read the other answers before posting, even if after solving the puzzle (to avoid spoiling yourself) $\endgroup$
    – bobble
    Jun 4, 2021 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.