Skip to main content
0 votes
1 answer
158 views

I have a list d_n of n integers and the results Z_klm of a function fun(dk, dl, dm) for all binom(n, 3) combinations without repetition (k, l, m) out of d_n indices. Now, for all binom(n, 2) ...
Max Pierini's user avatar
  • 2,355
8 votes
3 answers
1k views

I am trying to solve the problem posed in this question. Here the OP asks that given a 15 element set, its 2^15 element power set be generated in a manner such that the elements of the power set are ...
uran42's user avatar
  • 685
2 votes
1 answer
194 views

I'm working on an Excel sheet where I have: A reference combination in cell S4, like 4,D,D,D,D,D,D,D A range of combinations in W3:AH6, where each cell contains a comma-separated string like 3,A,A,A,...
Ari Capote's user avatar
4 votes
2 answers
185 views

Let's say I have a box and there is a bunch of balls in that box. I can label each ball with a character while making sure no two balls get the same character as labels. I get a string this way. Let's ...
uran42's user avatar
  • 685
-1 votes
3 answers
343 views

I'm working on generating all possible combinations from a list of N elements, regardless of the number of elements in the resultant combinations. This is basically the power set without the empty ...
Greg Blair's user avatar
1 vote
2 answers
118 views

I have a long input list, and I want to generate combinations of 3 elements. But each combination's elements should be drawn from a length-5 sublist of the original list, rather than drawing elements ...
tim pain's user avatar
-1 votes
1 answer
196 views

What is a scalable way to count the number of n-digit numbers (in mixed radix) that meet a list of different digit criteria? For example, what are the 4 digit numbers that have any of these patterns ...
smichr's user avatar
  • 19.6k
0 votes
1 answer
62 views

In Mathematica I implemented this simple code: n = 8; a0 = Range[0, n - 1]; a1 = Subsets[a0, {2}]; a2 = Subsets[a1, {2}]; a3 = Select[a2, Length[Union[Flatten[#]]] == 4 &]; a4 = Subsets[a3, {n/4}];...
user avatar
3 votes
1 answer
116 views

I have a numpy array of floats and a target sum. I am trying to find all possible combinations of elements that would add up to the target sum. I am struggling to come up with anything computationally ...
Ramon Martin's user avatar
0 votes
1 answer
62 views

Here is my column enter image description here I am looking for a formula to get all combinations separated by "/" Example: SE/XE SE/SX SE/EX XE/EX SE/XE/EX and so on I have so far been able ...
Phani Kalakonda's user avatar
2 votes
1 answer
185 views

Input: a list of m prime numbers (with possible repetition), and integers n and t. Output: all sets of n numbers, where each set is formed by partitioning the input into n parts, and taking the ...
theozh's user avatar
  • 27.2k
5 votes
3 answers
198 views

I have a pandas dataframe which looks like this: 1_2 1_3 1_4 2_3 2_4 3_4 1 5 2 8 2 2 4 3 4 5 8 5 8 8 8 9 3 3 4 3 4 4 8 3 8 0 7 4 2 2 where the ...
Ishigami's user avatar
  • 592
1 vote
1 answer
136 views

The formula below produces permutations of the digits in the array cols - in this case 1 to 6. The perms variable outputs a 2d array of the permutations without repetitions. However, I want to get ...
Ne Mo's user avatar
  • 284
3 votes
2 answers
140 views

The problem is to check if it is possible to get a given targetSum from the elements of a given array. Each element should be included once only (if included). The code is a brute force approach using ...
jack's user avatar
  • 41
1 vote
0 answers
72 views

I'm using python itertools specifically to generate combinations of integer strings. I have already created the loop that will loop through the combinations one at a time. I just need someone to help ...
user27394478's user avatar

15 30 50 per page
1
2 3 4 5
431