combinatorics
Generate all possible combinations of several columns in .NET
I have like 4 columns in a file, each column contains a number of values, more or less. I need to get all possible combinations, while order of columns and number of sections in resulting strings shou[详细]
2023-01-12 09:20 分类:问答Counting placing items in bins according to boolean restrictions
We have a pool of items.Each item has a set of characteristics.Each characteristic is a string, integer, or floating-point number.Each item is also of a particular type.Types are hierarchical.[详细]
2023-01-11 06:59 分类:问答Calculate n-ary Cartesian Product
Given two lists, I can produce a list of al开发者_如何学Pythonl permutations the Cartesian Product of these two lists:[详细]
2023-01-10 08:13 分类:问答Getting all possible combinations from a list of numbers
I\'m looking for an efficient way to achieve this: you have a list of numbers 1.....n (typically: 1..5 or 1..7 or so - reasonably small, but can vary from case to case)[详细]
2023-01-09 02:46 分类:问答Generating tuples modulo index
I am looking for an algorithm (or a C-like implementation, no itertools available) which generates all tuples[详细]
2023-01-09 02:19 分类:问答How many combinations of k neighboring pixels are there in an image?
I suck at math, so I can\'t figure this out: how many combinatio开发者_JAVA百科ns of k neighboring pixels are there in an image? Combinations of k pixels out of n * n total pixels in the image, but wi[详细]
2023-01-06 16:54 分类:问答combinations/permutations with no repeats across groupings
I\'m looking for C or Python code to implement either of the two pseudocode functions: function 1: list1 = [0,1,2] #any list of single-integer elements[详细]
2023-01-06 04:31 分类:问答Counting Treaps
Consider the problem of counting the number of structurally distinct binary search trees: Given N, find the number of structurally distinct binary search trees containing the values 1 .. N[详细]
2023-01-05 19:54 分类:问答Compute rank of a combination?
I want to pre-compute some values for each combination in a set of combinations. For example, when choosing 3 numbers from 0 to 12, I\'ll compute some value for each one:[详细]
2023-01-05 07:40 分类:问答Reducing permutations of many nested loops
I decided to do an image to explain this better, I just want to check my thinking is ok, and that I can reduce total permutations by 75%:[详细]
2023-01-04 06:38 分类:问答