Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce entropy loss when num of dice and length of wordlist do not fit #41

Open
ulif opened this issue Sep 12, 2017 · 0 comments
Open
Assignees

Comments

@ulif
Copy link
Owner

ulif commented Sep 12, 2017

When we have dice with n sides and use a wordlist of m words, then we would like to get an optimum entropy of log(m) per word. If, however, m is not a power of n, then, I think, we lose entropy when mapping dice throws to the words in the wordlist.

Consider n=3 and m=2:

1  →  A
2  →  B
3  →  ?

What to do when the user rolls a "3"?

Two possibilities come to mind:

a)
1 → A
2 → B
3 → A

b)
1 → A
2 → B
3 → deny, roll again, until one of (1, 2) is rolled

The second one (b) is, what we implement currenty. But is this mathematically the best?

@ulif ulif self-assigned this Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant