Description: dfs 深度优先搜索!这是走迷宫的基本算法。用广义表建立迷宫,用邻接表建立图,用dfs搜索,许多大学的数据结构作业-dfs depth-first search! Maze This is the basic algorithm. Generalized Table established maze, with the establishment of the adjacent table map, with dfs search, the University of many data structures operations Platform: |
Size: 1339 |
Author:笨熊 |
Hits:
Description: dfs 深度优先搜索!这是走迷宫的基本算法。用广义表建立迷宫,用邻接表建立图,用dfs搜索,许多大学的数据结构作业-dfs depth-first search! Maze This is the basic algorithm. Generalized Table established maze, with the establishment of the adjacent table map, with dfs search, the University of many data structures operations Platform: |
Size: 1024 |
Author:笨熊 |
Hits:
Description: 试扩充深度优先搜索算法,在遍历图的过程中建立生成森林的左子女-右兄弟链表。算法的首部为 void Graph::DFS ( const int v, int visited [ ], TreeNode<int> * t ) 其中,指针t指向生成森林上具有图顶点v信息的根结点。(提示:在继续按深度方向从根v的某一未访问过的邻接顶点w向下遍历之前,建立子女结点。但需要判断是作为根的第一个子女还是作为其子女的右兄弟链入生成树。)
-try to expand the depth-first search algorithm, the traverse of the process to establish the forest generation of children left-right List brothers. The first algorithm to void Graph : : DFS (const int v, int visited [], TreeNode Platform: |
Size: 1024 |
Author:dfssd |
Hits:
Description: 数据结构(C++版)的演示程序,详细演示深度优先搜索的具体调用过程,-data structure (C++ version) demonstration program, a detailed demonstration of the depth-first search to the specific call process, Platform: |
Size: 51200 |
Author:znb |
Hits:
Description: Implemented BFS, DFS and A*
To compile this project, use the following command:
g++ -o search main.cpp
Then you can run it:
./search
The input is loaded from a input file in.txt
Here is the format of the input file:
The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm.
The second line of input file shoud be an integer m indicate the number of connections for the map.
Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist.
The following input are for A*
The following line contains two chars indicate the source and destination city for A* algorithm.
Then there is an integer h indicate the number of heuristic.
The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
-Implemented BFS, DFS and A* To compile this project, use the following command: g++-O search main.cppThen you can run it:./SearchThe input is loaded from a input file in.txtHere is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm.Then there is an integer h indicate the number of heuristic.The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist. Platform: |
Size: 3072 |
Author:bo |
Hits:
Description: 图的深度搜索算法的C语言实现,平时的上机练习可做参考-Depth map search algorithm to achieve the C language, a reference class Platform: |
Size: 177152 |
Author:dsx |
Hits:
Description: 标准的深度优先搜索算法,可实现节点遍历、产生随机路由、检测图中是否有回路等功能,-Standard depth-first search algorithm, the node traversal can be achieved, resulting in a random routing, testing whether there is any loop diagram functions Platform: |
Size: 2048 |
Author:quzhijian |
Hits:
Description: 图论编程,包含文件操作,建立图的邻接表,并实现深度优先搜索-Graph theory programming, including file operations, the establishment of plans of the adjacent table, and the depth-first search Platform: |
Size: 6144 |
Author: |
Hits:
Description: DFS
A depth-first search program that avoids cycling.
solve( Node, Solution):
Solution is an acyclic path (in reverse order) between Node and a goal-DFS
A depth-first search program that avoids cycling.
solve( Node, Solution):
Solution is an acyclic path (in reverse order) between Node and a goal Platform: |
Size: 1024 |
Author:k |
Hits:
Description: 深度优先搜索算法DFS的实现,1.如果有可能,访问一个领接的未访问的节点,标记它,并把它放入栈中。 2 当不能执行规则 1 时,如果栈不为空,则从栈中弹出一个元素。 3 如果不能执行规则 1 和规则 2 时,则完成了遍历。-Depth-first search algorithm DFS implementation, 1. If possible, visit a collar then outstanding access node, mark it and put it into the stack. 2 can not be performed when the rule 1, if the stack is not empty, pop an element from the stack. 3 If you can not implement rules 1 and 2, then the complete traversal. Platform: |
Size: 1024 |
Author:陈源 |
Hits:
Description: Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure, or graph. One starts at the root (selecting some node as the root in the graph case) and explores as far as possible along each branch before backtracking. Platform: |
Size: 1024 |
Author:a32 |
Hits:
Description: Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure, or graph. One starts at the root (selecting some node as the root in the graph case) and explores as far as possible along each branch before backtracking. Platform: |
Size: 1024 |
Author:ww |
Hits:
Description: 广度优先搜索是从某一节点开始,搜索与其线连接的所有节点,按照广度方向像外扩展,直到不重复遍历所有节点。
深度优先搜索是从某一节点开始,沿着其搜索到的第一个节点不断深入下去,当无法再深入的时候,回溯节点,然后再在回溯中的某一节点开始沿另一个方向深度搜索,直到不重复的遍历所有节点。(Breadth first search begins with a node and searches all nodes connected to its line, extending in the direction of the range as far as possible, until all nodes are not repeated.
Depth first search is started from a node, the first node along its search to further down, when not further backtracking node, then a node in the back in the other direction to start the search depth, until not repeated traversal of all nodes.) Platform: |
Size: 1024 |
Author:Maxxxxx
|
Hits: