Enigmatic Code

Programming Enigma Puzzles

Tantalizer 270: Cupid’s arrow

From New Scientist #821, 23rd November 1972 [link]

With eight handsome bachelors and eight ravishing spinsters in the office, prospects look bright for matrimony. The snag is, however, all are fanatical Catholics or Protestants and the chances against a random bride and groom being of the same religion are nine to seven. In a random mixed marriage, the groom would probably not be a Catholic, even though there are more Catholic men than Protestant women.

How many of the 16 are Protestants?


One response to “Tantalizer 270: Cupid’s arrow

  1. Jim Randell 8 June 2022 at 11:55 am

    Odds of “nine to seven against” are a probability of 9/(9 + 7) = 9/16.

    So of the 64 possible male/female pairs 9/16 of them (= 36) are mismatched (so 28 of them are matched).

    If there are x Catholic men and y Protestant women (so x > y), then the number of mismatched pairs is:

    M = xy + (8 − x)(8 − y)

    And we are looking for M = 36. (This is enough to find the answer to the puzzle).

    Additionally we are told that in a random mixed marriage (i.e. one of the 36 mismatched pairs) the groom would probably not be Catholic.

    There are xy mismatched pairs with a Catholic groom, so we need xy < 18.

    from enigma import (irange, subsets, printf)
    # choose x and y; x > y
    for (y, x) in subsets(irange(0, 8), size=2):
      xy = x * y
      if xy < 18 and xy + (8 - x) * (8 - y) == 36:
        # calculate C and P
        (C, P) = (x + 8 - y, 8 - x + y)
        # output solution
        printf("C={C} P={P} [x={x} y={y}]")

    Solution: There are 7 Protestants.

    We have 3 Catholic (and 5 Protestant) men, and 6 Catholic (and 2 Protestant) women.

    There are 3×2 (= 6) mismatched pairs with a Catholic groom, and 5×6 (= 30) mismatched pairs with a Protestant groom.

    So there are 36 mismatched pairs in total (as required) and fewer than half with a Catholic groom.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: