Graph Algorithms are a sequence of well-defined steps that will solve a problem related to Graph Theory, where a Graph in this context is a collection of vertices ("nodes") and edges that connect these vertices.
0
votes
0answers
5 views
implementation of algorithms and data structures
i have successfully implemented several algorithms and data structures.
however, i am not sure how i would implement a graph algorithm, since i would need to represent a graph then. i'm trying to ...
2
votes
1answer
50 views
Computing the optimal combination
I am designing an application wherein I need to choose from a group of fertilizers, the best possible combination, i.e the minimum amount of fertilizers which can supply the given nutrients.
For ...
1
vote
1answer
34 views
Finding the root vertex in an ordered graph using adjacency matrix in O(N)
I have an adjacency matrix for an ordered graph and I need to find vertex to which all others have edge to (in it's row there are all 1s except for the diagonal):
If this is adjacency matrix:
0 0 0
...
1
vote
0answers
34 views
Breadth-First Search for Six Degrees of Separation in mongodb
I have a video-game themed Six Degrees of Separation app and I want to know the best way to implement breadth-first search using node.js and MongoDB.
My app uses ...
0
votes
2answers
42 views
Programmatically find all tiles within certain distance with obstacles in the way
I'm looking for a better way to create an array of points that are a certain distance away from the starting point. There may be obstacles in the way, which would be impassable.
x x x o x x x x
x x o ...
0
votes
0answers
13 views
Predict approximate shape based on set of coordinate points on a plane
Looking for an algorithm or library which helps me to predict the approximate shape (like rectangle or triangle or oval) based on set of points on a coordinate system.I looked into HoughTransform ...
0
votes
1answer
57 views
Exact euclidean Travelling Salesman
I am trying to implement the algorithm to solve the Travelling Salesman Problem.
I know that it is NP-Hard but I only need to solve it for 20 cities.
I want to have an excat result and want to use ...
0
votes
0answers
31 views
Merge multiple routes to “main routes”
I'm looking for an algorithm which merges multiple routes on a map to "main routes".
The scenario:
I drive with my car through the streets and track my routes. So I drive over time multiple times on ...
1
vote
1answer
47 views
Algorithm for determining number of discreet graphs in a dataset
I have a dataset that contains vertices and the other vertices that they are connected to. This data set represents an undirected graph. What I'm trying to determine is the number of discreet ...
0
votes
1answer
43 views
Topological sort of cyclic graph with minimum number of violated edges
I am looking for a way to perform a topological sorting on a given directed unweighted graph, that contains cycles. The result should not only contain the ordering of vertices, but also the set of ...
0
votes
1answer
43 views
Determine remaining subgraphs after removal of a node joining them
So I ran into this problem while attempting to implement a feature:
Suppose I have a random, undirected graph of nodes, some of which are connected to each other.
Let's call every group of nodes ...
0
votes
0answers
32 views
Directed Graph BFS without all nodes reachable
I'm doing a breadth-first search on a digraph. I'm lost at nodes c and f, and I'm not sure if and how they should be in the BF-tree or if you only go as far as reachable from the source node and don't ...
2
votes
2answers
38 views
Best way to find the most costly path in graph
I have a directed acyclic graph on which every vertex has a weight >= 0. There is a vertex who is the "start" of the graph and another vertex who is the "end" of the graph. The idea is to find the ...
-3
votes
1answer
36 views
Shortest Path for Courier Delivery following constraints? [closed]
I am new to algorithms and am following an algorithm course by a Stanford Professor from Courserera. What algorithm do I need to know to finish this task?
I have a source from where I have to start ...
4
votes
1answer
67 views
Optimization on Algorithm to check “Whether for a given directed graph there is only one way to sort the graph using topological sort or not”
My algorithm for this is :
First to calculate Indegree of every node , i.e. count of how many
edges are there for which this node is sink for them.
Now, will push only those in queue which have ...