# Find all the possible Male Female combination

There are two companies, A and B, which are going to participate in 12 different conferences. We know the output of all the conferences (who will get which desert), based on it find out Male and Female participates.

Rules:

1. There are total 12 conferences, C1 to C12

2. Participated companies are A and B

3. Each company's 12 employees are participating these conferences: A1 to A12 and B1 to B12

4. Each conference has 3 participants, 1 is from company A and 2 are from B

5. Each participants get either ice-cream or chocolate based on the gender combination of the participants in each conference. => If all the three participants in one conference are female or two are male and 1 is female, then each in that particular conference will get chocolate. => If all three participants in a conference are male or two are female and 1 is male then they will get ice-cream.

6. Below is the list of conference wise participants and what they got.

C1 => A12, B1 , B11 => ice-cream
C2 => A11, B2 , B4 => chocolate
C3 => A10, B3 , B10 => chocolate
C4 => A9 , B4 , B12 => ice-cream
C5 => A8 , B5 , B7 => chocolate
C6 => A7 , B6 , B5 => ice-cream
C7 => A6 , B7 , B8 => ice-cream
C8 => A5 , B8 , B1 => ice-cream
C9 => A4 , B9 , B6 => chocolate
C10 => A3 , B10, B2 => ice-cream
C11 => A2 , B11, B9 => chocolate
C12 => A1 , B12, B3 => ice-cream

From above rules, find out who are male and female employees and how many gender combinations are possible based on above scenarios.

Below is one combination example. Please note that below combination is totally false, so don't consider it while solving this puzzle. This only gives a definition of combination.
A1=male
A2=female
A3=female
A4=male
.
.
A12=female
B1=female
B2=male
.
.
B12=female

• Is "totally false example" a hint that every line of the example is false, hence A1 is female, A2 is male etc.? – Zsolt Szilagy Oct 20 '16 at 12:01

Each conference's food choice tells you in effect the XOR of the genders of the three participants. You can choose the genders of B1..B12 however you like, and then each conference tells you the gender of one of the A. Therefore there are 2^12 = 4096 possible gender combinations. There's not really anything to say about the pattern other than what I've already said.

A simple worked example: suppose company B is super-sexist and all its employees are male. Then a conference will serve chocolate iff its A-participant is female. Therefore, A1..A12 are, in order, MFMFMMMFMFFM.

Partial strategy
Let's note male = 0 and female = 1.

If all the three participants in one conference are female or two are male and 1 is female, then each in that particular conference will get chocolate.

Translates to "sum is odd" => 'chocolate'.

If all three participants in a conference are male or two are female and 1 is male then they will get ice-cream.

Translates to "sum is even" => 'ice-cream'.

A12+ B1 + B11 = even
A11+ B2 + B4 = odd
A10+ B3 + B10 = odd
A9 + B4 + B12 = even
A8 + B5 + B7 = odd
A7 + B6 + B5 = even
A6 + B7 + B8 = even
A5 + B8 + B1 = even
A4 + B9 + B6 = odd
A3 + B10+ B2 = even
A2 + B11+ B9 = odd
A1 + B12+ B3 = even

Summing up all the above we can say that

in A there is an odd number of females because the sum is odd and all the members of B are added twice. So sum of A is odd.

Brute force:
Strategy:

The digits in the first column in the sums above form a 12 digit number in base 12. So do columns 2 and 3 and the odd/even column.
Let's note these numbers with A,B and B2 and the odd/even column should transform into 011010001010 (which is 1674 in base 10).
So now the problem reduces to (A ^ B) ^ C = 1674.
Since we found out that A has an odd number of 1s, the brute force will run faster.

Doing this,

I was able to find 4096 solutions.

Here are some of them at random:

A_: 111111111110
B_: 110110100000
B1: 010011010100
S_: 011010001010

_A: 111111101001
_B: 000010100011
B_: 100111000000
_S: 011010001010

_A: 111111100011
_B: 111101010100
B_: 011000111101
_S: 011010001010