May be you know the game of Set (a wonderful game for kids btw) a card game with 81 cards, where each card has a figure on it with 4 different attributes (form , number, colour and fill). Each attribute has 3 different values:
form: wave, oval, diamond colour: red, purple, and green number: 1, 2, 3 fill: none, dashed, opaque.
12 cards are laid open on the table and now the challenge is to indicate sets. A set consists of three cards where every attribute value occurs 0, 1 or 3 times. having 2 cards with red figures, or opaque, or 1 number is no good. See the supplied link for a more visual explanation.
I do envision a code for a card where all attributes are encoded so
2 Purple Waves with No fill
Together with for instance
it is a set (3 different forms, 3 different colors, 3 different number, 1 fill).
Input is space delimited string of unique codes (randomly chosen out of 81 possible codes) representing cards.
"OR1N WP2N DG3N DR1D WG3S WG1N WR2D WP3N DR2O DR2D OG3O OR2D"
The solution must indicate all possible sets within the given collection. So
OR1N, WP2N, DG3N
must be part of the solution together with all other sets.