求图的中心点。设V是有向图G的一个顶点, V的偏心度定义为: Find the central point of the graph. Let V be a vertex of the graph G, the definition of the eccentricity of V is: max{dist(w,v),∀w∈V(G)} 如果v是有向图G中具有最小偏心度的顶点,则称顶点v是G的中心点。 If the eccentricity of v is minimal in the graph G, then we call V a central point of G. 请从以下代码语句中选择正确的5条,填入空白处。按空白的标号顺序依次列出代码语句的标号,用一个空格分隔。如A F D H C Please choose 5 statements from the following, and put them into the blanks. List the number of the statement you choose according to the order of the blanks, and separate them with a single blank space. For instance, A F D H C. C++代码: void FLOYD_PXD(AdjMatrix g){ // 对以带权邻接矩阵表示的有向图g,求其中心点。 AdjMatrix w = g; for(k = 1; k <= n; k++) for(i="1;" i++) for(j="1;" j j++) if((1) ) (2) ; v="1;" dist="MAXINT;" j++){ s="0;" i (3) (4) ){ (5) } for printf("有向图g的中心点是顶点%d,偏心度%d\n", v, dist); }python代码:def floyd_pxd(adjmatrix g): adjmatrix w="g" k in range(1, n+1): range (1, if (): print("有向图g的中心点是" + str(v) ",顶点偏心度" str(dist)) 选项: src="http://static.jiandati.com/a9585d5-chaoxing2016-284362.png">
第1题
第2题
第5题
设有向图 G=(V,E),顶点集,边集。若从顶点开始对图进行深度优先遍历,则可能得到的不同遍历序列个数是( ) 。
A、2
B、3
C、4
D、5
第6题
设有向图 G=(V,E),顶点集,边集。若从顶点开始对图进行深度优先遍历,则可能得到的不同遍历序列个数是( ) 。
A、2
B、3
C、4
D、5
第10题
E={<0,1>,<1,2>,<0,3>,<1,2>,<1,4>,<2,4>,<4,3>},
现按深度优先遍历算法遍历,从顶点0出发,所得到的顶点序列是()。
A.0,1,3,4,2
B.0,1,2,4,3
C.0,1,2,3,4
D.0,1,4,2,3
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!