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
0answers
103 views

Extracting Facebook Managed accounts (pages) in Mathematica? [duplicate]

I want to use Mathematica to explore various relationships on my Facebook pages. I've been able to successfully extract information on my personal Facebook page using the build in Social Media ...
1
vote
1answer
184 views

How to preserve graph properties under subgraph in MMA9 [duplicate]

Possible Duplicate: Preserving labels when using graph functions I'm using g = SocialMediaData["Twitter", "FriendNetwork"] to get a nice graph with ...
0
votes
1answer
97 views

Network graph with lights not working

So I have ...
0
votes
1answer
85 views

Subgraph, HighlightGraph not acting as expected

I'm trying to create a simple graph from a matrix and then highlight a particular subgraph. My code (simplified from a bigger task) is as follows. I keep getting the "Subgraph::graph: A graph object ...
0
votes
2answers
273 views

How can I give graph required data with GUI?

Consider that I have the simple graph of ...
0
votes
2answers
326 views

How to specify VertexCoordinates as geographic coordinates of cities?

I have been very busy these days with giving the VertexCoordinates of the cities the geographic coordinates from ...
0
votes
1answer
115 views

TreeForm vs TreeGraph

Is it possible using TreePlot to color part of the nodes in the tree in a different color, and to make a path to the node with different color? I used ...
0
votes
1answer
148 views

Generate Random 3D Network using GraphPlot3D and loop

Instead of writing all this out I want to do the same thing with a loop and be able to manipulate n and k. The idea is to create a randomly generated network where n is the number of nodes and k is ...
0
votes
1answer
183 views

Creating a Network from a Output

So I used the locator pane to derive the positions of a vertex on a picture. The picture was the Maryland Power Grid and the vertices were the generators and loads of the power system. When I clicked ...
0
votes
1answer
265 views

Mean path length of randomly generated graphs

I am looking to find the the average path length of 1000 random graphs with the following degree distribution, a few of the vertex degrees are included below ...
0
votes
1answer
205 views

Subset of edges with a different color

I want to color a subset of the edges of my graph with a different color. My graph currently has a large number of edges, so the following is just a toy example ...
0
votes
1answer
80 views

combining NeighborhoodGraph and RandomGraph

I have Combinatorica` and GraphUtilities` loaded in version 9 of Mathematica. If I then set: ...
0
votes
1answer
79 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 ...
0
votes
1answer
76 views

How do I get a different (random) independent edge set each time I run FindIndependentEdgeSet?

I'd like to use FindIndependentEdgeSet[g] repeatedly to get random maximal matchings of a fixed graph, but each time I call this function it gives me the same answer (i.e. the same list of edges). ...
0
votes
1answer
176 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 ...
0
votes
2answers
266 views

Generating a random tree of given cardinality, depth, and labeling

For demo, exploration and teaching purposes, I would like to be able (and asking you for help) to generate these special instances of trees: For given: N - number of nodes in the tree D - depth of ...
0
votes
1answer
135 views

How can I replace UndirectedEdges to pairs of bi-directional DirectedEdge in a Graph?

How can I have pair of edges between nodes in this kind of graphs? ...
0
votes
2answers
126 views

How can I efficiently and uniformly sample the set of vertices a fixed edge-wise distance away from a chosen vertex?

I have a large graph $G$, which may be either directed or undirected. How would I use DepthFirstScan[] or BreadthFirstScan[] to ...
0
votes
1answer
115 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.
0
votes
1answer
56 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 ...
0
votes
1answer
59 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.
0
votes
2answers
112 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 ...
0
votes
2answers
95 views

Normalize centrality measures

How I can normalise centrality measures? Can I use Normalize function? I give example of unnormalized measures ...
0
votes
1answer
64 views

How to use Hold on a variable defined as a graph

I'm working on doing operations on different graphs and getting their probability node degree distributions using a simple algorithm. If I have many defined graphs, for example: ...
0
votes
1answer
53 views

Verticepair - route matrix

I have the following problem. I have two lists: list1 defines all possible commodities in a network g. E.g. Form vertex 1 to ...
0
votes
2answers
73 views

Getting FerrersDiagram to work

