文件名称:disanti
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:2.67kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
(1)自选存储结构,输入含n个顶点(用字符表示顶点名称)和e条边的图G;
(2)指定任意顶点x为初始顶点,对图G作DFS遍历,输出DFS(深度优先)顶点序列(提示:使用栈实现DFS);
(3)指定任意顶点x为初始顶点,对图G作BFS(广度遍历),输出BFS顶点序列(提示:使用队列实现BFS);
(5)输入顶点x,查找图G:若存在含x的顶点,则删除该结点及与之相关连的边,并作DFS遍历(执行操作3);否则输出信息“不存在x”;
(6)判断图G是否是连通图,输出信息“YES”/“NO”;
(7)如果选用的存储结构是邻接矩阵,则用邻接矩阵的信息生成图G的邻接表-(1) on-demand storage structure, input containing n vertices (with characters in the name of that vertex) and e edges of the graph G
(2) specify arbitrary vertex x as the initial vertex of the graph G for the DFS traversal, output DFS (depth-first) vertex sequence (Hint: Use the stack to achieve DFS)
(3) specify arbitrary vertex x as the initial vertex of the graph G for the BFS (breadth traversal), the output sequence of BFS vertex (hint: the realization of the use of queue BFS)
(5) input vertex x, find graph G: If there is a vertex with x, then the deletion of the nodes and edges associated with them, and DFS traversal (3 steps) Otherwise output "does not exist x"
(6) to determine whether graph G is a connected graph, output "YES"/"NO"
(7) If I choose the storage structure is the adjacency matrix, the adjacency matrix of the information used to generate the adjacency list graph G
(2)指定任意顶点x为初始顶点,对图G作DFS遍历,输出DFS(深度优先)顶点序列(提示:使用栈实现DFS);
(3)指定任意顶点x为初始顶点,对图G作BFS(广度遍历),输出BFS顶点序列(提示:使用队列实现BFS);
(5)输入顶点x,查找图G:若存在含x的顶点,则删除该结点及与之相关连的边,并作DFS遍历(执行操作3);否则输出信息“不存在x”;
(6)判断图G是否是连通图,输出信息“YES”/“NO”;
(7)如果选用的存储结构是邻接矩阵,则用邻接矩阵的信息生成图G的邻接表-(1) on-demand storage structure, input containing n vertices (with characters in the name of that vertex) and e edges of the graph G
(2) specify arbitrary vertex x as the initial vertex of the graph G for the DFS traversal, output DFS (depth-first) vertex sequence (Hint: Use the stack to achieve DFS)
(3) specify arbitrary vertex x as the initial vertex of the graph G for the BFS (breadth traversal), the output sequence of BFS vertex (hint: the realization of the use of queue BFS)
(5) input vertex x, find graph G: If there is a vertex with x, then the deletion of the nodes and edges associated with them, and DFS traversal (3 steps) Otherwise output "does not exist x"
(6) to determine whether graph G is a connected graph, output "YES"/"NO"
(7) If I choose the storage structure is the adjacency matrix, the adjacency matrix of the information used to generate the adjacency list graph G
(系统自动生成,下载前可以参看下载内容)
下载文件列表
第三题.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.