Skip to main content

Questions tagged [graphs-and-networks]

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

Filter by
Sorted by
Tagged with
4 votes
1 answer
127 views

Is there any efficient way to find cycle matroid of a graph? A cycle matroid is basically all sets of edges in a graph that does not form a cycle. The code below works pretty well for small graphs, ...
internet's user avatar
  • 1,407
3 votes
1 answer
79 views

Given a list of directed edge-tagged graphs gList like this: ...
internet's user avatar
  • 1,407
1 vote
0 answers
77 views

VertexContract works with EdgeTaggedGraphs: ...
user46831's user avatar
  • 701
3 votes
1 answer
125 views

Switching between {1, 5} and {5, 1} has no effect on produced graphs even though EdgeList-s ...
azerbajdzan's user avatar
  • 32.5k
0 votes
1 answer
135 views

Let $G$ be a graph of order $n$. Then the visibility polynomial, $\mathcal{V}(G)$, of $G$ is defined as $$ \\ \mathcal{V}(G)=\sum_{i\geq 0} r_i x^{i} \\ $$ where $r_i$ denote the number of mutual-...
138 Aspen's user avatar
  • 2,294
0 votes
0 answers
76 views

I like to reproduce the algorithm(s) provided in https://arxiv.org/abs/1709.08561 to solve the all-terminal network reliability problem: Given an undirected connected graph $G$, suppose each edge is ...
138 Aspen's user avatar
  • 2,294
2 votes
1 answer
103 views

I have the following directed graph and a cutset: ...
internet's user avatar
  • 1,407
0 votes
0 answers
36 views

I have an expression that is a sum of graph terms. Each term is a pair {graph, coeff}, where graph is a list of edges. A single <...
Ceasar's user avatar
  • 101
5 votes
3 answers
275 views

I am trying to find the fundamental cycles of a directed graph in Mathematica. I defined my graph as follows: ...
internet's user avatar
  • 1,407
2 votes
2 answers
207 views

What can be done when GraphLayout -> "TutteEmbedding" produces ugly graphs? ...
azerbajdzan's user avatar
  • 32.5k
5 votes
1 answer
103 views

GraphLayout can do a lot of cool things like when we set the option to SpringElectricalEmbedding and other embeddings for ...
Romogi's user avatar
  • 687
2 votes
3 answers
370 views

When I import a DOT file (or a string in that format) with labels containing the exact characters \\l or \\r, they are displayed ...
Mark S.'s user avatar
  • 1,143
3 votes
2 answers
155 views

I want to find all cutsets of a graph based on the following definition: A cutset is a set of edges of a connected graph G such that the removal of these edges from G reduces the rank of G by one, ...
emnha's user avatar
  • 2,151
1 vote
0 answers
71 views

The Hosoya Index is the number of independent edge sets (i.e., matchings) in a graph. I have implemented it in Mathematica (based on the source code provided in ...
Ahamad's user avatar
  • 1
1 vote
1 answer
151 views

For a bipartite graph, the local clustering coefficient of a node $v$ is the number of rectangles containing $v$ as a fraction of (something like, depending on the definition) the total number of ...
apg's user avatar
  • 2,303
2 votes
1 answer
130 views

I am using the code provided in the answer for this other question. It is shown below: ...
JYB's user avatar
  • 51
3 votes
1 answer
135 views

By definition, a planar graph is a graph that can be represented on a plane without intersecting edges. ...
ayr's user avatar
  • 2,665
2 votes
2 answers
254 views

I have a graph I have When I go A-> B -> C->D->E->A I get the sum 23, and How can I find the numbers like the graph. I tried ...
TTTT2025's user avatar
  • 167
0 votes
0 answers
94 views

I'm trying to find all subsets of edges in a graph that do not form a cycle. Currently, my approach is to generate all subsets of the edge set and use AcyclicGraphQ ...
internet's user avatar
  • 1,407
1 vote
1 answer
114 views

GraphUnion doesn't seem to produce the correct result. The output should be four blocks connected in a chain, but it's not. This appears to be another bug in ...
internet's user avatar
  • 1,407
2 votes
1 answer
173 views

In the following code, I expected that only the edge between vertices 0 and 1 would be removed. ...
internet's user avatar
  • 1,407
4 votes
0 answers
220 views

I need random Hamiltonian cycles in directed graphs. I guess for me it would be OK to mean by that choosing uniformly randomly from the set of all Hamiltonian cycles. ...
მამუკა ჯიბლაძე's user avatar
1 vote
2 answers
112 views

I have two graphs, g1 and g2, defined as follows: ...
internet's user avatar
  • 1,407
5 votes
1 answer
244 views

How can I split a graph into two subgraphs, as shown in the image below, given a pair of cut vertices? (Let's assume the user ensures that a valid pair of cut vertices is provided.) The possible cut ...
internet's user avatar
  • 1,407
3 votes
0 answers
114 views

I wrote one simple demonstration of Shannon Capacity of one graph. How to accelerate it? $\Theta(G)=\sup \limits_{k }\left[\alpha(\underbrace{G ⊠ \cdots ⊠G)}_k \right] ^{1 / k}$ where $⊠$ denotes ...
Ahamad's user avatar
  • 1

1
2 3 4 5
46