# Questions tagged [combinatorics]

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

451 questions
Filter by
Sorted by
Tagged with
22 views

### Building and Plotting a discrete CDF

I'm trying to plot the CDF of a simple "nCr" experiment: A box contains 4 screws and 6 nails. Two items are drawn at random without replacement. Let X be the number of nails drawn. I built a ...
2k views

### Cyclic and Non-cyclic Permutations

Mathematica has a built in function to generate all permutations of a given list of elements; Permutations I can't find an equivalent function to generate cyclic ...
53 views

### Code in Mathematica is not running [closed]

I have a question regarding my code in Mathematica. In the beginning when I tried to run my code it worked but then after I closed it and come back to do the same code but with different number it did ...
69 views

### Producing a random Wang Tile tiling image more efficiently

I'm following along with this SIGGRAPH 2006 paper Recursive Wang Tiles for Real-Time Blue Noise - there's a video here too. Eventually I want to try to produce the blue noise results in the paper, and ...
105 views

### Permutations with Repetition

I am working with a function of type F[a,b,c,d,e,f] that obeys the following symmetries: ...
49 views

### Conditional Statement and Loop in Mathematica to find bound

I have a question regarding loop and conditional statements. I have an equation where I would like to find the bound for n and m based on the value of h. Here is what I have so far; ...
295 views

### Construct a permutation tree plot

How to construct a tree like this? I was looking CompleteKaryTree initially, there are some similarities overall, but it's still different. ...
53 views

### Triangulation of Point Configuration

I was going through the documentation of Mathematica but couldn't find any built-in function that can find all possible triangulations for a given set of points. For example, if I have the following ...
135 views

...
62 views

### Matroids in Mathematica?

I can't seem to find a "standard" way to implement/manipulate matroids in Mathematica. (They do not seem to be included in Combinatorica, for instance, and googling has turned up nothing.) ...
3k views

### Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$

Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$. Looks like a question for pupils, right? In fact, if the available math symbols are limited to addition ($+$), ...
237 views

### StableMarriage vs. FindIndependendEdgeSet: How to use the procedure FindIndependendEdgeSet as a Gale-Shapley algorithm?

From Help, the procedure StableMarriage was an element of the Combinatorica, but it is available in the built-in ...
131 views

### Find different combinations of 3 lists with given constraints

My inputs are 3 lists of unequal length: A={a,b,c,d} B={i,j,k} C={v,w,x,y,z} And I want to find the combine set X which looks like ...
305 views

### Partition a nested list such that no repeated elements in every subsets?

I have a large list and for simplicity, let's take the simple list as an example: lists = {{1, 2}, {1, 6}, {2, 3}, {2, 5}, {3, 4}, {3, 6}, {4, 5}, {5, 6}} I would ...
514 views

### Equivalent Nested Loop Structure (combinations_with_replacement)

Consider the following examples: ...
54 views

### Enumerate all possible subsets such that all are of the same length which is maximum and each contains non-repeating elements?

Given a list lists: ...
47 views

### Extract only a few coefficients of the multiple of extremely many polynomials

I want to extract some informations, say the coefficients of $x^{500}$ and $x^{1000}$ terms (numerical values are acceptable), of the multiple of ...
45 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 ...
53 views

### Construct all possible 3-letter words from A,B. Repetition of letters is allowed [closed]

I have two letters A and B. I need to construct all possible 3-letter words. Repetition of letters is allowed. I know that the answer to this problem is 2^3=8. But ...
123 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 ...
294 views

111 views

### List manipulation: Find duplicates with respect to symmetry in sublists

I have the following list ...
I have a system which is composed of the following blocks $$[-,+],[+,+],[+,-],[-,-]$$ I can compose a system of $n$ blocks with the only rule that the edges act as a dipole. for example [-,+][-,+][-,...