3
$\begingroup$

Place integers 1 to 31 in the 31 regions of Branko Grünbaum's symmetrical 5-set Venn diagram so that the sum inside any of the 5 sets is the same.

enter image description here

$\endgroup$
2
$\begingroup$

First

number the regions 0..31 in the "obvious" way so that set A consists of the regions whose index has bit 0 set, set B consists of those whose index has bit 1 set, etc. That is: set A=1, B=2, C=4, D=8, E=16; and then e.g. the region labelled ACDE gets the number A+C+D+E=1+4+8+16=29. Thus we number the regions with the numbers from 0 (for the external region, not part of any of the sets) to 31 (for the central region, part of them all) consecutively.

Now

construct a 5-bit Gray code using the usual construction: 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16. A little adding up reveals that this gives sums of 248 for sets A,B,C,D but 376 for set E. (Note 1: 248 is exactly half of 0+1+...+30+31. Note 2: Why a Gray code? Well, actually, it just seemed like it might work out, and it turned out pretty well. You can probably do something similar using the Morse-Thue sequence duplicated at various power-of-2 scales, but just as with the Gray code it'll only handle four of the sets and leave one that needs fixing up.)

And now

fix it up by hand, swapping entries n and n+16 to adjust the sum for set E until it too has sum 248. We can do this in various ways; I picked this one: 24, 25, 27, 26, 30, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 0, 1, 3, 2, 6, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16.

$\endgroup$
  • 1
    $\begingroup$ In the way described in the remainder of the sentence. If it's not clear enough I can say it at greater length. $\endgroup$ – Gareth McCaughan Feb 15 at 21:35
  • $\begingroup$ Yes, please do. $\endgroup$ – Bernardo Recamán Santos Feb 15 at 21:50
  • 1
    $\begingroup$ OK, done. (And a few comments on the rabbit-out-of-hat in the second spoilered paragraph.) $\endgroup$ – Gareth McCaughan Feb 15 at 21:59
  • 1
    $\begingroup$ In my answer to the previous four ellipses question I have a method that I think generalises to any number of sets. $\endgroup$ – Jaap Scherphuis Feb 16 at 12:53
  • $\begingroup$ Oh, that's nice! It's closely related to my solution here, too, I think -- what you're doing is very similar to the calculation for converting Gray code to position, whereas I've done the reverse and then had to patch it up. $\endgroup$ – Gareth McCaughan Feb 16 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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