图论基本算法-朱全民.ppt

图论基本算法-朱全民.ppt

图论 朱全民 图 图的概念 G=(V,E) 图的基本概念 有向图、顶点、入度、出度、弧、环 无向图、边、路径、顶点的度、邻接 简单图、完全图 平面图、二分图 图的存储结构 邻接矩阵 graph=Record vex:array[1..vtxptr] of vertex; arc:array[vtxptr, vtxptr] of vertex; 邻接表 表节点 type arcptr=^arcnode; arcnode=record adjvex:vtxptr; nextarc:arcptr; info: … {和弧有关的其他信息} end; vex=Record vexdata: …{和顶点有关的其他信息} firstarc:arcptr; end; adjlist=array [vtxptr] of vexnode; 拓扑排序 网线从机房连接到办公室 在机房,所有网线从左到右编号为1,2,3,…,N 给出

文档评论(0)

1亿VIP精品文档

相关文档