Summer 2022
The Coffee Experiment
Mapping M1:
Should be PIS, but I misread “pisces” as “pices”. Oops!
Pairings:
The straightforward way to choose pairings would be to do every 2-tuple (A,B) where A,B are both signs.
However, this would be 122=144 pairings, and I don’t have time for that!
Instead let’s do unordered pairings—ie, if we do the pairing (A,B), we don’t do (B,A); there are only 78 of these, which is more managable. There’s the issue, then, of in each pairing how to decide which sign should be A and which should be B. (Since our pairings are stored in plastic bags, we must distinguish them by designating one as “A” and one as “B”)
We want it to be such that each sign shows up 5-6 times as A, and 5-6 times as B (and once as both, when paired with itself), for the total of its 12 pairings.
The way we can do that is as follows: for a pairing of signs s,σ, if σ is clockwise of s, then let (A,B)=(s,σ); if s is clockwise of σ, then let (A,B)=(σ,s); if they are opposite, then let A be chosen at random.
...
So I wrote a little program2 to do that, and here are the pairings:
NOTE: I actually decided to not include pairings against self!
(identifiers are randomized)
These pairings were handed to dad
Each bag was labelled in the form ${IDENT} ${A or B}
He will choose randomly from the box and make 1 pairing each day. He will keep track of which IDENT was chosen each day. I will record my experience of the pairing knowing the current date but not the IDENT. This way, neither of us ever know what coffee we’re drinking until the experiment concludes.
const signs = 'AQU PIC ARI TAU GEM CAN LEO VIR LIB SCO SAG CAP'.split(' ');
function index(sign) {
const idx = signs.indexOf(sign);
if (idx === -1) throw 'oops';
return idx;
}
function mod(n, m) {
return ((n % m) + m) % m;
}
function direction({ from, to }) {
const diff = mod( index(to) - index(from), 12 );
if (diff === 0 || diff === 6)
return 'none';
if (diff <= 5)
return 'cw';
if (diff >= 7)
return 'ccw';
throw diff;
}
const pairings = [];
for (let i = 0; i < signs.length; i++) {
for (let j = i + 1; j < signs.length; j++) {
const s1 = signs[i];
const s2 = signs[j];
const dir = direction({ from: s1, to: s2 });
const [A, B] = (
dir === 'none'
? (Math.random() < 0.5 ? [s1, s2] : [s2, s1])
: dir === 'cw'
? [s1, s2]
: dir === 'ccw'
? [s2, s1]
: null
);
pairings.push([A, B]);
}
}
function shuffle(array) {
let currentIndex = array.length, randomIndex;
while (currentIndex != 0) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex--;
[array[currentIndex], array[randomIndex]] = [
array[randomIndex], array[currentIndex]];
}
return array;
}
const idxs = pairings.map((_, i) => i + 1);
const idxsr = shuffle([...idxs]);
const sf = i => ('' + i).padStart(2, '0');
for (let i = 0; i < pairings.length; i++) {
const [A, B] = pairings[i];
console.log(sf(idxs[i]), sf(idxsr[i]), A, B);
}
{
const counts = {};
for (const sign of signs)
counts[sign] = { A: 0, B: 0 };
for (const [A, B] of pairings) {
counts[A].A++;
counts[B].B++;
}
for (const sign of signs) {
console.log(
sign,
counts[sign].A,
counts[sign].B,
counts[sign].A + counts[sign].B,
);
}
}