Questions tagged [combinatorics]

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

31 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
164 views

Number of 4-colorings of Johnson solids

I want to know the number of 4-colorings for all Johnson solids. This is equivalent to evaluating the flow polynomial for the corresponding polyhedral graphs at $k=4$. I tried the following to get ...
nasosev's user avatar
  • 415
5 votes
0 answers
219 views

Visualising a 1-(50,15,15) design

The problem I have is the visualisation of a $1-(50,15,15)$ design. That is a set of $50$ points and $50$ blocks (lines), so that each point is on $15$ lines, and each line contains $15$ points. My ...
user32681's user avatar
4 votes
0 answers
70 views

Can FindMinimumCostFlow be trusted?

So, I recently began to use graphs algorithms in Mathematica notebooks to solve an unbalanced assignment problem. After running the algorithm, I wanted to check that the total flow was equal to the ...
WaterFox's user avatar
  • 185
4 votes
0 answers
113 views

Finding a large clique of an impractically large generalised Kneser graph

My original problem statement is simple. Find a maximal clique of $k$-length subsets of of a set of $n$ items, clique members sharing at most $s$ items with any other. This is the maximal clique of a ...
kirma's user avatar
  • 18.7k
4 votes
0 answers
111 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.) ...
zjs's user avatar
  • 153
4 votes
0 answers
107 views

BipartiteMatching hangs with floating-point weights in Mathematica 7 (package Combinatorica)

I am trying to use Combinatorica's BipartiteMatching algorithm on a weighted graph. I need to use real numbers as weights. If I try the following ...
user avatar
3 votes
0 answers
102 views

Package like combinat

I started using Mathematica and want to do some computation involving Characters of the symmetric group. In maple, I used to use the package combinat. The link is below https://www.maplesoft.com/...
GGT's user avatar
  • 151
3 votes
0 answers
158 views

Combinatorial Optimization of NFL Games

This is a "fun" optimization problem that was prompted by an NFL betting pool. Each week you pick one team to win. If that team wins you stay in the game. If it loses you're out. The catch is that ...
EricMock's user avatar
  • 291
3 votes
0 answers
89 views

Generating All Regular Multigraphs -- Issue with Solve and/or FindInstance

I'm looking to generate all regular multi-graphs over $n$ vertexes and of degree $d$ in mathematica (side note: $n,d$ are fairly small, this problem gets unmanagable very fast). So here $n,d$ are my ...
Hamed's user avatar
  • 337
2 votes
0 answers
112 views

Is there a minor bug in Neal Alexander's TopologicalSortAll[]?

There is an amazing answer to this question: All possible topological orderings of a graph By Neal Alexander. However, as user "dark blue" (I am not this user) notes: ...
Pedestrian's user avatar
2 votes
0 answers
91 views

The number of real values assumed by combinations of complex roots of a decic

Define complex conjugate as the pair of complex numbers $a+bi,a-bi$. Assume you have 5 such pairs and they are the 10 roots $x_i$ of a 10th-deg equation with integer coefficients. In general, how many ...
Tito Piezas III's user avatar
2 votes
0 answers
454 views

Get path to end nodes in directed (partially cyclic) graph

I have a large directed graph containing small loops. I would like to extract all paths to all end nodes (no VertexOutComponent) with a given path length $n$. I ...
32u-nd's user avatar
  • 963
2 votes
0 answers
675 views

Generating a function which outputs possible chemical reactions

I want to make a list of chemical reactions and I write them down in a $\require{mhchem}\LaTeX$ format. They are of the following form $$NA_n^i+MB_m^j \rightarrow \hat NA_{\hat n}^{\hat i}+\hat MA_{\...
Nikolaj-K's user avatar
  • 1,485
1 vote
0 answers
91 views

How to generate a list of Langfor pairings?

I am wondering how to make a function that makes a list of Langford pairings named LangfordPairings that takes an integer n as output and if Langford pairings exist for that number, they output the ...
Peter Burbery's user avatar
1 vote
0 answers
38 views

Sequence reconstruction from ordered subsamples

Given a sequence (we'll assume of integers) like seq = {1, 0, 0, 1, 2, 0, 1} I can take a random permutation ...
b3m2a1's user avatar
  • 46.6k
1 vote
0 answers
52 views

Enumerating labeled graphs on n vertices

I'm trying to enumerate the labeled graphs on $n$ vertices having at most $e$ edges. I thought GraphData /@ GraphData[n] and then filtering by edge count would do ...
Maruney's user avatar
  • 21
1 vote
0 answers
79 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 ...
Epsilon's user avatar
  • 1,122
1 vote
0 answers
61 views

Custom Table, for iterating over permutations

It is common that I iterate over all permutations of 1,2...,n, either by making a table or performing a sum. Instead of creating the set of all permutations, it would be better to iterate over them. ...
Per Alexandersson's user avatar
1 vote
0 answers
101 views

How to find maximal determinant of a 5×5 or 6×6 matrix using the integers 1 to $n^2$ quickly

This code can only solve the 3 * 3 matrix: ...
A little mouse on the pampas's user avatar
1 vote
0 answers
147 views

Is there a way to predict permutations that consist of sets?

SequencePredict is a function that predicts the next value from the arranged data. But I want to use the data for the combination to predict the next combination(...
Hoony's user avatar
  • 1,460
1 vote
0 answers
42 views

Permute using symmetric vs alternating groups

Why does this happen? Permute[{0, 0, 0}, SymmetricGroup[3]] (* {{0, 0, 0}} *) Permute[{0, 0, 0}, AlternatingGroup[3]] (* {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} *)
user63582's user avatar
1 vote
0 answers
62 views

Alternative Methods of Using Cumulative Density Functions To Obtain Probabilities

I have a CDF that is generated from the subtraction of two arrays as part of a minimization procedure. A consequence is that events in the simulation can cause the subtracted total to be less than 0: ...
aiwass's user avatar
  • 63
1 vote
0 answers
91 views

Finding correct combination of functions

I am trying to write code where I have an array $S$ or numbers in any order [5,4,2,1,....] Then I have a specific set of functions that I can write. ...
Stephen Hill's user avatar
0 votes
0 answers
42 views

Convex hull aborts kernels (reproducible)

11.0.0 for Microsoft Windows (64-bit) (July 28, 2016) ReleaseID -> "11.0.0.0 (5570737, 2016072801) a set of 32 points : ...
Wouter's user avatar
  • 1,333
0 votes
0 answers
52 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 ...
David D.'s user avatar
  • 101
0 votes
0 answers
46 views

Climbing/Descending the Multidimensional Integer Ladder

This is basically a follow-up to Climbing/Descending the Integer Ladder, but in multiple dimensions. It's basically just an index counting problem, but combinatoric blow-up makes it interesting. In ...
b3m2a1's user avatar
  • 46.6k
0 votes
0 answers
135 views

Symbolic Subset Sum Problem

I am interested in solving the following problem with Mathematica, but I do not know if it can be done or how it could be done. Given a finite set of terms $M=\{a_i(p_1, \ldots,p_m) \}_{i=1}^n$, ...
mbpaulus's user avatar
  • 101
0 votes
0 answers
55 views

Triangulations of a convex polygon

I have a piece of code which finds all triangulations of a convex polygon. It is known that a number of such triangulations for a given $n$-gon is is given by ($n-2$)th Catalan Number, so for instance,...
amator2357's user avatar
  • 1,294
0 votes
0 answers
104 views

Combinatorica and MultiplicationTable in Mathematica 11

I try to use <<Combinatorica` or call IntervalSlider; Needs["Combinatorica`"] or call ...
wonderich's user avatar
  • 903
0 votes
0 answers
92 views

Why does a linear change of variable in a double sum enable Mathematica to obtain a symbolic answer?

I perform two equivalent sums. Mathematica returns a symbolic expression in one case but not the other. Shouldn't Mathematica be able to do either sum? First sum ...
JEP's user avatar
  • 1,326
0 votes
0 answers
172 views

Tuples with restrictions

SHORT VERSION Given 2t Ranges, each of length len, what is the fastest way of finding the ...
Marius Ladegård Meyer's user avatar