# Questions tagged [combinatorics]

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

350 questions
Filter by
Sorted by
Tagged with
113 views

### How to generate the lists of $0 \leq m \leq X$ integer values so these values add up to $X$

This must be basic, but my Mathematica (and overall programming) skill level is too low to find a handy solution: I need to generate all possible lists of $m$ integers (I call these integers $x_i$'s, ...
289 views

### Find k smallest sum n-tuples

Given a collection of sorted lists {l1, l2, ...} I need to find the smallest k index tuples taken from these lists by summed ...
42 views

### Simpifying expressions with binomial coefficients

I wrote: Simplify[Binomial[n, k] - Binomial[n - 1, k]] I expected Mathematica to simplify this according to Pascal's identity to: ...
207 views

### All adjacency matrices of size n

What would be a concise way to get all adjacency matrices of size $n$, e.g. for $n=2$, these $(2^2)^2$ matrices: ...
65 views

### Selecting special tuples from a big list, and dealing with memory limitations

OK, I'm working on some music theory stuff since that's my hobby. This is what I want to do: ...
178 views

### Testing for Symmetry and Regularity in (Graph-Theoretic) Graphs

I know my way around Mathematica pretty well, however I have not been able to find any built-in functionality for testing a (graph-theoretic) graph for being symmetric (arc transitive) – this is the ...
426 views

### How to generate all involutive permutations?

Take a finite set $S$ (i.e., a list). An involutive permutation is one that squares to the identity. How can we generate all such permutations efficiently, that is, without generating all permutations ...
187 views

### Pattern for k distinct elements of a set of n elements

I would like a pattern which takes as an argument a set with $n$ elements, and an integer $k$ which is less than $n$ and greater than 1, and which matches against any $k$ distinct elements of the set, ...
46 views

### Generating list of binomial outcomes [closed]

As an example, imagine if I have a set of 3 coins and I want to generate a list of possible coin states. I know I can brutishly execute: ...
251 views