1、Definition: A graph G =(V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges.Each edge has either one or two vertices associated with it, called its endpoints. An edge is said to connect its endpoints.
2、图的类型:
1)有向图:规定了边的方向。
2)无向图:不规定边的方向。
3)简单图:没有环,每对顶点只有一条边相连,属于无向图。
4)多重图:每对顶点有不止一条边相连,属于无向图。
5)伪图:在多重图的基础上,可能有环,属于无向图。
6)简单有向图:有向图,没有多重边或者环。
7)有向多重图:有向图,允许多重边或者环。
8)混合图:有向图和无向图的混合,允许多重边和环。
一图胜千言...
Remark:There is no standard terminology for graph theory. So, it is crucial that you understand
the terminology being used whenever you read material about graphs.
3、一些基本术语/概念:
1)(无向图的)度
就是每个顶点连了多少条边,记为deg(v)。
握手定理:2m=Σdeg(vi),m是边数
2)出度和入度
Definition: The in-degree of a vertex v, denoted by deg−(v), is the number ofedges which terminate at v.The out-degree of
v,denote deg+(v), is the number of edges with v as their initial vertex. Note that a loop at a vertex contributes 1 to both the in degree
and the out-degree of the vertex.
3)图的连通性
关节点、桥。强连通分量这个概念只在有向图中有,指的是有向图的一个最大的连通子图。
4、二分图
一张图可以分成两个顶点集V1和V2,这两个顶点集中的顶点两两不相连,而只存在从V1到V2的边。二分图可以用染色的方式确定,
用两种颜色依次给顶点着色,如果最后邻接的顶点都不同色,则这个图是二分图。
5、图的表示(重点)
1)邻接矩阵
2)关联矩阵
3)邻接表
6、图算法(重点)
1)图的遍历
①深度优先搜索
②广度优先搜索
2)最短路径算法
Dijkstra算法等
3)。。。