Last active
August 29, 2015 14:27
-
-
Save jraines/67462aa9419d9b55db27 to your computer and use it in GitHub Desktop.
combinations_problem
This file contains hidden or 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
You have a set A of n integers. | |
For every i ∈ A, | |
i may or may not also belong to a replacement set B, which may be the empty set, | |
where any k ∈ B can replace i in the original set. | |
Each replacement set B can be of any size. | |
Is there a way (especially an efficient way) to generate | |
all combinations of size n (call it A') where: | |
all unique combinations A' where order is not important. | |
Each i ∈ A' should also not be repeated within a given A' | |
Note that A' could be entirely composed of integers from replacements sets, no | |
original member of A need be preserved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment