Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >

All Questions

Filter by
Sorted by
Tagged with
Advice
0 votes
1 replies
18 views

I came across one of OpenTrack's manuals. I couldn't find a more up to date version, this is the latest screenshot I could find. Is the description vertex-vertex-edge-vertex-vertex actually correct? ...
TomCoding's user avatar
  • 103
0 votes
1 answer
236 views
+50

I'm trying to implement the Cooper–Harvey–Kennedy algorithm from this paper in C++. The original is used to find dominators, however in my case I need to find the postdominators. For this, I am aware ...
DeepQuantum's user avatar
1 vote
0 answers
27 views

I have a directed graph representing a road network where: Some edges are bidirectional (two-way streets) and some are unidirectional (one-way streets) The graph has geometry (represents physical ...
Muly's user avatar
  • 43
0 votes
2 answers
181 views

My unordered adjacency list of nodes with their 2D coordinates: adjacency_list = [[1, 4], [0, 2, 5], [1, 3, 7], [2, 6, 12], [5, 0, 11], [4, 1, 7, 13], [3, 15, 8], [...
Optical_flow_lover's user avatar
7 votes
3 answers
293 views

The problem is to find the longest sequence of numbers from 1 to 100 such that each number is either multiple or divisor or the previous, and with no repetition. For example, 50 25 5 35 7 63 21 is a ...
Zorm's user avatar
  • 71
0 votes
4 answers
589 views

You are given an unweighted tree with N nodes and each node starts with value 0. There will be Q queries. The 1st type of query will change the value at a node to a new value. The 2nd type of query ...
Isabella's user avatar
3 votes
0 answers
109 views

In python, with networkx, I have a large list li = [o1, o2, ...] of objects of a class Myclass. The class has a partial ordering for objects defined through the method __lt__. This is a strict ...
Bulkilol's user avatar
  • 193
3 votes
3 answers
110 views

Consider this traversal algorithm in pseudocode: Traverse(G, v): S is stack stack.push(v) label v as visited while S is not empty: v = S.pop() for all w in G....
lc_vorenus's user avatar
3 votes
1 answer
72 views

I'm trying to find the shortest and longest path between two node types across the entire graph in Dgraph, similar to how it's done using APOC in Neo4j. In Neo4j, I can use a single query like this: ...
Ravindra Gupta's user avatar
2 votes
2 answers
87 views

I have a table in SQL Server that represents nodes directions. Each node can either go into another node or stay as it is. I need to resolve the final node to which each node should go. Here is an ...
euh's user avatar
  • 525
7 votes
1 answer
103 views

I'm working on the following problem: Given an undirected graph G = (V, E), represented as an adjacency list, design an efficient algorithm to construct a subgraph H = (V, E') such that: E' is a ...
Johann Carl Friedrich Gauß's user avatar
1 vote
0 answers
47 views

For a computer game, I would like to find the data races between tasks of NPCs. The execution / task graph is generated by the user. The synchronization mechanisms consist of simple send/wait commands ...
ListigerLurch's user avatar
1 vote
0 answers
60 views

I am working on crash analysis using OSM data, to analyze pedestrian crashes with respect to type of intersections such as: 4-way: X-junctions 3-way: T-junctions, Y-junctions multi-leg junctions ...
siddharth.prakash's user avatar
1 vote
2 answers
214 views

I'm working with an undirected graph where I need to frequently add and remove edges. I also need to efficiently determine the number of connected components after each operation. For adding edges, I'...
Nitaa a's user avatar
  • 143
1 vote
0 answers
72 views

I'm working with a multigraph in JavaScript where each edge represents a bus route and includes both a weight (e.g., travel time or distance) and a busLine identifier. I want to calculate the shortest ...
Nyi Zin Thant's user avatar
1 vote
0 answers
51 views

I am using Disjoint Set Union (DSU) and Union Find to solve a graph problem. The entry point function takes an input string with coordinates defined by (line number, char number), starting at the top ...
PacificNW_Lover's user avatar
0 votes
0 answers
62 views

How to reduce the number of nodes in my CFD mesh in Python? For context, I have a 2D CFD mesh generated by Fluent and exported as a .msh.h5 file. The file has the following structure: ├── meshes │ └─...
Byron Piper's user avatar
4 votes
0 answers
107 views

Is there an algorithmically efficient way to compute the following value? Define f(n, k) to be the minimum number of k-cliques to cover all edges of a complete graph of size n. For example, f(4, 3) = ...
yumtam kim's user avatar
2 votes
1 answer
109 views

I have undirected connected graph with one main node (denoted by M in examples below). I am trying to find efficient algorithm to following specification: input is set of edges (denoted by thick ...
Tomáš Záluský's user avatar
1 vote
1 answer
38 views

I am working on an implementation of the Anytime Dynamic A* algorithm as described here. I am ~50% of the way through an initial, basic implementation but am stuck at the following line: In the ...
Elijah Crum's user avatar
2 votes
2 answers
126 views

I'm implementing a graph with C++. After reading a C++ tutorial, I thought that any object defined locally will only live in the most local scope. Say we define an int i in function f; outside the ...
oliver li's user avatar
0 votes
0 answers
57 views

Suppose 3 sets of nodes, each corresponding to a distinct set in an undirected graph: Set-A = {1, 2, 3, 4, 5} Set-B = {6, 7, 8, 9, 10} Set-C = {11, 12, 13, 14, 15} The graph is defined by ...
Honoré De Marseille's user avatar
2 votes
1 answer
201 views

I'm trying to write code to recursively generate directed graphs as described in the following process: For G_1, we start with a single vertex with a self-loop. For G_2, we take two copies of G_1, ...
Mark's user avatar
  • 1,801
0 votes
0 answers
47 views

This is the hint of my 8 puzzle problem (Tells player which tile they should move in this state). I tried to use the current board that the player are playing as an input(2D array) but it always ...
wsn's user avatar
  • 31
1 vote
1 answer
81 views

The code I am writing is in C#, but pseudocode is also appreciated. I have a function that generates a list of faces (which is an ordered list of nodes) of a planar graph. So the function signature ...
David Masters's user avatar
1 vote
1 answer
134 views

What is the format of node features that graph2vec and GL2vec in karateclub require? It does mention that there should be no string features but with or without it I am running into an error with the ...
Arindam Ghosh's user avatar
3 votes
1 answer
46 views

I am given a bunch of graph contrain data: Which vertex is connected to which vertex, optionally with length Some angles Angles and distances may be algebra relations How can I use them to ...
BlackFuffey's user avatar
5 votes
1 answer
80 views

It is alleged that the standard BFS can be extended to output all possible shortest paths between two given vertices in a directed unweighted graph (without loops? it does not seem to matter whether ...
user688486's user avatar
1 vote
1 answer
53 views

In python, given a list mylist of lists el of integers, I would like to remove duplicates that are equivalent under specific permutations of the indices. The question is more general but I have in ...
Bulkilol's user avatar
  • 193
2 votes
0 answers
72 views

There exists a commentary about finding all the edges on any of the shortest paths between two given nodes of a DAG. Presume that I have found such edges as mentioned in this commentary, I can easily ...
user688486's user avatar
1 vote
1 answer
114 views

I am wondering what would the worst case look like for Bellman-Ford algorithm to have to traverse all edges V-1 time, cause most of the time it won't need V-1 iterations to find all shortest path. ...
Eric's user avatar
  • 29
2 votes
2 answers
69 views

I have code that aims to generate a graph from an adjacency matrix from a table correlating workers with their manager. The source is a table with two columns (Worker, manager). It still works ...
mrgou's user avatar
  • 2,690
3 votes
1 answer
94 views

I am looking for a pathfinding algorithm that has a few properties: Speed is very necessary, and once a goal is selected a suboptimal path needs to be made quickly, and then can be improved upon ...
Elijah Crum's user avatar
0 votes
2 answers
162 views

Graph Representation: I am using an adjacency list to represent a large directed graph with millions of nodes. Each node may have several outgoing edges, but the graph is sparse (few edges relative to ...
Chameera Chathuranga's user avatar
6 votes
4 answers
401 views

The problem I am trying to solve a competitive programming problem which goes like that: Given an m x n rectangular grid, what the maximum number of cars than can be parked (each car takes 1 cell) so ...
Andrey Surovtsev's user avatar
3 votes
0 answers
93 views

Myers diff algorithm treats insertion and removal equally at the same cost and treats equality at zero cost (free path). I tried to alter this behavior with supplying a custom cost function which to ...
Suhail Gupta's user avatar
  • 23.4k
3 votes
0 answers
95 views

Myers diff algorithm works at character level and identifies insertion, removal or no-operation at each step. So for example, comparing PQRSXRSYRSZ (old string presented horizontally) and PQRSARSXRSY (...
Suhail Gupta's user avatar
  • 23.4k
0 votes
0 answers
30 views

I am stuck with computing the extended modularity metric on a multi-layer graph. I am trying to derive the result of the middle graph in Figure 6 of the following article: https://www.nature.com/...
user avatar
0 votes
0 answers
53 views

Background: I have recorded navigation trajectory positional x,y and its time point (50hz) data from a virtual reality navigation in an empty room. Problem: I want to calculate how much the navigation ...
Michael Liang's user avatar
2 votes
1 answer
138 views

I am trying to create a path planning algorithm for a robotic mower to cut all the grass in a defined area while avoiding obstacles or restricted areas. I am using the Python Shapely library to define ...
Tomasm64's user avatar
-1 votes
2 answers
103 views

I am trying to learn BFS and trying to analyse BFS time complexity on my own. But I could not wrap my head around it. Below is my implementation of Graph data structure and BFS algorithm. Is the time ...
Bala Ji's user avatar
  • 53
0 votes
0 answers
45 views

I’m trying to design a partitioning algorithm to scale task execution in a resource-constrained environment. Here’s the situation: Tasks consume data via a DAL (Data Access Layer), which could be a ...
Batiz's user avatar
  • 113
3 votes
1 answer
427 views

I have a graph containing sum nodes, choice nodes and point nodes. I'd like to maximize the number of points at the root of the graph. The value you get for a point node is the number of points on ...
danvk's user avatar
  • 17.2k
2 votes
2 answers
68 views

I have an undirected graph. I wish to partition it in such a way as to identify the subgraphs that effectively have 2 bridges connecting them to the main network. There is no need to further subdivide ...
Tim Pigden's user avatar
2 votes
1 answer
95 views

The goal is to segment the major paths by turns in a shortest path of a virtual reality map to know how much to score a person's navigation trajectory (blue line in image) based on how far they walked ...
Michael Liang's user avatar
2 votes
1 answer
249 views

I have the following graph G G is created using the following code import networkx as nx import matplotlib.pyplot as plt G = nx.hoffman_singleton_graph() pos = nx.spring_layout(G) nx.draw(G, pos=pos)...
HJA24's user avatar
  • 406
3 votes
1 answer
62 views

Supposing I have an ordering relation and some predicates: A < B A < C B < C The predicate A<C is redundant since it is implied by the other two. Is there a standard algorithm for ...
spraff's user avatar
  • 33.7k
1 vote
1 answer
54 views

Pathfinder by A* algorithm working fine, the smoothing path algorithm is working excellent too. The problem is: pathfinder grid is not equal to monster hitbox (collision range), the grid size and ...
Michał Jakisam's user avatar
5 votes
5 answers
315 views

I marked my answer as the answer because it is the one that is doing what I was wanting and anyone wanting to do the same thing should start there. But I would love to see a better answer (order of ...
smichr's user avatar
  • 19.6k
0 votes
0 answers
29 views

programmer say that dijkastra algorithm doesn't work for negative graph weight but I think that it works for undirected graph in negative weights and (I know that it don't work for directed negative ...
Tajbir Ahmed's user avatar

1
2 3 4 5
147