Category "combinatorics"

Calculating a list of valid combinations

So I came up with a problem that I can’t logically solve. I’ve fleshed out an example; You have a list of numbers that you need to output (e.g. 3x n

Enumerate all binary numbers of length n and weight at most k lexicographically

I'm looking for an algorithm which enumerates all binary numbers of a given length n lexicoraphically, with the constraint that every number is skipped, which h

Count of combinations with repetitions

I have a very inefficient way of counting the combinations of N/2 items from an array of size N. What I do is sort the array to begin with and then loop through

Creating Combinations of Elements

I want to create product option system. I have a form look like this: [![Sample image][2]][2](source: resmim.net) Form's inputs are tag inputs. First input is o