Skip to main content

Questions tagged [combinatorics]

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

33 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
165 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
78 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
119 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
  • 19.1k
4 votes
0 answers
134 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
104 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
161 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
  • 363
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
47 views

NextSetPartition

I'm looking for a function similar to the one in the question below, but for the more general problem of set partitions without restricting the set size. NextKSizePartition, or how to partition a set ...
David's user avatar
  • 159
2 votes
0 answers
67 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
  • 31
2 votes
0 answers
113 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
456 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
682 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
41 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
  • 47k
1 vote
0 answers
82 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
75 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
107 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
149 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(...
Milk's user avatar
  • 1,718
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
63 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
95 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
35 views

Writing list as disjoint union of input lists

Suppose I have two lists, s1={{1,2,3},{3,1,2},{3,1,2},{2,3,1},{3,2,1},{1,3,2}} and ...
Tanatofobico's user avatar
0 votes
0 answers
26 views

Nonintersecting lattice paths with given start and endpoints

A prominent topic in combinatorics is the enumeration of nonintersecting lattice paths subject to certain conditions. My goal is fairly simple: given starting points $(1,1), (2,1), \ldots, (k,1)$ and ...
WQE's user avatar
  • 65
0 votes
0 answers
50 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,343
0 votes
0 answers
70 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
  • 47k
0 votes
0 answers
141 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
56 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,394
0 votes
0 answers
109 views

Combinatorica and MultiplicationTable in Mathematica 11

I try to use <<Combinatorica` or call IntervalSlider; Needs["Combinatorica`"] or call ...
wonderich's user avatar
  • 923
0 votes
0 answers
93 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,336
0 votes
0 answers
176 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