breadth-first-search
Finding all the shortest paths between two nodes in unweighted directed graphs using BFS algorithm
I am working on a problem that I need to find all the shortest path between two nodes in a given directed unweighted graph. I have used BFS algorithm to do the job, but unfortunately I can only print[详细]
2022-12-27 11:57 分类:问答Performing Breadth First Search recursively
Let\'s say you wanted to implement a breadth-first search of a binary tree recursively. How would you go about i开发者_开发知识库t?[详细]
2022-12-24 23:58 分类:问答How to detect if a directed graph is cyclic?
How can we detect if a directed graph is cyclic?I thought using breadth first search, but I\'m n开发者_StackOverflow中文版ot sure.Any ideas? What you really need, I believe, is a topological sorting a[详细]
2022-12-24 02:15 分类:问答Tackling the 8-puzzle via BFS
I\'ve heard that the 8-puzzle problem can be tackled via BFS, but I don\'t understand how. I wanna know the intermediate steps that I need to get from a board like this:[详细]
2022-12-13 20:26 分类:问答Can this breadth-first search be made faster?
I have a data set which is a large unweighted cyclic graph The cycles occur in loops of about 5-6 paths. It consists of about 开发者_运维技巧8000 nodes and each node has from 1-6 (usually about 4-5) c[详细]
2022-12-11 13:52 分类:问答What is breadth-first search useful for?
Usually when I\'ve had to walk a graph, I\'ve always used depth-first sear开发者_开发知识库ch because of the lower space complexity.I\'ve honestly never seen a situation that calls for a breadth-first[详细]
2022-12-10 19:00 分类:问答Do any POSIX functions or glibc extensions implement a breadth-first file tree walk?
I am writing a daemon that utilizes inotify to monitor file access and it is critical that I don\'t miss anything on a recursive search. I found this interesting idea and have begun to implement it.[详细]
2022-12-10 00:10 分类:问答Breadth first search, and A* search in a graph?
I understand how to use a breadth first search and A* in a tree structure, but given the following graph, how would it be implemented? In other words, how would the search traverse the graph? S is the[详细]
2022-12-08 20:13 分类:问答How can I modify the breadth-first search algorithm to also include the solution path?
I have the following pseudo-code in my book for a breadth-first search: function breadth_first_search:[详细]
2022-12-08 05:04 分类:问答try to have two goals for a robot on a grid
I\'m trying to create a grid in Pygame with a robot as a colored cell, a goal for the robot, and some obstacles, but I\'m missing two goals; I solved that; I only have one goal and I want to add anoth[详细]
2022-12-07 18:57 分类:问答