# Tagged Questions

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

81 views

### Why are SetProperty and PropertyValue not working here?

I have a very simple graph, a loop: ...
116 views

### How to manipulate graphs without losing properties like EdgeWeight?

Let's say I have a weighted graph, ...
404 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 ...
144 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 ...
89 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 ...
53 views

### Graph Edit Distance with Mathematica?

Is there any way to calculate similarity of graphs or the graph edit distance in Mathematica ?
39 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 ...
80 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 ...
201 views

### How to generate a random flow graph?

A flow graph is a rooted directed graph that the root reaches all other vertices. I need to generate a random flow graph in Mathematica. My idea is to use ...
34 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: ...
69 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 ...
52 views

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

I find VertexLabels -> "Name" a strange setting to achieve graph nodes labeled by their index: ...
87 views

### Can Mathematica draw networks with nodes having multiple layers?

Some example networks like this:
32 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 ...
163 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 ...
166 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: ...
72 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 ...
105 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 ...
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... ...
75 views

### How to draw phase portrait graph for nine system of differential equations in mathematica? Can have a code for darwing this? [closed]

The differential equations for the transmission dynamics of HIV/AIDS are given as follows: ...
128 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 ...
159 views

I am using ...
161 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 ...
68 views

### Better layout for large a directed graph?

This shows a directed graph for an iterated n-bit pseudo-random function parameterized by s. ...
243 views

### Relaxation of Mass-Spring System with Pinned Masses

Problem Assume that four masses are connected to each other by springs while two of them are pinned down at their initial positions. Find the position of masses when system is at its minimum ...
83 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 ...
65 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 ...
45 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 ...
23 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 ...
49 views

### Undocumented options for “BalloonEmbedding” in GraphLayout

From an error message, I see some options of the BalloonEmbedding method for GraphLayout: ...
71 views

### How substitute an AbsolutePoint for a car drawing or car icon?

$CAR$ ...
86 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.
212 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 ...
96 views

### Find all perfect matchings of a Graph

I'm trying to find all perfect matchings for some bipartite graphs. For example ...
41 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 ...
87 views

### Graph: ordered vertices

I have tried things like ...
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 ...
228 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 ...
86 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 ...
110 views

### Draw mesh edge / map a graph to a mesh

I am doing a "force density" method to generate a mesh under certain load. The original mesh is like this: Then, I generate a IncidenceMatrix from the graph for further matrix transformation and ...
446 views

### Something interesting about Pi, but something seems amiss

I saw something interesting about text-analysis - bigrams - in Basic Text Analysis in Mathematica I wondered how the bigrams of Pi's digits might appear. As expected, take enough terms and every ...
60 views

### Successive addition or deletion of vertices (or edges) in graph

I am trying to perform a kind of dynamic graph simulation where vertices and edges of graph are added and deleted according to the current state of the graph at each time step. I know that there are ...
126 views

### Random geometrical graph generation

I would like to generate a random graph on $[0,1]^2$. Each node is connected to one other if the distance between two nodes is say 1/4 or less. Here is an example with 50 nodes and 200 edges I would ...
53 views

### Trying to write a program to find an approximate harmonic function on a given graph using relation method

So given an undirected graph with two vertices that have fixed values assigned to them, a harmonic function is a function that assigns values to all other vertices such that the value assigned to each ...
204 views

### VertexRenderingFunction (or EdgeRenderingFunction) with movable nodes?

In GraphPlot, I'd like to use VertexRenderingFunction (VRF) and have the resulting object behave the same way under dragging verticies as it does when I do not use VRF. The same issue occurs for ...
54 views

### What do the default shapes/colors in DiscreteMarkovProcess Graph mean?

In making markov chains, I know how to do that, but I am curious as to what the different colors, and shapes of the vertexes in the graph output mean. as example; ...
59 views

### EdgeRenderingFunction For 2 Vertices in a Loop

Assume there is a set of rules: set = {"A" -> "B", "B" -> "A", "B" -> "C", "C" -> "D", "D" -> "A", "C" -> "C"}; which we want to graph using ...
62 views

### Efficiently or Elegantly construct linear graph list from vertex pairs

I am processing MRP data, with BOM relations as pairs of part number strings. I want to construct lists that represent the linear graphs defined by these pairs. Here is some code to generate random ...