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

Consider dividing integer weights by their GCD #6

Open
peteroupc opened this issue Jul 13, 2020 · 1 comment
Open

Consider dividing integer weights by their GCD #6

peteroupc opened this issue Jul 13, 2020 · 1 comment

Comments

@peteroupc
Copy link

peteroupc commented Jul 13, 2020

While writing a code generator based on the Fast Loaded Dice Roller, I've noticed that two equivalent sets of integer weights (where one is an integer multiple of the other) can have a different table size. For example:

  • One weight set, 1, 9, 6, turns into a 4x5 table by the Fast Loaded Dice Roller.
  • However, an equivalent weight set, 1000, 9000, 6000, turns into a 14x5 table this way.

This shows that it might be helpful in some cases to divide the weights by their greatest common divisor (ignoring zero weights) to achieve an equivalent weight set that minimizes table sizes.

@fsaad
Copy link
Collaborator

fsaad commented Jul 13, 2020

Great point: we can also save entropy, since the FLDR "entropy gap" generally gets worse with increasing sum of integers m.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants