Bitwise XOR Game

You are given a random collection of nine cards with up to six black squares in each. Can you pick three to five cards so that the total number of black squares in each of the six positions is even?
This is equivalent to finding a set of numbers whose bitwise XOR equals 0.
In Mathematica, the built-in function is BitXor. yields the integer whose binary bit representation has ones at positions where an odd number of the binary bit representations of the have ones. For example, BitXor[61,15] is 50 because , , and .

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

RELATED LINKS

    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.