Riddle
On a particular island live a lot of salamanders with different colours. Each salamander is defined by its genetics, an ordered list of unordered pairs of so-called genes. These genetics have the following properties:
- A child of two salamanders will, for each gene pair, select one random gene from each parent and form a new gene pair with the two selections. (Kind of like how it works in real biology if we ignore random mutations and crossing over).
- Two salamanders with the same gene pairs (so they are exact clones of each other) will have the same colour.
- Two full siblings (so salamanders with the same parents) have the same colour (totally not how it works in biology).
Note that not all gene combinations have to be viable, so not every gene combination has a corresponding salamander.
Prove that two salamanders with different colours cannot have viable offspring.
Solution
Assume a salamander has genes and a salamander has genes . And they have viable offspring with genes .
and can have offspring genetically identical to (by selecting from and from ). And can have offspring that is genetically identical to (by selecting from and from ). Therefore using the third axiom, and have the same colour. Analogously, and have the same colour. By consequence, and have to be the same colour.
You can find a more rigorous version of this proof that is a computer verified here: https://gitlab.com/Elmosfire/blog-links/-/blob/378a210994d4e5d5f96af505ebf1011aecbfca3f/salamander.lean.
Alternate version
If we soften the third axiom to be
Two full siblings have the same colour if neither of them is genetically equal to their parents.
In this case, a salamander can breed with another salamander of a different colour and produce viable offspring.
Assume there are three gene pairs, all with two possible genes. Call themr
/R
,g
/G
andb
/B
.
Then have only six viable gene combinations,
rRGGbb
,rRggBB
which are red.
rrgGBB
,RRgGbb
which are green,
RRggbB
,rrGGbB
which are blue.
And let each time call the first mentioned geneset to have left chirality and the right mentioned geneset to have right chirality.
Note that genesets of the same chirality are symmetric to one another by replacing r with g, g with b and b with r. Genes from the left chirality transform into genes with right chirality by swapping two genes.
Now we can check all cases:
- If a salamander breeds with a clone of itself, the only viable offspring is itself. For example, if
rRGGbb
breeds with itself, the offspring can only beRRGGbb
,rRGGbb
andrrGGbb
, of which only the middle one is viable. - If a salamander breeds with a salamander with the same chirality, it has one viable offspring. For example
rRGGbb
andrrgGBB
only haverrGGbB
as viable offspring. - Two salamanders with the same colours but different chirality cannot have viable offspring.
- If two salamanders with different colours and chirality have offspring, the offspring always is a clone of one of the parents.
If this argument does not convince you, you can check the system case by case:
rRGGbb( red) & rRGGbb( red) => <rRGGbb( red)>
rRGGbb( red) & rrgGBB(green) => rrGGbB( blue)
rRGGbb( red) & RRggbB( blue) => RRgGbb(green)
rRGGbb( red) & rRggBB( red) =>
rRGGbb( red) & RRgGbb(green) => <rRGGbb( red)> or <RRgGbb(green)>
rRGGbb( red) & rrGGbB( blue) => <rrGGbB( blue)> or <rRGGbb( red)>
rrgGBB(green) & rRGGbb( red) => rrGGbB( blue)
rrgGBB(green) & rrgGBB(green) => <rrgGBB(green)>
rrgGBB(green) & RRggbB( blue) => rRggBB( red)
rrgGBB(green) & rRggBB( red) => <rrgGBB(green)> or <rRggBB( red)>
rrgGBB(green) & RRgGbb(green) =>
rrgGBB(green) & rrGGbB( blue) => <rrgGBB(green)> or <rrGGbB( blue)>
RRggbB( blue) & rRGGbb( red) => RRgGbb(green)
RRggbB( blue) & rrgGBB(green) => rRggBB( red)
RRggbB( blue) & RRggbB( blue) => <RRggbB( blue)>
RRggbB( blue) & rRggBB( red) => <RRggbB( blue)> or <rRggBB( red)>
RRggbB( blue) & RRgGbb(green) => <RRggbB( blue)> or <RRgGbb(green)>
RRggbB( blue) & rrGGbB( blue) =>
rRggBB( red) & rRGGbb( red) =>
rRggBB( red) & rrgGBB(green) => <rrgGBB(green)> or <rRggBB( red)>
rRggBB( red) & RRggbB( blue) => <RRggbB( blue)> or <rRggBB( red)>
rRggBB( red) & rRggBB( red) => <rRggBB( red)>
rRggBB( red) & RRgGbb(green) => RRggbB( blue)
rRggBB( red) & rrGGbB( blue) => rrgGBB(green)
RRgGbb(green) & rRGGbb( red) => <rRGGbb( red)> or <RRgGbb(green)>
RRgGbb(green) & rrgGBB(green) =>
RRgGbb(green) & RRggbB( blue) => <RRggbB( blue)> or <RRgGbb(green)>
RRgGbb(green) & rRggBB( red) => RRggbB( blue)
RRgGbb(green) & RRgGbb(green) => <RRgGbb(green)>
RRgGbb(green) & rrGGbB( blue) => rRGGbb( red)
rrGGbB( blue) & rRGGbb( red) => <rrGGbB( blue)> or <rRGGbb( red)>
rrGGbB( blue) & rrgGBB(green) => <rrgGBB(green)> or <rrGGbB( blue)>
rrGGbB( blue) & RRggbB( blue) =>
rrGGbB( blue) & rRggBB( red) => rrgGBB(green)
rrGGbB( blue) & RRgGbb(green) => rRGGbb( red)
rrGGbB( blue) & rrGGbB( blue) => <rrGGbB( blue)>
If the salamander is in <>
-brackets, it means it is a clone of one of the parents. You can quickly check two full siblings where none are a clone of either of the parents do not exist.
So the last hypothesis is fulfilled automatically.