Skip to main content

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.

4 votes
1 answer
85 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 \...
coderodde's user avatar
  • 31.9k
0 votes
0 answers
63 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 ...
coderodde's user avatar
  • 31.9k
4 votes
2 answers
133 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)\$...
coderodde's user avatar
  • 31.9k
0 votes
0 answers
17 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 ...
138 Aspen's user avatar
  • 469
0 votes
0 answers
14 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. ...
138 Aspen's user avatar
  • 469
0 votes
1 answer
38 views

Count triangles in K₄-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 K₄-free properties ✅ Counts ...
138 Aspen's user avatar
  • 469
0 votes
0 answers
13 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 ...
138 Aspen's user avatar
  • 469
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\$ ...
coderodde's user avatar
  • 31.9k
4 votes
1 answer
282 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\$ ...
coderodde's user avatar
  • 31.9k
1 vote
0 answers
62 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 ...
coderodde's user avatar
  • 31.9k
4 votes
1 answer
133 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 ...
coderodde's user avatar
  • 31.9k
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 ...
coderodde's user avatar
  • 31.9k
2 votes
0 answers
53 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 ...
138 Aspen's user avatar
  • 469
1 vote
0 answers
37 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 ...
coderodde's user avatar
  • 31.9k
6 votes
2 answers
119 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 ...
Bob's user avatar
  • 221

15 30 50 per page
1
2 3 4 5
49