Questions tagged [partitions]
this tag is used for questions regarding splitting a list into sublists
174 questions
4
votes
2
answers
166
views
Partitions of an integer into sums of nonnegative integer powers of its decimal digits
Problem statement: I am trying to write a function that calculates the number of distinct ways an integer can be expressed as a sum of nonnegative integer powers of its decimal digits and return this ...
3
votes
1
answer
131
views
Is there a way of successively applying a function to manageable chunks of a large list without having to run each line separately/manually?
The following is a simpler example of the type of code I am interested in running, albeit smaller and less complex:
...
2
votes
1
answer
100
views
Fast partitioning in the given case
Consider the following code:
tab = RandomReal[{0, 1}, {3*10^7, 2}];
lenblock = 10^3;
len = Length[tab];
tabfinal = Partition[tab, lenblock]; // AbsoluteTiming
Here,...
7
votes
10
answers
568
views
Successive divisions in a list [duplicate]
Suppose I have a list:
list = {a, b, c, d, e, f, g, h, i, j, k, l}
How can I make a new list which contains successive divisions of old lists like {a/b, b/c...} ...
12
votes
5
answers
602
views
What is a simple way to copy a partition from one list to another list?
I have two lists of the same length at their bottom level and one contains sublists of various lengths:
A={{1,2,3},{4,5,6,7},{8,9}};
B={a,b,c,d,e,f,g,h,i};
Is ...
4
votes
5
answers
295
views
Partitioning a list based on the count of a certain marker
My goal is to get lists containing k number of 0.1s.
For example, in ...
0
votes
1
answer
198
views
PartitionsP for non-integer arguments [closed]
Is there a reason why the function PartitionsP[] does not return anything for non-integer arguments, although there is a way to calculate using Rademacher’s ‘exact’ ...
2
votes
0
answers
79
views
NextSetPartition [closed]
I'm looking for a function similar to the one in the question below, but for the more general problem of set partitions without restricting the set size.
NextKSizePartition, or how to partition a set ...
1
vote
2
answers
184
views
Creating function with array input with desired coefficient and evaluate it
I had asked the same question before here Creating a list of functions with desired coefficients
but did not get the desired answer, may be I was not clear in my question.
I have defined this function ...
2
votes
1
answer
182
views
Creating a list of functions with desired coefficients
I have defined this function to results some list of functions, however its not returning what I want
...
8
votes
2
answers
718
views
Better code for Ramsey partitions
Ramsey partitions for parameters $a$ and $b$ are certain integer partition of $a+b$ developed by McAvaney, Robertson, and Webb (Combinatorica 1992) for applications in fair division problems where two ...
4
votes
2
answers
222
views
Two simple vector partition rules
We have a vector of zeros and other numbers, f.e:
vector = {0, 0, 0, 9, 0, 2, 0, 5, 0, 4, 0, 5, 6, 2, 0};
The two rules:
Partition the vector in such a way that (1)...
4
votes
1
answer
270
views
How to make a function that returns all super distinct partitions?
I am working on distinct partitions. I recently created a function StrictIntegerPartitions.
This is from the book Integer Partitions by George E. Andrews at Pennsylvania State University and Kimmo ...
9
votes
4
answers
896
views
Design a function that gives all strict partitions of an integer
A strict partition of an integer has all distinct parts. There are no duplicates like 1 in {5,3,1,1} for 10. All the parts are unique. Sylvester created a bijection between the partitions of an ...
0
votes
0
answers
82
views
code for Garsia-Milne bijection
The combinatorial interpretation of the first Rogers-Ramanujan identity states that the partitions of n with gaps at least two between parts and the partitions of n with parts that are either 1 or 4 ...