# Questions tagged [combinatorics]

Questions on the use of Mathematica in combinatorics, including the Combinatorica add-on package.

122 questions
Filter by
Sorted by
Tagged with
4 votes
3 answers
361 views

### Permutation count for sets with multiplicities

I am able to do a permutation counr for the set {a, a, b} which gives me 3 groups. I am happy with that result. However, if the set is ...
4 votes
3 answers
232 views

### Finding specific compositions of an Integer

I need to find all compositions of an integer L wherein all parts do not exсeed l and parts less then l cound not be neighbor. Here is my code ...
• 3,407
4 votes
2 answers
368 views

### How to correctly enumerate all the schemes of this cube coloring problem?

This problem is the fifth question of 1996 Chinese High School Mathematics League or Chinese Mathematical Olympiad in Senior: Choose several colors from the given six different colors to dye six faces ...
4 votes
2 answers
595 views

### Partition a range of integers into triples

Some time ago, I was asked to look at a simple to formulate puzzle. Consider the list of numbers {1,2, ..., 33}. Try to split this list in 11 triples, such that in ...
• 9,949
3 votes
3 answers
260 views

### Permutations on elements a>b && b>c

A={1, 2, 3, 4, 5} Permutations[A, {3}] I need to print all permutations where the first number is bigger than the second and the second number is bigger than the ...
3 votes
0 answers
95 views

### Listing all combinations produced by picking one element from each of several sets [duplicate]

I have a problem like this, I am given the following sets {a,b,c}, {d,e,f}, {h,i,j}. I want to pick one element from each set, and output a list of all the ...
• 131
3 votes
1 answer
216 views

### NextKSizePartition, or how to partition a set into subsets of size $k$ but incrementally

This question might seem very much like the linked one below but it differs in a very special way; Mr.Wizard suggested I start a new post: Partition a set into subsets of size $k$ What I want is to ...
• 617
3 votes
3 answers
188 views

### How to delete duplicate graphics of the same kind?

A054247: Number of n X n binary matrices under action of dihedral group of the square D_4. ...
3 votes
2 answers
95 views

### Generating representatives of rotation classes of tuples of ones and zeros with a fixed number of ones

In a related question I asked how to generate all the tuples of ones and zeroes with a fixed number of ones (generating tuples of ones and zeroes with a fixed number of ones). I wish to consider a ...
• 617
3 votes
1 answer
160 views

### Recursive solution to the extended Josephus problem [duplicate]

The Josephus Problem is described here, with extension of killing every $k$th problem. In the simple case where every other person is killed, we can also use the binary trick. ...
• 1,416
3 votes
2 answers
314 views

### Generating invertible matrix with lines within a given set

Consider the set options given as below ...
• 578
2 votes
1 answer
635 views

• 359
1 vote
1 answer
570 views

### How do I upload a graph as an adjacency list and find the betweenness centrality?

I have an undirected simple graph in a .txt file formatted as an adjacency list like this: 100 200 200 300 300 400 500 600 700 800 900 ... Every number is a node ...
• 23
1 vote
3 answers
308 views

### How to use Mathematica to solve this problem of planting tree

To plant trees at the center of each small square in a 3 * 4 rectangular area, it is required that there should be no continuous number of three (or more) trees in three directions of Horizontal, ...