Sunday 17 May 2020

A puzzle about disease transmission

I heard this puzzle over 30 years ago when it was circling in North American Computer Science academic circles. The current pandemic and how to stem its spread reminded me of the puzzle. It concerns three sailors, one prostitute and two condoms. Stop reading now if you find that scenario too unsavoury.

The four characters have agreed that each sailor will have intercourse with the prostitute and the problem is to do this safely with only the two condoms at their disposal. What does "safely" mean here? Certainly they wish to guard against the sexual acts resulting in conception but they are all aware that, given the company they have been keeping, one or more of them may have one or more STDs and they don't want any further infection to be transmitted. There is a short discussion of the problem in this Reddit thread.

The solution is not that hard although it is quite easy to find convincing "almost" solutions. Here is one. Sailor Donald wears the first condom and has his wicked way. Then sailor Eric puts on the second condom and then the first condom over it and does the deed. Finally sailor Jared turns the second condom inside out, puts it on, then puts on the first condom over it and completes the action.

This fails in one respect only: Donald has infected the inner surface of the first condom; during the second act this infection is transmitted to the outer surface of the second condom, and so Jared can become infected by Donald's poison. A further incorrect solution appears in the Reddit thread (and then corrected).

The true solution is very similar. Donald uses both condoms (the second inside the first); Eric uses the first condom, Jared turns the second condom inside out and then dons the first condom.

In each sexual act the prostitute is only in contact with the outer surface of the first condom and so she cannot contract a fresh infection. Each man's member touches a condom surface untainted by any infection. All quite easy and possibly a puzzle and solution known to many.

I offer one final twist. Suppose there are 2n+1 sailors and n+1 condoms (but still one prostitute). How about safe sex now?

Let's number the sailors 0 to 2n and the condoms 0 to n.
For each i = 0 to n-1 sailor i wears condom i and also condom 0 over it
Sailor n just uses the single condom 0
For each i = 1 to n sailor n+i wears condom i inside out and also condom 0 over it.


No comments:

Post a Comment