13 questions linked to/from Finding all partitions of a set
76 views

### List of all “partitions”/ “cuttings” of a list [duplicate]

How do I do generate all possibilities to "partition"/ "split"/ "group" a list? ...
921 views

### Any built-in function to generate successive sublists from a list?

Given lst = {a, b, c, d} I'd like to generate {{a}, {a, b}, {a, b, c}, {a, b, c, d}} but using built-in functions only, ...
638 views

### How to generate all possible orderless partitions of a list according to another list?

This question is hard to describe in plain text. So I will post an example and a working code (brute force) to illustrate. For example I have a list: ...
767 views

### Is there concise code for the list operation I want to perform?

Is there any concise syntax for the following partitioning of a list. Given {1, 2, 3, 4}, I want to get the output as shown below. I have tried various function ...
1k views

### Subsets of a list

Consider the following demand of products for the next four months. data={1,20,3,40}; I could produce the whole demand in the first months, leading to the ...
605 views

### Partition a set into $k$ non-empty subsets

The Stirling number of the second kind is the number of ways to partition a set of $n$ objects into $k$ non-empty subsets. In Mathematica, this is implemented as ...
175 views

### Seeking a way to generate sequential partitions of a list using built in or Combinatorica functions [duplicate]

This code generates all "sequential partitions" of a list: ...
353 views

### Splitting a list into 2 sublists in all possible ways

I have a list and I want to split it into 2 sublists in all possible ways If S={1,2,3,4} I should get ...
58 views

### Groupings of the Elements of a List with at Most $k$ Elements

Given a list with $n$ elements and an integer $k$ I want to get a list with all possible groupings of these n elements in sets with at most k elements. For example, given $n=\{1,2,3,4\}$ and $k=3$ I ...
90 views

### Add elements of a list to sublists of another list, such that each of these sublists has minimum edges in the corresponding graph?

I've got a graph g with the following adjacency matrix: ...
114 views

### Partition a set of n objects into k subsets? [duplicate]

Is there some function recently added to Mathematica that facilitates forming all partitions of a n-element set into k subsets? In other words, something that easily gives the same thing as what <...
I tried the following (inspired by the answer here) myList = {a, b, c}; Needs["Combinatorica"]; SetPartitions[myList] and I got this answer, ...