图论基本算法及其应用.pptVIP

  • 4
  • 0
  • 约小于1千字
  • 约 48页
  • 2020-07-07 发布于福建
  • 举报
图论 图的概念 G=(V, E 图的基本概念 有向图、顶点、入度、出度、弧、环 无向图、边、路径、顶点的度、邻接 简单图、完全图 平面图、二分图 图的存储结构 ■邻接矩阵 graph=Record ex:array [1.vtxptr] of vertex arc:array[vtxptr, vtxptr] of vertex 邻接表 表节点 type arcptr= arcnode arcnode=record adjvex: vtxptr nextarc:arcptr; info:{和弧有关的其他信息} vex=Record exdata:和顶点有关的其他信息} firstarc: arcptr; adnlist=array v rl of vexnode 拓扑排序 ■网线从机房连接到办公室 在机房,所有网线从左到 右编号为1,2,3,,N 给出每两条线是否交义的 信息,请计算办公室内从 左到右各条线的编号 求拓扑序列 FUNC toporder(var dig adjlisttp): boolean init(top2); m ve[1.n]=0 while Not empty(top1)do [i: =pop( top1); push(top2,j); m:=m+1 k:-firstadj

文档评论(0)

1亿VIP精品文档

相关文档