## Enigma 1747

Spoiler for New Scientist Enigma 1747: “Mind your Ps and Qs” (Follow the link to see the puzzle.)

It’s tempting to say the probability of getting the job is 1 in PQ, but no: That’s the probability given no knowledge of what either interviewer said. But we know the second interviewer gave his approval. And then it’s tempting to say, given the second’s approval, all we need is the first’s, and the probability of that is 1/P; but no, it doesn’t work like that!

Out of PQ applicants, the first will reject (P–1)of them and the second will approve (P–1)(Q–1) of those; also the first will accept Q of them and the second will accept 1 of those. So the total number approved by the second is (P–1)(Q–1)+1 of which only 1 will get the job.

This means 1/[(P–1)(Q–1)+1] = 1/(P+Q) or, inverting and expanding, PQPQ+2 = P+Q. Then PQ–2P–2Q = –2, or (P–2)(Q–2) = 2. If P and Q>P are positive integers then we have to have P=3, Q=4.

So out of every 12 applicants, the first interviewer rejects 8 (2/3 of 12) of which the second accepts 6 (3/4 of 8), and the first accepts 4 (1/3 of 12) of which the second accepts 1 (1/4 of 4): Altogether the second accepts 7, of which 1 gets the job, equal to 1/(P+Q) as required.

## Enigma 1696

Spoiler for New Scientist Enigma 1695:

A set of snooker balls contains six coloured and 15 red balls. From such a set Harry took some coloured balls and a larger number of reds and put them in his bag. From the remainder Tom took some coloured balls and some reds (more of each than Harry took) and put them into his bag.

Each of them calculated that if he drew two balls at random out of his own bag simultaneously there was a 1 in X chance that they would both be coloured, X representing the same number for each person.

How many coloured balls and how many red balls from the set were not taken by either of them?

Edited 12 May to correct an error right at the end.

Pretty easy this week. I was a little taken aback by the word “simultaneously” but presumably that just means you don’t put one ball back before drawing the second. If there are nc colored (excuse my spelling) balls and nr red balls totalling N = nc + nr then the probability that both balls drawn are colored is (nc/N)((nc–1)/(N–1)) = (nc2nc)/(N2N). We just have to find two pairs of values for nc and N consistent with the problem statement such that the probabilities are equal.

First of all, notice that Harry must have taken 2 colored balls. No fewer, partly because it says “balls”, plural, and partly because if he took fewer than 2, his probability of drawing 2 colored balls would be zero, which can’t be expressed as “a 1 in X chance”. But if he took 3 then Tom could not take more colored balls than Harry did. So Harry took 2, leaving 4, of which Tom took either 3 or all 4. (Harry also took some red balls — no more than 7, because Tom took more — making a total of NH, and Tom took some of the rest, making a total of NT.)

That means Harry’s probability of drawing 2 colored balls is 2/(NH2NH) while Tom’s is 6/(NT2NT) or 12/(NT2NT). Either way it must be that NT2NT is divisible by 3, since it’s either 3 or 6 times NH2NH. This happens if NT equals 0 or 1 modulo 3. NT is at least 4 and no more than 18. So NT2NT is 12, 30, 42, 72, 90, 132, 156, 210, 240, or 306. Of these the only one that is 3 times a number of the form NH2NH is 90, and the only one that is 6 times a number of that form is 72. This means we have either NT = 10 and NH = 6, or NT = 9 and NH = 4. In the former case ncH = 2, nrH = 4, ncT = 3, nrT = 7, and in the latter case ncH = 2, nrH = 2, ncT = 4, nrT = 5. But the second case violates the requirement that Harry took “a larger number of reds” (larger than the number of colored balls he took). So they took a total of 5 colored balls and 11 reds, leaving 1 colored and 4 red.