Description: 实现了图的搜索算法,包括深度优先搜索,广度优先搜索,Dijstra算法,A*算法等较典型的搜索算法,同时可以进行图的输入和编辑等操作,仅供大家参考。-achieve the plan's search algorithm, including depth-first search, breadth- first search algorithm Dijstra, A* algorithm is more typical search algorithm, and can map the input and editing operation, only for reference. Platform: |
Size: 96256 |
Author:王墨村 |
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: 用图形用户界面表示的图,数据结构基本应用,最小生成树算法,最短路径,广度、深度优先搜索-graphical user interface with the plan said, the basic data structure application, the minimum spanning tree algorithm, the shortest path, breadth, depth-first search Platform: |
Size: 61440 |
Author:张旭 |
Hits:
Description: 图的算法的基本训练
1、 图的存储结构的定义和图的创建
图的种类有:有向图、无向图、有向网、无向网。
图的存储结构可采用:邻接矩阵、邻接表。
要求:分别给出邻接矩阵和邻接表在某一种图上的创建算法
2、 图的遍历:非递归的深度优先搜索算法、广度优先搜索算法。
3、 图的深度遍历的应用:求无向连通图中的关节点(教材P177-178,算法7.10和7.11)
4、 图的广度遍历的应用:给定图G,输出从顶点v0到其余每个顶点的最短路径,要求输出各路径中的顶点信息。
-Map of the basic training algorithm 1 and the storage structure of the definition and plans to create the types of plans are: directed graph, undirected graph, to the network, no to the network. Map storage structure can be: adjacency matrix, the adjacent table. Requirements: adjacency matrix is given, respectively, and adjacent table in a certain kind of map creation algorithm 2, graph traversal: Non-recursive depth-first search algorithm, breadth-first search algorithm. 3, graph traversal depth of applications: for Undirected connected graph of the key points (teaching P177-178, Algorithm 7.10 and 7.11) 4, Fig traverse the breadth of applications: a given graph G, the output from the vertex v0 to The rest of each vertex of the shortest path, the path of the output requirements of the vertex information. Platform: |
Size: 7168 |
Author:bueaty |
Hits:
Description: 用CUDA实现BFS算法源码。CUDA是NV公司基于GPU的统一计算架构,BFS复杂度由CPU上的O(V+E)降为O(diameter),直径diameter即图中root到leaf的最长距离。-This is the algorithm of BFS(breadth first search) on CUDA, and its time complexity is down to O(diameter) which diameter means the longest distance between the root and the leaves. Platform: |
Size: 1024 |
Author:iJuliet |
Hits:
Description: 8数码的广度优先算法和A*算法。可以查找出最佳路径,并且自动演示-8 digital breadth-first algorithm and A* algorithm. Can search out the best path, and automatic presentation Platform: |
Size: 2752512 |
Author:djbone |
Hits:
Description: 此代码为“图的广度优先遍历”的源代码,图的存储形式为邻接表,里面有图的邻接表存储的代码,还有广度优先遍历的算法,还有验证的主函数。-This code is " breadth-first traversal map" of the source code, Figure storage form of adjacency list, there are plans stored in the adjacent table code, as well as breadth-first traversal of the algorithm, as well as to verify the main function. Platform: |
Size: 2048 |
Author:熊龙龙 |
Hits:
Description: This project solve 8 puzzle with breadth first search. I wrote this program for Artificial Intelligence lesson. Platform: |
Size: 35840 |
Author:somatco |
Hits:
Description: 一个python程序,实现了无向图的结构模拟,以及广度优先搜索的算法,以及显示最短路径之一。用leo+ulipad实现。-A python program to realize the structure of an undirected graph simulation, as well as the breadth-first search algorithm, and display one of the shortest path. By leo+ ulipad achieved. Platform: |
Size: 2048 |
Author:周鹏 |
Hits:
Description: 采用双向广度优先搜索的方法搜索出在一定意义下最佳的解题步骤,并指导我系学生姚刚用DELPHI V5.0开发了一个相应的电脑游戏。本文首先介绍了该算法的基本思想,然后通过完整的PASCAL源程序及其注释给出该算法的具体的实现,最后给出搜索的结果。-Bidirectional breadth-first search method to search out the best in some sense the problem solving steps, and to guide my students just use the DELPHI V5.0 Yao has developed a corresponding computer games. This paper introduces the basic idea of the algorithm, and then complete PASCAL source code and comments are given concrete implementation of the algorithm, search results are given. Platform: |
Size: 24576 |
Author:钟 |
Hits:
Description: 2. 设计一个程序,实现文件查找。文件查找操作是一项非常基本的操作,一般的文件查找操作采用递归算法,实际上是采用“深度优先”的策略。请设计一个基于“广度优先”算法的文件查找程序。
提示:由于要找的文件往往距离待查文件夹最近的文件加中。因此,基于“广度优先”算法的文件查找的效率会优于“深度优先”算法。可以将待搜索的文件夹放入一个队列,然后列出该文件夹下所有成员:如果是文件,则与查找条件进行匹配;如果是文件夹,则将其放入队列。在次从队列头取文件夹,执行同样逻辑,直到队列为空。
- Design a program, implementation file search. File search operation is a very basic operating, general file search operation recursively algorithm, is actually use "depth-first" strategy. Please design a based on "breadth first search program files" algorithm. Platform: |
Size: 1024 |
Author:guang |
Hits:
Description: 广度优先搜索重排九宫格实例,一个简单的对算法的实现-Breadth first search rearrangement of JiuGongGe examples, a simple to the realization of the algorithm
Platform: |
Size: 11592704 |
Author:汪鹏 |
Hits:
Description: 以邻接矩阵或邻接表为存储结构,以用户指定的顶点为起始点,实现无向连通图的深度优先及广度优先搜索遍历,并输出遍历的结点序列-The adjacency matrix or adjacency list for the storage structure to user-specified vertex as a starting point to achieve a connected undirected graph of the depth-first and breadth-first search traversal, and the output node traversal sequence Platform: |
Size: 25600 |
Author:huaidiwu |
Hits:
Description: This the source-code for the algorithm breadth-first search.-This is the source-code for the algorithm breadth-first search. Platform: |
Size: 14336 |
Author:idomiralin |
Hits:
Description: c语言,算法,对指定文件夹进行广度优先搜索,输出文件名-C language, algorithm, for the specified folder is breadth first search, the output file name Platform: |
Size: 72704 |
Author:嘎嘎 |
Hits: