文件名称:database-Graph
介绍说明--下载内容均来自于网络,请自行研究使用
一:实验目的:
(1)掌握图的存储思想及其存储实现。
(2)掌握图的深度、广度优先遍历算法思想及其程序实现。
(3)掌握图的常见应用算法的思想及其程序实现。
(4)理解有向无环图、最短路径等算法
二:实验内容:
以下实验内容,1和2为必做内容,3为选做内容。
1.有向图
(1)键盘输入数据,建立一个有向图的邻接表,并输出该邻接表。
(2)在有向图的邻接表的基础上计算各顶点的度,并输出。
(3)以有向图的邻接表为基础实现并输出它的拓扑排序序列。
(4)在主函数中设计一个简单的菜单,分别调试上述算法。 2.无向图
(1)建立一个无向图的邻接表,并输出该邻接表。
(2)采用邻接表存储实现无向图的深度优先遍历。。
(3)采用邻接表存储实现无向图的广度优先遍历。
(4)在主函数中设计一个简单的菜单,分别调试上述算法。
-A: purpose of the experiment:
(1) master plans storage ideas and storage implementation.
(2) control chart depth, breadth-first traversal algorithm ideas and program implementation.
(3) The common application of algorithms to master plans and program ideas to achieve.
(4) understand a directed acyclic graph, shortest path algorithms such as
II: test content:
The following experiment content, 1 and 2 will do the content, 3 for the election to do the content.
1 digraph
(1) keyboard input data, the establishment of a directed graph of the adjacency list, and outputs the adjacency table.
(2) in a directed graph based on the adjacency table to calculate the vertex degree, and output.
(3) has the adjacency table and output it as the basis for a topological sort of sequence.
(4) in the main function in a simple menu design, debugging the algorithm, respectively. (2) undirected graph
(1) the establishment of an undirected graph adjacency list, and
(1)掌握图的存储思想及其存储实现。
(2)掌握图的深度、广度优先遍历算法思想及其程序实现。
(3)掌握图的常见应用算法的思想及其程序实现。
(4)理解有向无环图、最短路径等算法
二:实验内容:
以下实验内容,1和2为必做内容,3为选做内容。
1.有向图
(1)键盘输入数据,建立一个有向图的邻接表,并输出该邻接表。
(2)在有向图的邻接表的基础上计算各顶点的度,并输出。
(3)以有向图的邻接表为基础实现并输出它的拓扑排序序列。
(4)在主函数中设计一个简单的菜单,分别调试上述算法。 2.无向图
(1)建立一个无向图的邻接表,并输出该邻接表。
(2)采用邻接表存储实现无向图的深度优先遍历。。
(3)采用邻接表存储实现无向图的广度优先遍历。
(4)在主函数中设计一个简单的菜单,分别调试上述算法。
-A: purpose of the experiment:
(1) master plans storage ideas and storage implementation.
(2) control chart depth, breadth-first traversal algorithm ideas and program implementation.
(3) The common application of algorithms to master plans and program ideas to achieve.
(4) understand a directed acyclic graph, shortest path algorithms such as
II: test content:
The following experiment content, 1 and 2 will do the content, 3 for the election to do the content.
1 digraph
(1) keyboard input data, the establishment of a directed graph of the adjacency list, and outputs the adjacency table.
(2) in a directed graph based on the adjacency table to calculate the vertex degree, and output.
(3) has the adjacency table and output it as the basis for a topological sort of sequence.
(4) in the main function in a simple menu design, debugging the algorithm, respectively. (2) undirected graph
(1) the establishment of an undirected graph adjacency list, and
(系统自动生成,下载前可以参看下载内容)
下载文件列表
数 据 结 构 图操作.doc