73 ms·
I'm fascinated by this as a problem. I had an idea how to solve it. Books are not contraband and you can pick two random words from, say the Catcher in the Ry
by Beltiras 9y ago
I'm fascinated by this as a problem. I had an idea how to solve it. Books are not contraband and you can pick two random words from, say the Catcher in the Rye or to name a less controversial book, the Bible and use the first letter of each one to "roll the die". Wrote a small script that tries to balance the odds given the frequency of first letters of words in the English language (odds taken from [1]). Script can be found on Gist [2]. This can of course be adapted to provide tables for common probabilities (say 3d6 for example). All of the methods the prisoners are using is "good enough". Having a table that is not accurately 5% for each number should not be a problem.
It will depend on the books used as well. Sample output:
a b c d e f g h i j k l m n o p q r s t u v w x y z
a 6 15 14 16 18 4 12 16 11 5 7 13 9 3 7 1 11 9 5 2 4 16 20 13 20 20
b 18 13 5 16 3 13 8 5 20 1 15 18 20 20 6 12 3 9 2 15 11 3 9 1 13 14
c 18 10 12 6 1 18 1 1 11 11 8 15 14 20 20 19 19 17 17 19 17 10 1 4 7 10
d 13 6 3 10 17 15 10 12 6 15 20 2 11 1 8 3 3 7 11 19 6 3 13 2 8 17
e 1 4 12 19 17 12 13 6 3 15 9 14 14 9 10 11 19 4 15 10 16 3 14 4 1 9
f 2 2 2 14 7 5 6 13 14 14 16 12 13 13 9 2 9 12 16 11 20 1 12 5 12 20
g 16 8 7 5 1 18 12 8 1 13 13 8 13 2 17 10 12 1 9 11 10 13 5 18 17 12
h 17 13 6 13 17 16 14 1 10 5 6 19 20 1 6 16 16 10 6 12 3 13 15 19 16 6
i 15 12 20 3 6 12 9 17 4 7 1 9 19 9 11 7 5 5 7 9 12 6 5 1 1 10
j 14 12 19 11 1 12 14 12 14 10 12 8 18 4 9 4 13 4 10 13 1 1 2 14 19 14
k 19 1 7 17 5 4 15 9 14 5 7 3 2 12 14 20 14 15 8 12 10 8 5 19 16 3
l 4 15 7 7 1 4 6 6 15 15 15 15 6 15 3 17 9 6 10 15 18 13 20 16 19 20
m 14 19 13 14 14 5 12 5 11 5 16 7 18 10 14 16 16 19 7 4 7 16 15 2 15 9
n 11 6 17 15 5 2 17 13 17 8 8 10 16 2 13 6 3 9 13 4 11 19 6 17 18 7
o 20 13 6 3 1 20 4 7 2 12 19 9 19 2 4 2 16 4 1 10 18 15 15 14 7 2
p 19 19 20 3 4 6 14 18 11 1 19 3 9 7 10 14 13 14 12 17 7 4 3 2 6 15
q 12 20 7 15 17 20 20 2 12 20 13 11 19 14 16 12 9 17 7 4 8 10 19 5 13 4
r 8 2 9 14 13 2 18 19 20 18 19 10 14 11 5 7 20 14 5 1 12 11 9 19 2 9
s 17 1 10 4 5 18 5 13 16 15 2 17 9 18 14 12 18 9 4 8 11 9 3 6 17 16
t 3 5 7 7 3 13 5 14 19 3 16 15 16 9 16 1 1 17 18 8 11 17 18 16 4 18
u 12 5 6 17 20 16 15 6 19 5 8 5 9 14 8 7 10 2 5 14 12 16 15 8 14 5
v 17 16 19 4 12 10 2 16 5 13 12 17 2 7 16 15 8 11 18 10 17 4 2 7 11 4
w 5 11 8 20 7 13 18 17 20 20 20 11 5 13 12 4 5 13 12 10 11 17 1 11 13 12
x 3 10 12 10 10 2 9 13 13 3 1 12 2 14 1 14 15 12 6 19 7 18 14 6 13 12
y 13 6 13 8 15 19 9 17 13 7 12 3 18 10 20 6 4 14 14 12 4 8 16 4 16 12
z 16 18 11 12 6 7 2 15 8 5 20 13 4 16 10 9 18 9 7 17 11 5 19 13 19 19
Difference between maximum and minimum odds: 0.004783609999999994
[1] https://en.wikipedia.org/wiki/Letter_frequency#Relative_frequencies_of_the_first_letters_of_a_word_in_the_English_language
[2]: https://gist.github.com/arnists/d23194c4c48880979ed0993bd3ec4b7c
- ufo 9y agoThat is a really interesting idea. But if we pick words by randomly pointing at a page in the book we might need take into account how big the words are in addition to how frequent they are.
- Beltiras 9y agoYes, I thought about that. I'm working on extending the program to essentially change the King James Bible into a fair random distribution of any kind. Length of words is something to consider. Position on page might also be at issue but one would need data on the exact printing so that might be overkill. Being a gamer myself motivated me to actually solve this problem neatly. Make PDFs and get them into distribution.
- kibwen 9y agoUsing a Bible is a good idea (and also amusingly ironic), because it would allow you to open to a random page, point at a random word, and use the chapter and verse numbers as your random elements, no script required. The statistical distribution might be a bit curious, though...
- Beltiras 9y agoChapter and verse would not be good enough, they are not "random enough".