Questions tagged [graph]
A graph is an abstract representation of objects (vertices) connected by links (edges). For questions about plotting data graphically, use the [data-visualization] tag instead.
 724 questions
 
 - Bountied 0
 - Unanswered
 - Frequent
 - Score
 - Trending
 - Week
 - Month
 - Unanswered (my tags)
 
 
 4
 
 votes
 
 
 
 1
 
 answer
 
 
 
 88
 
 views
 
 
 
 
 Dijkstra's algorithm for non-uniform undirected hypergraphs: Take II - bidirectional Dijkstra's algorithm with excellent performance
 Intro
(See the full repository here.)
A non-uniform undirected hypergraph is a generalization of an undirected graph. It is defined as \$H = (X, E)\,ドル where \$X\$ is the set of vertices and \$E \...
 
 
 
 
 
 0
 
 votes
 
 
 
 1
 
 answer
 
 
 
 77
 
 views
 
 
 
 
 
 Computing loan cuts leading to a global zero equity in a financial graph (Java)
 Intro
I won't specify the problem here, but instead, provide the link to the blog post discussing the problem and the full implementation.
Code
...
 
 
 
 
 
 4
 
 votes
 
 
 
 2
 
 answers
 
 
 
 137
 
 views
 
 
 
 
 
 Dijkstra's algorithm for non-uniform undirected hypergraphs
 Intro
(Repo here.)
A non-uniform undirected hypergraph is a generalization of an undirected graph. It is defined as \$H = (X, E)\,ドル where \$X\$ is the set of vertices and \$E \subseteq \mathcal{P}(X)\$...
 
 
 
 
 
 0
 
 votes
 
 
 
 0
 
 answers
 
 
 
 18
 
 views
 
 
 
 Compute the flood polynomial of one graph using Mathematica
 Reference: arXiv:2504.04233
Example 2.12: 4-vertex cycle graph
Structure: Square graph with 4 vertices
Flooding cascade sets: 7 total (2 of size 2, 4 of size 3, 1 of size 4)
Key insight: Opposite ...
 
 
 
 
 
 0
 
 votes
 
 
 
 0
 
 answers
 
 
 
 16
 
 views
 
 
 
 Gremban Expansion for Signed Networks and Community–Faction Detection
 I made Mathematica demonstration of Gremban Expansion for Signed Networks and Community–Faction Detection based on the 2 algorithms provided in arXiv:2509.14193.
...
 
 
 
 
 
 0
 
 votes
 
 
 
 1
 
 answer
 
 
 
 38
 
 views
 
 
 
 Count triangles in K4-free graphs
 Port the Python code provided in the appendix of arXiv:2509.12100 to Mathematica code.
The Wolfram code successfully:
✅ Constructs all 6 graph types correctly
✅ Detects K4-free properties
✅ Counts ...
 
 
 
 
 
 0
 
 votes
 
 
 
 0
 
 answers
 
 
 
 14
 
 views
 
 
 
 Demonstration of the Power Contamination Problem on Grids Revisited in Mathematica
 The implementation successfully demonstrates all key findings from the research paper arXiv:2509.12756, including the disproof of the original conjecture and the establishment of the correct formula ...
 
 
 
 
 
 0
 
 votes
 
 
 
 0
 
 answers
 
 
 
 57
 
 views
 
 
 
 Computing \$k\$ most reliable paths in undirected probabilistic graphs in Java
 Intro
(See MostProbablePath.java.)
This time, I elaborate on Computing most probable (reliable) path in a probabilistic graph (take II): instead of computing the most reliable path I now return \$k\$ ...
 
 
 
 
 
 4
 
 votes
 
 
 
 1
 
 answer
 
 
 
 284
 
 views
 
 
 
 
 Computing most probable (reliable) path in a probabilistic graph (take II)
 Intro
A probabilistic graph \$G = (V, E)\$ is an undirected graph with weight function \$w \colon E \rightarrow [0, 1]\$. In the most reliable path problem we -- given two terminal nodes \$s \in V\$ ...
 
 
 
 
 
 1
 
 vote
 
 
 
 0
 
 answers
 
 
 
 63
 
 views
 
 
 
 
 PathFinding.java: Drawing a random perfect maze via randomized DFS
 Intro
Still working on PathFinding.java. This time I concentrate on three private methods of GridModel that are responsible for generating random perfect mazes. A maze is perfect if for each two cells ...
 
 
 
 
 
 4
 
 votes
 
 
 
 1
 
 answer
 
 
 
 135
 
 views
 
 
 
 
 
 PathFinding.java: Beam search in Java
 Intro
I am currently working on this project (PathFinding.java). This time, I need to get the following class reviewed:
Code
...
 
 
 
 
 
 1
 
 vote
 
 
 
 0
 
 answers
 
 
 
 70
 
 views
 
 
 
 Fixed BIDDFS (bidirectional iterative deepening depth first search) in Java
 Intro
I have this GitHub repository for doing pathfinding in directed unweighted graphs. This post is about BIDDFS proposed by Richard Korf in his paper.
Code
...
 
 
 
 
 
 2
 
 votes
 
 
 
 0
 
 answers
 
 
 
 55
 
 views
 
 
 
 Use Mathematica to calculate Treewidth
 The treewidth is a measure of the count of original graph vertices mapped onto any tree vertex in an optimal tree decomposition.
I wrote Mathematica code to calculate Treewidth
based on the Python ...
 
 
 
 
 
 1
 
 vote
 
 
 
 0
 
 answers
 
 
 
 39
 
 views
 
 
 
 LibID: a Java library containing some iterative deepening algorithms for pathfinding on directed unweighted graphs
 Intro
I have this GitHub repository containing some iterative deepening pathfinding algorithms.
Code
...
 
 
 
 
 
 6
 
 votes
 
 
 
 2
 
 answers
 
 
 
 122
 
 views
 
 
 
 
 Slack User Interaction Graph – Collaboration Topology
 I’ve written a small Python module to generate mock Slack workspace data, build a user–user interaction graph, and surface complementary collaborators based on skill sets.
The key features are:
Data ...