884 views

### Tuples with one “joker” digit? [duplicate]

I'd like to create an array of all possible length 11 combinations of 1, 2, and the number 3, BUT with the number 3 only appearing zero or once in each combination. I tried: ...
3k views

### Partition a set into subsets of size $k$

Given a set $\{a_1,a_2,\dots,a_{lk}\}$ and a positive integer $l$, how can I find all the partitions which includes subsets of size $l$ in Mathematica? For instance, given ...
635 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: ...
1k views

### On generalizing Partition[] (with offsets) to sublists of unequal length

The usual Partition[] function is a very handy little thing: ...
2k views

### Finding all dictionary words that can be made with a given set of characters (Wordfeud/Scrabble)

This is a slightly more involved variant of this recent question. By sheer coincidence I happened to have been building a Wordfeud (Scrabble clone) game in Mathematica. My interactive Wordfeud board ...
375 views

### Efficient way to make subsets of list with placeholders

I have an arbitrary list of unique elements: lst = {a, b, c, d} Documentation allows finding subsets with same number of elements, say ...
322 views

### Center of mass in the plane

I have three masses of 3, 4, and 5, located at the points $(-1,1)$, $(2,-1)$, and $(3,2)$. To find the center of mass, I performed these steps. ...
179 views

### Combinatorics: Placed errors

Consider a vector of length n where each element can take one of the values U, X, ...
I am trying to create all possible strings of length $8$ from the alphabet $\{+1,-1\}$. I am trying to get help from this question. But not sure where to start from. Any help?