Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
2 replies
33 views

I'm in college learning about DFS and BFS. I knew about this before, although what's throwing me in a loop is DFSVisit. I just want to know what's the difference between DFS and DFSVisit. Is DFS just ...
Johanna's user avatar
3 votes
1 answer
155 views

I have an interesting problem but cannot find the relevant literature, so need algorithem suggestions or just the correct way to phrase the problem so I can find the literature. I'm given a vector of ...
Edgar H's user avatar
  • 1,559
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
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
2 votes
1 answer
254 views

Is it true that there are no back edges and no forward edges in a BFS of an undirected graph? I feel this is incorrect. Here is my counterexample (graph is represent using adjacency list): 0 : 1 ...
Infinite's user avatar
  • 131
0 votes
1 answer
71 views

I'm trying to traverse a graph (directed) where the edges have weights. How do I use the weights to define the order in which an edge is followed: the lower the weight (module of the weight to be ...
Lapin Chaman's user avatar
-1 votes
1 answer
50 views

Each node in the above graph has been numbered. I am trying to find the graph traversal algorithm that can be used to number the graph in this order. Appreciate if anyone can suggest an algorithm that ...
Isuranga Perera's user avatar
0 votes
0 answers
130 views

Title: Finding the Maximum of Minimum Costs in a Modified Kruskal's Algorithm Question: I'm working on a graph problem where I need to find the maximum of the minimum costs starting from a specific ...
Anon's user avatar
  • 1
1 vote
1 answer
74 views

I am trying to solve LeetCode problem 590. N-ary Tree Postorder: Given the root of an n-ary tree, return the postorder traversal of its nodes' values. I made code considering each condition. I ...
my_first_step's user avatar
0 votes
1 answer
88 views

I'm using bfs and iddfs to find the optimal solution of the 8 tile puzzle, however, my IDDFS is missing solutions and i'm not sure why. ive checked and it seems that every node visits all it's sons, ...
Ofekino97's user avatar
0 votes
0 answers
82 views

I am thinking about the problem of detecting cycles in lisp lists (based on cons cells). Traditional cycle detection algorithms like Floyd's (Tortoise and hare) or Brent's algorithm all assume that ...
Prgrm.celeritas's user avatar
0 votes
1 answer
21 views

I have a very large graph. My objective is the following: Return pathways related to the target 'GIPR' and also related to compounds. Where the compounds are related to the disease 'Leukemia' My ...
Guillermo Guells's user avatar
1 vote
0 answers
210 views

What are the details of your problem? Why is Tinkerpop-Gremlin AnonymousTraversalSource finding ArcadeDB unavailable? I looked at log/arcadedb.log.x files but they're empty. And the Log4j2 logs also ...
Zach's user avatar
  • 765
1 vote
1 answer
158 views

I am trying to run multiple instances of a shortest path algorithm, for independent pairs of nodes in a graph. The algorithm internally uses the bfs method, which is "sandboxed" (self-...
kil47's user avatar
  • 85
0 votes
2 answers
436 views

I have an undirected and unweighted graph with about a million nodes - visualized in a matrix format. Representation of a sample graph: The red cells are blocked. My problem is to find the shortest ...
kil47's user avatar
  • 85
3 votes
1 answer
217 views

#Breadth First Search graph = { 'S' : ['A','B'], 'A' : ['B','C','D'], 'B' : ['C'], 'C' : ['D'], 'D' : [] } visited = [] queue = [] goal = 'D' def bfs(visited, graph, node): ...
vernonnn's user avatar
1 vote
0 answers
390 views

I have been able to find the number of subgraphs in a collection using the below query, after much trial and error and documentation consultation. It seems to work ok. It's crafted to work in the ...
Robin Bruce's user avatar
0 votes
0 answers
93 views

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 ...
thestudi's user avatar
0 votes
1 answer
486 views

I've seen the following code to traverse a graph depth first, in Scala: def dfs(node: Node, seen: Set[Node]) = { visit(node) node.neighbours.filterNot(seen).foreach(neighbour => dfs(node, ...
Weier's user avatar
  • 1,439
1 vote
1 answer
219 views

We have an allocation problem: each node is a fuel source, and every edge contains a number of evenly spaced out lamps (think of them as being 1 m apart from each other). Each fuel source can power ...
GalBrot's user avatar
  • 35
0 votes
0 answers
44 views

I've created a query to return all "descendant" edges and vertices for a particular queried vertex. The query works, but it duplicates edges and vertices with each iteration of the repeat ...
N-ate's user avatar
  • 7,123
0 votes
1 answer
440 views

A DFS starting at some vertex v explores the graph by building up a tree that contains all vertices that are reachable from v and all edges that are used to reach these vertices. We call this tree a ...
mimmolg99's user avatar
-1 votes
2 answers
406 views

Background Looking to trace a path between two points on a hexagonal grid while following the nearest edge. Problem Determining the algorithm to constrain the all iterations after the first one to the ...
Dave Jarvis's user avatar
  • 31.3k
1 vote
1 answer
367 views

How can I determine whether selected nodes on a graph are directly connected? I think, I need to calculate paths for each selected node to all of the other selected nodes. Then, when I have the path, ...
feerlay's user avatar
  • 2,668
0 votes
1 answer
483 views

I have a case of scenario that there are TOURIST who wants to travel and every country has VISA control and there is a path along countries so some of connections you are not allowed to visit that ...
Winslet's user avatar

1
2 3 4 5
8