图的定义
图G由顶点集V和边集E组成,记为G=(V,E),其中V(G)表示图G中顶点的有限非空集;E(G)表示图G中顶点之间的关系(边)集合。若V={v1,v2,.....,vn},则用|V|表示图G中顶点的个数,也称图G的阶,
,用|E|表示图G中的边的条数
注意:线性表可以是空表,树可以是空树,但图不可以是空,即V一定是非空集

图逻辑结构的应用


无向图
若E是无向边(简称边)的有限集合时,则图G为无向图。边是顶点的无序对,记为(v,w)或(w,v),因为(v,w)=(w,v),其中v,w是顶点。可以说顶点w和顶点v互为邻接点。边(v,w)依附于顶点w和v,或者说边(v,w)和顶点v,w相关联。
G2={V2,E2}
V2={A,B,C,D,E}
E2={(A,B),(B,D),(B,E),(,C,D),(C,E),(D,E)}

有向图
若E是有向边(弧)的有限集合时,则图G为有向图。边是顶点的有序对,记为(v,w),其中v称为弧尾,w称为弧头。(v,w)称为从顶点v到顶点w的弧,也称v邻接到w,或w邻接自v。
G1={V1.E1}
V1={A,B,C,D,E}
E1={<A,B>,<A,C>,<A,D>,<A,E>,<B,A>,<B,C>,<B,E>,<C,D>}

简单图
简单图------不存在重复边:不存在顶点到自身的边

多重图
多重图------图G中某两个结点之间的边数多于一条,又允许顶点通过同一条边和自己关联,则G为多重图

顶点的度、入度、出度
无向图:
有向图 :

顶点------顶点的关系描述

连通,强连通图
任意两个点之间都可以直接连通或者间接联通

子图
无向图:

有向图:

连通分量
无向图中的极大连通子图称为连通分量
极大连通子图:子图必须连通,且包含尽可能多的顶点和边

例:

强连通分量
有向图中的极大强连通子图称为强连通分量
极大强连通子图:子图必须去哦阿门和连通,且包含尽可能多的边

生成树
连通图的生成树是包含图中全部顶点的一个极小连通子图
极小连通子图:边尽可能的少,但要保持连通

生成森林
在非连通图中,连通分量的生成树构成了非连通图的生成森林
边的权、带权图/网

几种特殊形态的图


总结:
