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)

1
vote
1answer
68 views

Constructing an I-graph

I am attempting to build I-graphs in MMA, i.e. the non-Generalized Petersen graphs, and I found some code from Eric Weisstein, but this is now outdated and doesn't run. I have attempted to switch the ...
3
votes
2answers
194 views

Test if directed graph is connected

Is there a simple built-in way to check if a directed graph is connected? Now, before you throw ConnectedGraphQ or ...
3
votes
0answers
156 views

How can I scrape the social network for a subset of users in Twitter?

Clearly one cannot scrawl the entire network... but I'd like to extract a statistically representative sample from the network. More specifically, I'd like to access the graph induced by scraping the ...
0
votes
1answer
127 views

Displaying a bipartite graph in Wolfram Mathematica

Which is the function that can plot me the bipartite graph $K_{7, 2}$ in Mathematica? And after that to delete 2 edges?? Thanks for the help.
4
votes
2answers
135 views

Limit FindMinimumCostFlow function to one vertex per path

I want find a set of paths through a graph that maximise flow and minimise cost set on each Edge. However, I have an additional constraint where each Vertex can only be visited once. Mathematica has ...
1
vote
2answers
94 views

Find all perfect matchings of a Graph

I'm trying to find all perfect matchings for some bipartite graphs. For example ...
5
votes
1answer
80 views
5
votes
2answers
105 views
8
votes
3answers
394 views

How to remove all dead ends from a undirected graph?

so what I want to do is take an undirected graph, and remove all the "dead ends" (that is, vertices that are attached to only one other vertex), but do it in such a way that it does it until reaches ...
0
votes
1answer
85 views

Cannot find a way to display an adjacency matrix [closed]

I have a question about face adjacency graphs. Suppose that I have an adjacency matrix How can I plot something like this?? I tried and it looks too messy. What may be the resulting graphic? Thank ...
1
vote
1answer
52 views

Graph Edit Distance with Mathematica?

Is there any way to calculate similarity of graphs or the graph edit distance in Mathematica ?
2
votes
0answers
38 views

Custom graph distribution

I am working with random graphs a lot. It's quite easy to describe random graph using, adjacency matrix or just a list of edges. However I am thinking that I might benefit from describing random ...
1
vote
1answer
72 views

Finding adjacency matrix of a Mathematica's in-built graph? [closed]

I want to get the adjacency matrix of an in-built graph, say the dodecahedral graph. Naively using AdjacencyMatrix[Dodecahedral] doesn't give it to me. Any ...
1
vote
0answers
30 views

ConnectedComponents problem of syntactic structure

In Mathematica 10, ConnectedComponent computes the list of vertices belonging to strongly connected components. In the following simple example with a graph with no edges, the result is as follows: ...
1
vote
0answers
68 views

Twilight Zelda Guardian Puzzle : Shortest Path Proof [closed]

I'm playing a video game right now and in it is a puzzle (see here). There are solutions to solving it (see here) on the Internet, but I'd like to know if this path is the shortest path (least amount ...
2
votes
1answer
47 views

Logic behind Graph[edges, VertexLabels -> “Name”]?

I find VertexLabels -> "Name" a strange setting to achieve graph nodes labeled by their index: ...
9
votes
4answers
277 views

Multiple Forms of Transportation Between Cities

I want to be able to show different connections between cities based on modes of transportation. For instance, you could walk to any city, but it would take a long time, you could take a train, but ...
1
vote
0answers
31 views

DataRange not working in GraphPlot

I am trying to create a a GUI that uses the GraphPlot function to automatically generate graph vertices. I am using the VertexCoordinateRules option to designate that I want some of the vertices to be ...
7
votes
1answer
208 views

How to set the Y coordinates for a Graph with defined X coordinates to prevent overlap of nodes?

I would like to draw a Graph with defined $x$ coordinates and variable node sizes. If I simply replace the $x$ coordinates of a graph, then nodes can overlap and ...
1
vote
1answer
155 views

Getting coordinates of a embedded graph [closed]

I have to show how spring embedding works by displaying step-by-step images of a GridGraph[10x10] being embedded from a initial circular form to the final form, which should look somewhat like this: ...
0
votes
1answer
70 views

Import mixed graph from Excel

I am new to Mathematica. I want to use the software as it allows analysis of mixed graphs (directed and undirected edges). I have my network as an Excel spreadsheet of three columns: source, target ...
2
votes
1answer
101 views

Plot a tripartite Graph with its groups separated

I would like to create a Graph like the following: but without edges between vertices in the same group. so I have a graph and I want to plot it such that its ...
4
votes
2answers
208 views

Using GraphData to generate all directed graphs with n vertices

Using Combinatorica, it was possible to generate unlabeled (non-isomorphic) directed graphs of $|V|=n$. Here the example is for $n=4$: ...
0
votes
2answers
62 views

Question RE DiscreteMarkovProcess Graph Labels

I'm trying to label the arc's of my Markov chain with symbols like $\alpha$, $\beta$, etc., to show how the Markov chain looks abstractly. So, I did this... ...
-3
votes
1answer
74 views
6
votes
2answers
409 views

Don't understand why Mathematica is complaining about my Graph expression; how can I fix it?

The Tube in Arrow problem is fixed in version 10. Note that in version 10 Graph3D must be ...
8
votes
2answers
342 views

Finding All Chordless Simple Cycles In A Graph

I am doing a research on networks which consists of polygons with different number of sides. I am trying to find all simple cycles in a network which are chordless. As an example, consider the ...
3
votes
2answers
123 views

How to create a recursive TreeGraph

How could I create a recursive tree graph, such as one defined by the following: A family of trees $T_n$ are defined recursively as follows, for all integers $n \ge 1$. The tree $T_1$ consists of a ...
2
votes
3answers
159 views

How can I get from a list of characters representing a permutation to graphics showing the cycles?

I am trying to graphically represent cycles in various permutations of the alphabet, and have a question in two parts. I have ...
1
vote
0answers
67 views

Better layout for large a directed graph?

This shows a directed graph for an iterated n-bit pseudo-random function parameterized by s. ...
8
votes
2answers
3k views

How to find the Shortest Path, visiting ALL vertices, without coming back to the start (Hamiltonian Path, minimum distance)

A car has to pick up each person and take them to their destination. I am trying to find the shortest tour that will do this. How can I find the shortest path between any s and t.... visiting all ...
0
votes
1answer
72 views

How to input an adjacency list?

I am a beginner user of Mathematica, and I have an assignment to construct a graph given n (number of vertices) and an adjacency list. My idea was to make a For cycle that repeats n times, and for ...
1
vote
0answers
60 views

Better control of vertex positions in GraphPlot?

I am trying to graphically visualize a sort of a transformation network. My program generates a list of vertices and edges and I want to turn that into a visually clear graph fulfilling a few ...
2
votes
0answers
43 views

Replicate CommunityGraphPlot as a Graph

Is it possible to format a Graph object in a similar way to CommunityGraphPlot, but retain it as a Graph? I've been playing with FindGraphCommunities but I'm obviously missing some of the ...
0
votes
0answers
22 views

How to make the vertices move with the VertexRenderingFunction graphics when clicking and dragging vertices of a layered graph [duplicate]

I have read the suggested similar question here: VertexRenderingFunction (or EdgeRenderingFunction) with movable nodes? and Mr. Wizard's solution. Please could someone help me to apply his method to ...
0
votes
1answer
80 views

Import GEXF graphs into Mathematica?

Is there any smart way to import gephi graphs (*.gexf) into mathematica ? I mean other than converting to *.gml.
3
votes
0answers
49 views

Undocumented options for “BalloonEmbedding” in GraphLayout

From an error message, I see some options of the BalloonEmbedding method for GraphLayout: ...
1
vote
1answer
47 views

Adding a title to TreePlot

This is a basic question I am sure, but cannot seem to find the answer in the documentation. Does anyone know how to add a title to a TreePlot?
5
votes
1answer
318 views

How can I compute the chromatic index and number of a graph?

I saw a recent question from M.R. and realized there is no function to compute the chromatic index and number of a graph, other than a really slow method in the now deprecated Combinatorica. So, how ...
1
vote
2answers
86 views
0
votes
0answers
40 views

Is it possible to visually edit a graph?

Given a graph, obtained by something like CompleteGraph[5], can I somehow add/remove edges/vertices visually? Or is the only alternative to transform it via ...
1
vote
2answers
60 views

How can I construct a random graph, which is created by adding orientation to a complete graph?

Given a complete graph on N vertices, how can I randomly orient all of its edges? I thought about starting out with CompleteGraph[n], and then somehow transforming ...
2
votes
2answers
221 views

Can I solve this graph theory problem with Mathematica?

Internet browsing I came across this problem, as can be solved using Mathematica. Edit: The image says: Place the following numbers 1,2,3,4,5,6,7 in the following diagram (all), without repeating any ...
1
vote
1answer
70 views

Export and Import a list of graphs?

I want to export a list of graphs that come as output to my program. However, I tried exporting all the graphs as graphs using Map and an Export statement with "graph.gml" statement, but got an error. ...
1
vote
1answer
78 views

VertexLabels, EdgeLabels and the direction of the arrows on a directed graph

I want to have three network types. My plan is to put them together in a figure file via marking them with (a) (b) and (c). The figures that I want to have, have some problems. Here is my code ...
1
vote
1answer
61 views

Is there a way to combine VertexLabeling->True and VertexLabels/Tooltip in TreePlot?

Basically, I'm trying to make Mathematica give me a tree with names inside the rectangles like so: ...while also having the properties of VertexLabels or Tooltip, which lets me place my mouse over ...