This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Re https://twitter.com/littmath/status/1770236243911000334 | |
# Coin flipping bijection, based on @NoahJSnyder et al's proof | |
# Original score: HH scores 1 to Alice and HT scores 1 to Bob | |
# Adjusted score to Bob: as above except (the last) HT only scores 1/2 to Bob if there isn't a later H. | |
# Using adjusted scores, the number of Alice wins equals the number of Bob wins. | |
# The function below produces an explicit, though obscure, "local" bijection between Alice's wins and Bob's wins | |
# that doesn't involve collecting all of them first. | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct all tournaments of size up to 11 | |
// A. P. Selby / April 2018 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <algorithm> | |
#include <vector> |