Closed GoogleCodeExporter closed 9 years ago
You didn't mention in your SO question any real-world use case. What are you
really trying to do?
Original comment by wasserman.louis
on 21 Jun 2012 at 5:43
Original comment by wasserman.louis
on 22 Jun 2012 at 12:35
Still waiting on a specific use-case from the OP.
Original comment by kurt.kluever
on 24 Jul 2012 at 5:02
Consider whatever engine generates crosswords for the California lottery. It
is given a list of lists where each inner list contains 22 words that have been
chosen for printing and its task is to supply each ticket with a set of "Your
Letters" such that the published prize distribution is accurately maintained.
To do that, it has to select a certain number of tickets at each prize level
and find a k-permutation of the alphabet such that the exacy number of words
from the set of 22 are completely covered, no more, no less. Word lists can be
presumed to have a healthy distribution of letters across words, and if a given
ticket somehow lacks a solution for the desired prize level, it's always
possible to swap it for another candidate that does.
Since each ticket gives its player 18 out of 26 letters, it would be useful to
have a way to iterate through the 18-permutations of A-Z. Mind you, this
problem is better addressed by tracking the pair substitutions along a
Hamiltonian cycle through all the nodes representing unique 18-permutations.
There is an algorithm for generating such a pair sequence to be found in Knuth
and I've frequently used the attached implementaiton of it in my own work...
Original comment by jhein...@gmail.com
on 14 Aug 2014 at 2:09
Attachments:
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:14
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
speci...@gmail.com
on 21 Jun 2012 at 4:32