Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.

learn more… | top users | synonyms (2)

0
votes
0answers
57 views

Real Time graph animation [on hold]

I would like to use either Mathematica or SystemModeler to visually represent the dynamics of a simple railway circuit (closed one). This would be represented as a mathematical graph. I would like to ...
0
votes
0answers
37 views

Algorithm to equalize the area of random tessellation of various polygons [on hold]

I am looking for an algorithm that I can apply for a random tessellation of polygons with different areas. The algorithm can relax the geometry of the polygons to a condition that all of them would ...
6
votes
3answers
148 views

Different colors for nodes in tree plot

I have some list of numbers which I am plotting using TreePlot. This is the code: ...
3
votes
2answers
157 views

Horizontal Tree Layout? [duplicate]

I need to display arbitrary Expressions in TreeForm, but the standard vertical layout produces too many horizontally overlapping boxes. Am I doomed to rewriting ...
12
votes
3answers
345 views

Can TreeForm be displayed “sideways”?

One recurrent problem I'm having with displays generated with TreeForm is that the expressions to be so displayed often at least one level with many (> 20) nodes ...
18
votes
2answers
683 views

Graph layout on a grid

Is it possible for Mathematica to layout a graph so that the connections lie on a grid? Furthermore, for graphs with multiple edges per vertex, is it possible to specify the location on the vertex ...
0
votes
0answers
51 views

Graphplot doesn't connect vertices properly [on hold]

My problem is that the following: ...
0
votes
1answer
56 views

How do I upload a graph as an adjacency list and find the betweenness centrality?

I have an undirected simple graph in a .txt file formatted as an adjacency list like this: 100 200 200 300 300 400 500 600 700 800 900 ... Every number is a node ...
6
votes
4answers
2k views

How to generate and draw simple bipartite graphs?

A bipartite graph is a graph whose vertices can be divided into two disjoint sets. Given two lists: {1, 2, 3} and {x, y, z}, ...
1
vote
2answers
63 views

How to sort the adjecency matrix of bipartite graph so to have two off-diagonal blocks

In a bipartite graphs there are two class of nodes, say A and B. Each node of class A may interact only with nodes of the class B, and viceversa. The corresponding adjecency matrix is thus composed by ...
3
votes
1answer
331 views

Combinatorica Graph from Edge List

Can someone provide an example of a Combinatorica-based graph which uses ShowGraph and Graph and takes in an explicitly defined list of edges (not some auto-generated graph). I have not been able to ...
1
vote
1answer
48 views

How do I visualize the result of EdgeColoring[g]?

Combinatorica has a heuristic edge-coloring function EdgeColoring. When I execute it on a graph, the result is a list of integers. My guess is that an integer $i$ ...
1
vote
0answers
39 views

Why does Network`GraphPlot`wrapper appear in my GraphPlot?

I'm making a GraphPlot of data similar to this: ...
6
votes
0answers
71 views

HighlightGraph and Hyperlink

In the documentation of Mathematica it is mentioned that you can use Hyperlink and Tooltip as wrapper in a similar manner as ...
1
vote
1answer
59 views

How do I use Subgraph to sample the $n$ vertices of a graph with the greatest connectivity?

Let $G$ be an arbitrary graph with some number of vertices $||V||$ and some number of edges $||E||$. We can use Subgraph to generate, well, a subgraph of ...
0
votes
1answer
49 views

How to efficiently distinguish the rewired edges in WattsStrogatzGraphDistribution?

The WattsStrogatzGraphDistribution function is a way to construct random graphs based on Watts and Strogatz small world model. The ...
2
votes
1answer
80 views

Plotting Network with LayeredGraphPlot with specific order

I have a network and want to plot it. I use LayeredGraphPlot, and the network is described as: ...
7
votes
2answers
97 views

How can I recover a graph from a graphical output in a notebook after resetting the kernel?

I have an old Mathematica notebook with an output for a graph structure $G$ I would like to recover. However, the routine for building up the graph is stochastic, so I can't simply rerun the code. ...
2
votes
0answers
49 views

Can BreadthFirstScan be modified?

I would like to obtain a "slick" implementation of A*-search algorithm on Graph objects, using the built-in BreadthFirstScan (if that is possible at all). I noticed that BreadthFirstScan is static in ...
2
votes
1answer
46 views

Reversibly abstracting a list of strings as a graph object where vertices represent strings and edge connect pairs of strings based on various tests

Imagine I provide you a list of arbitrary strings, say: Map[StringJoin, Tuples[{"0", "1", "2"}, 4]]. I'd like to abstract these strings as a graph object in ...
1
vote
1answer
33 views

Check Specific Connections within Graph

Say you have the skeleton of a graph: fullSkele = PolyhedronData["GreatRhombicosidodecahedron", "SkeletonRules"] and you've an arbitrary list of some fraction of ...
2
votes
2answers
91 views

How to make a recursive code from this iterative code? (drawing tree graph)

I have a question about drawing tree graph. I use my iterative code to build a tree graph. Here it is. ...
0
votes
0answers
37 views

Get correlation matrix when using FindGraphCommunities

Does somebody know how to get the correlation matrix when using FindGraphCommunities (Social Network analysis) using the "Spectra" option? Can somebody tell me as ...
0
votes
1answer
60 views

Social Network Analysis - Get the List of InBoundEdges for Directed Graph

