.已知连通图如下
().给出本图的邻接表
().若从顶点B出发对该图进行遍历在()的基础上分别给出本图的按深度优先搜索和按广度优先搜索的顶点序列
().写出按深度优先搜索的递归程序【厦门大学 三 (%分)】
.试编写从某一顶点出发按深度优先搜索策略在图的邻接表上遍历一个强连通图的非递归算法(用类PASCAL语言)【燕山大学 十 (分)】
设计算法以实现对无向图G的深度遍历要求将每一个连通分量中的顶点以一个表的形式输出例如下图的输出结果为()()()
(注本算法中可以调用以下几个函数 firstadj(gv)返回图g中顶点v的第一个邻接点的号码若不存在则返回
nextadj(gvw)返回图g中顶点v的邻接点中处于w之后的邻接点的号码若不存在则返回nodes(g)返回图g中的顶点数) 【合肥工业大学 五(分)】
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []