combinatorics
Generating Balls in Boxes
Given two sorted vectors a and b, find all vectors which are sums of a and some permutation of b, and which are unique once sorted.[详细]
2023-01-04 04:37 分类:问答Generating all Possible Combinations
Given 2 arrays Array1 = {a,b,c...n} and Array2 = {10,20,15....x} how can I generate all possible combination as Strings a(i) b(j) c(k) n(p)[详细]
2023-01-04 03:26 分类:问答How to generate all variations with repetitions of a string?
I want to generate all variations with repetitions of a string in C++ and I\'d highly prefer a non-recursive algorithm. I\'ve come up with a recursive algorithm in the past but due to the complexity ([详细]
2023-01-03 17:37 分类:问答Open space sitting optimization algorithm
As a result of changes in the company, we have to rearrange our sitting plan: one room with 10 desks in it. Some desks are more popular than others for number of reasons. One solution would be to draw[详细]
2023-01-02 22:57 分类:问答How can I combine pairs of elements from a std::set?
I have a set<string> from \"one\", \"two\", and \"three\". How can I get all p开发者_StackOverflow中文版airs from it?[详细]
2023-01-01 14:42 分类:问答Generate all permutations with sort constraint
I have a list consisting of other lists and some zeroes, for example: x = [[1, 1, 2], [1, 1, 1, 2], [1, 1, 2], 0, 0, 0][详细]
2023-01-01 11:14 分类:问答Finding number of different paths
I have a game that one player X wants to pass a ball to player Y, but he can be playing with more than one player and the others players can pass the ball to Y.[详细]
2023-01-01 04:12 分类:问答concatenation of all combination from different Lists in c#
I have a List and I\'m grouping it into different lists. From: List -> \"a\",\"b\",\"c\",\"it\",\"as\",\"am\",\"cat\",\"can\",\"bat\"[详细]
2023-01-01 00:35 分类:问答Combinatorial optimisation of a distance metric
I have a set of trajectories, made up of points along the trajectory, and with the coordinates associated with each point. I store these in a 3d array ( traj开发者_StackOverflow社区ectory, point, para[详细]
2022-12-30 09:29 分类:问答Program contains 2 nested loops which contain 4 if conditionals. How many paths?
In Roger Pressman\'s book, there is an example described of a program with 2 nested loops, the in开发者_如何学JAVAner loop enclosing four if statements. The two loops can execute up to 20 times. He st[详细]
2022-12-30 02:34 分类:问答