I wish to get the list of inwards edges for a node. IncidenceList provides both inwards and outwards list. I can of course filter with ...
5
votes
3answers
230 views

Fast code to generate large random graph with fixed degree sequence

I'm trying to create a function so to generate large random graph with a fixed degree sequence $\{v_1,v_2,\dots,v_N\}$, where $N$ is the number of vertices in the graph. The Mathematica function that ...
3
votes
1answer
123 views

Social Network Analysis - Get the End Points of an Edge

I want to get the end points of an Edge of a Graph. For example see the following source, ...
0
votes
1answer
69 views
4
votes
1answer
81 views

Katz Centrality [closed]

I want to calculate the Katz Centrality of large graphs. The Mathematica command to do that is KatzCentrality[g, $\alpha$] and it is also fast. However I realized that there is a mismatch between ...
0
votes
1answer
98 views

Display a labeled multigraph

Despite the integration of graphs and networks, multigraphs are not supported in Mathematica 8+. In Mathematica 9+, GraphPlot misbehaves for multigraphs having ...
6
votes
1answer
161 views

Generating a (random) 2-dimensional cellular network

I want to generate a network of random cells like the following picture: The general idea is to generate some random points (x,y) as coordinate of a vertex and then randomly choose some of these ...
2
votes
0answers
75 views

Finding rings in a network

I am doing a research on networks which consist of polygons with different number of sides. Is there a way to find rings by BreadthFirstScan function. For ...
3
votes
1answer
127 views

Writing results directly to file

I am trying to find all simple paths in a large directed graph (542 vertex, density ~ 5%) between two nodes. For this purpose, I use the algorithm from this thread. Unfortunately, my computer is ...
6
votes
2answers
169 views

Flow/graph-based programming in Mathematica?

Is it possible in Mathematica to write a program inside a graph? For example if you have a bunch of different If[] statements that you need to embed within one ...
1
vote
1answer
47 views

Extracting a single weakly connected component from a network of many weakly connected components?

Hello Mathematica friends! I've got a network with thousands of edges and vertices, but not all in one connected component. I'm trying to extract specific connected components from the network, and ...
1
vote
0answers
94 views

How to make Layer Directed Graphs (LDG) in mathematica?

I am wondering if I can make a graph like that somehow: I am new to mathematica, I tried to play with Creating a graph with variable size of vertices and variable thickness of edges . I figured if I ...
2
votes
0answers
270 views

Why my Mathematica 9.0.1 wont work with some samples of Mathematica in Graph Theory?

I updated my Mathematica recently to 9.0.1 cause the previous version was giving me freaky result especially in FindMinimumCostFlow and ...
7
votes
1answer
414 views

How can I display a multigraph with different colored edges?

I'm new to Mathematica(version 9) and I'm trying to display a multigraph with different colored edges. Here's my code so far: ...
2
votes
1answer
119 views

Using EdgeList on a once empty Graph crashes the kernel

Note: this is fixed in version 9. Calling EdgeList on a non-empty graph which was previously empty causes the math kernel to crash. For example, ...
15
votes
1answer
674 views

How to export and import Graphs with additional data?

I'm trying to export and then later import graphs with additional data added such as VertexLabels and EdgeLabels. When I export ...
1
vote
1answer
55 views

How to import and visualize a network stored as an edge list in CSV file? [closed]

I'm extremely new to Mathematica, and I'm trying to import an edgelist representing a network, but I think I'm missing something major. Here is my process so far just to import and visualize the ...
0
votes
0answers
49 views

Show dynamic graph and plot together [on hold]

I have a following code (sorry for the czech comments, if you wish, I can edit them to english) - it's an exercise for a monte carlo method lesson: ...
4
votes
1answer
151 views

Analysis of Facebook group

I am the admin of a Facebook group for our year at university and wanted to graph the members of the group like you can with your own friends so we can find the isolated people and get rid of them (as ...
6
votes
3answers
163 views

Enumerate the 1-factors (perfect matchings) of $K_n$

Introduction I would like to enumerate the 1-factors, or (near-)perfect matchings, of the complete graph Kn. The adjacency list representation for Kn is basically { (x, y) | 1 ≤ x < y ≤ n }. For ...
4
votes
2answers
144 views

Nested list to graph

The following nested list can be regarded as a representation of a (tree) graph: ...
3
votes
1answer
488 views

Combinatorica vs Built-in functions: Use of MinimumSpanningTree

What kind of argument is expected by MinimumSpanningTree (from the package Combinatorica`)? Is it possible that I am providing ...
4
votes
1answer
49 views
2
votes
1answer
296 views

GraphPath: *all* shortest paths for 2 vertices, edge lengths negative

Mathematica uses Bellman-Ford to find a shortest path between two vertices when the edge lengths are negative: ...
3
votes
1answer
947 views

How can I draw the transition diagram of a Markov chain?

I apologize for my heaviness as I am a Mathematica novice. Is there a kind soul who can tell me how to draw diagrams like those shown on page 158, 160 and 161 of this document.Chaine de Markov I ...
1
vote
1answer
84 views

Connecting a vertex to middle of an edge with GraphPlot?

using GraphPlot I'd like to make directed arrow connecting a vertex (node) to the middle of an edge but couldn't find a way. Is this even possible using GraphPlot or other graphics-related commands in ...