All Questions
Tagged with permutation combinatorics
80
questions
5
votes
1
answer
161
views
Find permutation that satisfies conditions
Suppose you what to find a permutation of integers {1, 2, ..., 13} that satisfy some rules.
Rules can be found in variable rules....
1
vote
1
answer
207
views
Arrange 1-n^2 in n×n grid satisfy products of rows equal to products columns
For which $n\in\mathbb{N}$ is it possible to arrange $\{1,…,n^2\}$ in an $n\times n$ grid so that the set of products of columns equals the set of products of rows?
I can find solution for $3\times 3$ ...
1
vote
2
answers
127
views
Delete the subsets containing the same $2$ integers present in other subsets
From my previous question, if I consider a list like this:
$\{$$\{$$\{$$1,2,3$$\}$,$\{$$4,5,6$$\}$$\}$,
$\{$$\{$$1,2,4$$\}$,$\{$$3,5,6$$\}$$\}$,
$\{$$\{$$1,2,5$$\}$,$\{$$3,4,6$$\}$$\}$,
$\{$$\{$$1,2,6$...
7
votes
3
answers
245
views
Permutations with subsets not containing the same elements
I would like to define a function of two integer variables $ \{n, k\} $, with $ k | n $, that would print all the possible permutations of the first $ n$ positive integers, such that the subsets of $ ...
0
votes
0
answers
48
views
Arranging 4 identical items in 7 spots [closed]
There are 4 unique items, for the sake of the example call them balls. Each ball is exactly the same, and we need to see how many different ways those 4 balls can fit in those 7 slots.
I am not sure ...
1
vote
2
answers
208
views
Generating Lyndon words modulo mirroring operation and substituion
I have two letters A,B. I want to generate all words say up to length 22 with the following properties. There is no "canonical" list so any such list will suffice, though there are many ...
3
votes
1
answer
153
views
A code that returns the partial permutations on {1,2,...,n}
A partial permutation is a bijective partial function. A partial function is a map from a subset of {1,2,...,n} into {1,2,...,n}.
I want a list of the matrix representations of all the partial ...
4
votes
1
answer
246
views
Permutations with Repetition
I am working with a function of type
F[a,b,c,d,e,f]
that obeys the following symmetries:
...
1
vote
0
answers
68
views
How do I generate a random permutation of a (long [millions-length]) list of symbols? [closed]
I have a list of length twelve:
p = {t[1, 1], t[1, 2], t[1, 3], t[1, 4], t[2, 2], t[2, 3], t[2, 4],
t[1, 5], t[3, 3], t[3, 4], t[1, 6], t[4, 4]}
and a set of ...
4
votes
1
answer
177
views
Fast enumeration of all perfect matchings in complete graph
I have a code that generates the list with all possible Perfect Matchings (PM) of a fully connected graph. Each edge of the graph is mono or bi-colored with up to ...
3
votes
5
answers
830
views
Finding all Latin Squares of order 5
A Latin Square is a square of size n × n containing numbers 1 to n inclusive. Each number occurs once in each row and column.
An example of a 3 × 3 Latin Square is:
$$
\left(
\begin{array}{ccc}
1 &...
0
votes
1
answer
183
views
How to create all possible permutations? [closed]
there is a problem:
I have 5 letters - a,b,c,d,e and 20 places. I have to use each letter at least once but no more than 10 times. So the result can look like {a,a,a,a,a,a,a,a,a,a,b,b,b,b,b,b,b,c,d,e},...
2
votes
1
answer
232
views
How to generate all the combinations with repetition and another conditions? [duplicate]
I want to generate all the combinations with repetition for k variables with values from a set of n elements.
There are some ways, I like this formula, which I found on this forum (it is for n = 2 and ...
2
votes
1
answer
112
views
Splitting balls over sized bins
This is strongly related to Splitting a set of integers over a set of bins, but a much simpler case.
If we have $N$ indistinguishable balls and $k$ arbitrarily large distinguishable bins, we know the ...
6
votes
1
answer
125
views
Splitting a set of integers over a set of bins
I have a problem that feels like it should be simple but I'm just drawing a blank on. I've got a set of integers, e.g.
...