I am trying to generate FerrersDiagram (see http://reference.wolfram.com/language/Combinatorica/ref/FerrersDiagram.html), any clues to getting it to work? I get error message for the following: ...
0
votes
1answer
132 views

Turning sound into a graph

I'm writing a comprehensive text on graphs and Mathematica and in this context I have this, let's call it, creative gap between sound and graphs. There are plenty of ways one can create graphs from ...
0
votes
2answers
230 views

Plot “number of triples at each v in V(G)” [closed]

For a uni assignment, I need to plot the "number of triples at each v in V(G)". I tried to find relevant information in the Mathematica documentation through Google, but I'm lost. How do I get the set ...
0
votes
2answers
913 views

How to find number of connected components of graph G?

Is there a command that can count the number of components of a graph, in the same way that VertexCount[G] counts vertices?
0
votes
1answer
153 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 ...
0
votes
1answer
36 views

Parsing output from FindHamiltonianCycle to recover an ordered list of vertex positions for a discovered path

After applying FindHamiltonianCycle to a graph, one generates output that looks like the following: ...
0
votes
2answers
149 views

Basic question on producing non-overlapping graph nodes in a graph

I am plotting a graph which has about 196 nodes. ...
0
votes
2answers
56 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... ...
0
votes
1answer
49 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 ...
0
votes
1answer
48 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 ...
0
votes
1answer
41 views

How to query W|A, to get a list of asymmetric, bicubic and $3$-edge colorable graphs? [closed]

I'm interested in finding graphs with certain properties, like the smallest cubic bipartite asymmetric graph. While working on a related graph-theoretic problem, concerning edge-colrings, I came along ...
0
votes
1answer
55 views

FindCycle not working as expected for multigraph

Say I have a simple multigraph like so: edges = {DirectedEdge[a, b], DirectedEdge[b, c], DirectedEdge[c, a]}; g = Graph[Join[edges, edges]] ...
0
votes
1answer
49 views

Create vector for each vertex in a network [closed]

I have a network with x vertices and I would like to create a vector with random numbers for each vertex in this network. I would like to generate this list and represent it in a table. Further, it ...
0
votes
1answer
98 views

Why Infinity edges with WeightedAdjacencyGraph [closed]

I can't understand why WeightedAdjacencyGraph wants Infinity weight when there are no edges between two nodes. In particular ...
0
votes
1answer
59 views

How should my data be formatted for use with BetweennessCentrality?

A few weeks ago I asked this question. I am trying to upload my data which is an adjacency list for an undirected, unweighed graph and find the betweenness centrality. At the time I tried to use the ...
0
votes
1answer
184 views

Why is my PageRank result in Mathematica converging this way?

I am using this technique to find the PR of these 3 pages. It converges to something it shouldn't be. I tried the same iteration in Java and 2 pages come up with 1.333 and the other one as 0.666. ...
0
votes
1answer
139 views

Testing Equality Expression?

Even if in Graph[{1 -> 2}] == Graph[{1 \[DirectedEdge] 2}] the answer is True ; but why MMA doesn't show the result of the ...
0
votes
1answer
133 views

How can I extract coordinates of the nodes of my graph?

I have this output for my graph. ...
0
votes
1answer
111 views

How does SocialMediaData determine vertex size

How does SocialMediaData determine the size of graph vertices, e.g. on what does the vertex size depend in, say, a Facebook friend network graph?
0
votes
0answers
38 views

Create graph K5, delete 2 edges and 2 vertex, create adjacency matrix [duplicate]

I need help about this problem. I should create graph K5, delete 2 edges and 2 vertex from it and from the new graph create adjacency matrix. I have poor knowledge and i don't need anyone to solve the ...
0
votes
0answers
47 views

“Real Graph example” to test algorithms [on hold]

I wrote some algorithms which process graphs. I tested them and found those ones worked. But I would like to demonstrate them too. What is the best way to create example graphs from real world? I ask ...
0
votes
0answers
30 views

Strange behaviour of VertexEccentricity when switching from map to thread [on hold]

I want to get a list of vertex eccentricies for all vertices in a graph. This example works just fine: ...
0
votes
0answers
62 views
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 ...