We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [combinatorics]

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

22 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
117 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 ...
6
votes
0answers
125 views

how to efficiently generate all directed graphs with 6 vertices

I am attempting to generate all non-isomorphic directed graphs with 6 vertices using command ListGraphs[6, Directed].But it does not work efficiently and takes a ...
5
votes
0answers
152 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 ...
5
votes
0answers
214 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 ...
4
votes
2answers
248 views

Scramble matrix under some condition

Assume I have a matrix. (mat = Partition[Range@9, 3]) // MatrixForm mat$=\left( \begin{array}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & ...
4
votes
0answers
105 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 ...
3
votes
0answers
94 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/...
3
votes
0answers
113 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 ...
3
votes
0answers
80 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 ...
2
votes
0answers
107 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: ...
2
votes
0answers
88 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 ...
2
votes
0answers
425 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 ...
2
votes
0answers
625 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_{\...
1
vote
0answers
39 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}} *)
1
vote
0answers
57 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: ...
1
vote
0answers
80 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. ...
0
votes
0answers
33 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,...
0
votes
0answers
47 views

Combinatorica and MultiplicationTable in Mathematica 11

I try to use <<Combinatorica` or call IntervalSlider; Needs["Combinatorica`"] or call ...
0
votes
0answers
81 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 ...
0
votes
0answers
405 views

Splitting a list into 2 sublists in all possible ways

I have a list and I want to split it into 2 sublists in all possible ways If S={1,2,3,4} I should get ...
0
votes
0answers
118 views

Tuples with restrictions

SHORT VERSION Given 2t Ranges, each of length len, what is the fastest way of finding the ...
0
votes
0answers
97 views

Enumerating all orientations of an undirected graph

Given an undirected graph $G$, an orientation of $G$ is a directed graph obtained by assigning every edge a direction, a superorientation of $G$ is a directed graph obtained by orienting every edge in ...