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.
720
questions
0
votes
1
answer
33
views
Graph Neural Network (GNN) (2)
This is an implementation of a graph neural network.
Edges are represented by an egde-list.
...
0
votes
1
answer
72
views
Graph Neural Nwteork (GNN) (1)
The given datasets are graph data structure that represents social interactions.
The nodes will be represented as People{node_id, edge, gender, occupation} and the ...
8
votes
3
answers
2k
views
Bug Byte puzzle from Jane Street
This is a puzzle from Jane Street.
Given this graph:
Fill in the edge weights in the graph with the numbers 1 through 24, using each number exactly once. Labeled nodes provide some additional ...
2
votes
1
answer
69
views
Clique Connect: minimum spanning tree
Problem Statement
You are given a weighted undirected graph G with N vertices, numbered 1 to N. Initially, G has no edges.
You will perform M operations to add edges to G. The i-th operation (1≤i≤M) ...
5
votes
3
answers
311
views
Find highest number of swaps within a set of possible duty swaps with networkx and PuLP
With huge help from Stack Overflow, I have created code which takes possible swap matches with given weights as an input and outputs a set of matches which gives the highest weight with the highest ...
4
votes
1
answer
113
views
Optimising Graphed Rewards
Relates to this and this.
Simply put; I want to be able to distribute a total reward among network, where the distribution diminishes according to the depth of the network but the total sum of ...
2
votes
1
answer
226
views
Graphs for distributing rewards
I want to be able to distribute a total reward among referral network, where the distribution diminishes according to the depth of the network but the total sum of distributed rewards equals the ...
1
vote
1
answer
111
views
Path Compression Algorithm in C#
Let's consider a simple graph represented by the following edges, where true indicates a visible node and false indicates a non-visible node:
...
0
votes
1
answer
53
views
Performance optimization of traveling salesman like issue
I need help optimizing the performance of this, which is essentially similar to the traveling salesman problem, with the addition that I want to make the graph complete first, with the weight of the ...
6
votes
3
answers
699
views
Program that brute forces to find the minimum dominating set
This program solves the minimum dominating set but it takes an insanely long time to run. In case you do not know, in graph theory, a dominating set for a graph G is a subset D of its vertices, such ...
0
votes
1
answer
35
views
Change the appearance of a log graph with two x axes
I would like to improve the overall look and feel of the two log graphs generated by the Python code below. The first graph represents the optimized methods while the second graph represents the ...
3
votes
1
answer
298
views
Non-recursive topological ordering, starting from given nodes, for Guava graphs
This method returns the topological ordering of a Guava graph starting from a given set of nodes. It's from my personal project github.com/jbduncan/guava-graph-utils, where I'm exploring utilities for ...
3
votes
1
answer
129
views
Parallel semi-sequential bottom-up tree traversal algorithm
I'm trying to traverse a tree-like structure from the bottom-up, and in parallel. Due to some other constraints I also have to allow for thread counts that may be lower than the width of a given set ...
1
vote
0
answers
183
views
Backtracking graph algorithms for a word puzzle in Python
Motivation
Recently, Buzzfeed released a browser-based puzzle game called "Pyramid Scheme." It is available at the following link. The puzzle in an initial state looks like this:
To solve ...
8
votes
1
answer
227
views
Lightweight general-purpose graph library in C++
As a personal side project I started building a graph library in C++ (I know, very original). The code is open source, but for the purpose of this question I will provide the relevant details and the ...