see here
for a formal discussion from a philosophers perspective.
Simple version
20 couples in town. It is traditional to set a husbands
shoes out in the street if he is found to be
unfaithful. This constitutes a divorce.
Every woman knows the status of everyone else's husband,
but not their own.
This is common knowledge (what pray tell does that
mean?)
Easy case 1:
Chief (who knows everything) says, 1 of your husbands
have been unfaithful.
The next morning that woman sets out her husbands shoes
(identical to the "one red hat" case previously discussed)
easy case 2:
Chief says, 2 of your husbands have been unfaithful.
The next morning two women set out their husbands
(identical to the "two red hats")
medium case:
Chief says, one or two of your your husbands have been
unfaithful.
The first morning every, anyone who knows everyone else
in not faithful will set out her husband. If this
doesn't occur, then we know that she sees at least one
unfaithful husband.
The second morning, if no one has set out their husband,
both wifes figure it out and divorce them.