304 questions with no answers
4
votes
0
answers
1k
views
What is an atomic heap?
I am trying to understand Thorup's latest priority Queue which has delete_min operation O(log log N) as presented in his paper.
He refers to Fredman and Williard's Atomic Heap as a part of his ...
2
votes
0
answers
72
views
Is there a more efficient approach to generate all shortest paths from pre-calculated edges?
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 ...
0
votes
0
answers
44
views
Algorithm for finding a subset of nodes in a weighted connected graph such that the distance between any pair nodes are under a postive number?
I was given a problem that in a connected, weighted graph G = (N, A), find a connected subgraph G_s = (N_s, A_s), where |N_s| <= l and A_s = {(i, j): i \in N_s, j \in N_s, (i, j) \in A}, such that ...
0
votes
0
answers
90
views
shortest path algorithm with expected cost
My objective is to calculate the expected cost for each path from the starting point to the end point and identify the minimum expected cost for each path when the respective node serves as the ...
0
votes
0
answers
110
views
Finding paths and shortest paths in a map
I am working on this program that reads a file of metro stations and converts it into a graph. Then it does the following tasks:
• It identifies all the stations belonging on the same line of a given ...
0
votes
0
answers
40
views
Cant store find the shortest path in the dijkstra algorithm
I have implemented a dijkstra algorithm that calculates the shortest distance for every node from the start node, but I am not able to retrieve the shortest path for these nodes. I watched a youtube ...
0
votes
0
answers
78
views
How to find the shortest path?
I am trying to find out the shortest path on this project that I am working on and nothing pops up. I was wondering if I could get any help from here, thanks! The link below leads to my code, I ...
1
vote
0
answers
397
views
Multithreading a shortest path algorithm
I would like to modify my shortest path finding code to use multithreading and improve its performance. The algorithm must be able to work with negative weights, and as a result, we cannot use ...
1
vote
0
answers
49
views
NetworkX weird routing result
i have the following problem:
I've downloaded an OSM street graph via OSMNX, converted it to an undirected graph (i don't need two lanes of a street). Then i manually added additional nodes to the ...
0
votes
0
answers
93
views
Do we always have to run Bellman-Ford N-1 times?
This is more a theoretical question because I can see this question being asked in an exam.
Assuming we have a directed graph G(V,E) with |V| = 10 and we want to know the shortest path from S to all ...
0
votes
0
answers
354
views
R Igraph: Finding all shortest paths for a million pair of nodes in a large network
I have a large network with 17,765 nodes and 7,4876 edges. I'm using igraph to run most of my analysis. I got stuck on finding the number of shortest paths for different pairs of nodes (around 1 ...
0
votes
0
answers
33
views
AttributeError: 'set' object has no attribute 'items' /Dijkstra's algorithm to finding the shortest path of a weighted graph
I'm trying to make a dijkstra algorithm solution to a finding the shortest path problem. I made use of an adjacency list but i still get this error: AttributeError: 'set' object has no attribute '...
0
votes
0
answers
170
views
Is this an example of an undirected or directed graph? If undirected, how can it be used for arbitrage with bellman ford?
Hello I am learning more about graph theory and was recently learning about Bellman Ford. I noticed an example of how Bellman Ford could be used to arbitrage markets and I took some time to understand ...
0
votes
0
answers
109
views
how to improve simple dijkstra algorithm for shortest path routing
I am trying to simulate SDN based shortest path routing using Dijkstra algorithm. Is there anything that I can improve in the following code ? I am using Floodlight controller and trying to optimize ...
2
votes
0
answers
1k
views
How to get strongest path prolog?
I'm trying to create a social graph and I have to write some Prolog in order to get the minimal and the strongest path.
My knowledge base only has the following statements:
edge(source, destination, ...
0
votes
0
answers
47
views
Sorting ArrayList<> based on Lattitude and Longitude in Android
I Have a requirement that has ArrayList that contains Latitude and Longitude (randomly).Is there any way so that I can get this list in a optimized way. Google Map optimization map I am aware of that ...
0
votes
0
answers
383
views
DFS like algorithm to find single source shortest path
I know DFS is not good choice to find shortest path from a source and BFS or dynamic programming solutions are better but i'm just interested in hypothetical situation of speed of particular algorithm....
0
votes
0
answers
272
views
Why does inconsistent hueristic cause expansion of repeated nodes in A*?
I am aware that we need to follow the triangle inequality for consistent heuristic I.e,
h(n)< c(n,a,n')+ h(n')
My understanding of why it might cause repeated nodes to be expanded is that , suppose ...
0
votes
0
answers
12
views
Dijkstra's Algorithm for simchi-levi berman's network
Does anyone have the shortest paths for this network? enter image description here
1
vote
0
answers
80
views
Convert python functions (shortestpath/ prediction function using nx.adamic_adar_index) into API
So in this project im trying to find the link prediction in the social networks.
I have done my test with some of the algorithms, and I decided to work with the Adamic radar algorithm.
And I wanted to ...
1
vote
0
answers
323
views
Why wouldn't a modified Bellman Ford work for Max Product Path/Currency Arbitrage in a directed graph?
Problem Statement: Let c1,c2,...cn be various currencies. Between two currencies ci and cj, there is an exchange rate ri,j > 0. These exchange rates satisfy the condition that ri,j * rj,i < 1.
...
0
votes
0
answers
609
views
Dijkstra's algorithm code to store the vertices contained in each shortest path not outputting correctly?
I implemented Dijkstra's algorithm to find the shortest path from the source vertex to all other vertices, and I also wanted to store what vertices make up each shortest path. I did this by keeping ...
0
votes
0
answers
796
views
Print the shortest path between two points in a grid C++
The following code is the shortest path algorithm code I am using: Algorithm to find the shortest path in a grid
bool isValid(std::vector<std::vector<int>>& grid, int i, int j) {
...
0
votes
0
answers
186
views
Get results with undirected graph but not with multidigraph
Dear people of stackoverflow,
I made a routeplanner based on length and elevation. With both costfactors I get only results with an undirected graph. So the code is good for an undirect graph but ...
0
votes
0
answers
254
views
Find the shortest route using osmnx
I want to find the shortest path between several points with the help of osmnx. I use the following code. But its output is only one point.
Does anyone know why?
import osmnx as ox
place_name = "...