离散数学·图

Graph


目录

1 Bipartite Graphs 二部图
2 Bipartite Graphs and Matchings
3 Some Applications of special types of graphs
4 New graphs from old

1 Bipartite Graphs 二部图

concept:
相邻adjacent、领域neighborhood、度degree、

1.1 Handshaking Theorem 握手原理

G = <V,E> 无向图,edges = m, then 2 m = ∑ v ∈ V d e g ( v ) 2m=\sum_{v\in V}deg(v) 2m=vVdeg(v)

If a graph has 5 vertices, can each vertex have degree 3?
Solution: This is not possible by the handshaking theorem, because the sum of the degrees of the vertices 3 * 5 = 15 is odd.

1.2 Theorem 2

An undirected graph has an even number of vertices of odd degree

奇数度的vertice有偶数个

1.3 Theorem 2

1.3.1 Directed Graph
  • in-degree 入度
    • 终点是该点的边的个数
  • out-degree 出度
    • 从该点出发的边的个数

有向图中边的数目=点的出(入)度之和
∣ E ∣ = ∑ v ∈ V d e g − ( v ) = ∑ v ∈ V d e g + ( v ) |E|=\sum_{v\in V}deg^{-}(v) = \sum_{v\in V}deg^{+}(v) E=vVdeg(v)=vVdeg+(v)

1.4 Complete Graph

A complete graph(完全图) on n vertices, denoted by Kn, is the simple graph that contains exactly one edge between each pair of distinct vertices.
在这里插入图片描述

1.5 Cycles and Wheel

1.5.1 Cycle 圈图

圈图记为Cn,有n个点,从1到n首尾链接构成回路
在这里插入图片描述

1.5.2 Wheel 轮图

A wheel(轮图) Wn is obtained by adding an additional vertex to a cycle Cn for n ≥ 3 and connecting this new vertex to each of the n vertices in Cn by new edges.也就是,在圈图的基础上加上一个顶点并且与其他点都有变相连。
在这里插入图片描述

1.6 二部图

G =<V,E>为二部图:

V可以划分为两个不相交的子集 V 1 和 V 2 V_1 和 V_2 V1V2,并且E中每条边都连接了V1中的一个点和V2中的一个点。也就是说,E中没有边在V1或V2内部相连接
在这里插入图片描述
在这里插入图片描述

1.7 完全二部图

A complete bipartite graph(完全二部图) Km,n is a graph that has its vertex set partitioned into two subsets V1 of size m and V2 of size n such that there is an edge from every vertex in V1 to every vertex in V2.也就是说, ∀ a ∈ V 1 , ∀ b ∈ V 2 , 都 有 ∃ e ∈ E , 使 得   e   c o n n e c t   a   a n d   b \forall a\in V_1, \forall b\in V_2,都有\exist e\in E,使得 \ e\ connect\ a\ and\ b aV1,bV2,eE,使 e connect a and b
e.g…
在这里插入图片描述

1.8 New graphs from old

Definition: A subgraph of a graph G = (V,E) is a graph (W,F), where W ⊂ V and F ⊂ E. A subgraph H of G is a proper subgraph of G if H ≠ G.
在这里插入图片描述

2 Representing Graphs and Graph Isomorphism(同构)

2.1 Adjacency Lists 邻接表

2.2 Adjacency Matrices(邻接矩阵)

邻接矩阵的拓展形式:用值表示边的数目,而不是单一的Yes or No

2.3 Incidence Matrices(关联矩阵)

Let G = (V, E) be an undirected graph with vertices { v1, v2, … vn }and edges {e1, e2, … em}. The incidence matrix with respect to the ordering of V and E is the n × m matrix.也就是描述边和点的关系的矩阵 M = [ m i j ] M=[m_{ij}] M=[mij]

e.g...

2.4 图同构

The simple graphs G1 = (V1, E1) and G2 = (V2, E2) are isomorphic if there is a one-to-one and onto function f from V1 to V2 with the property that a and b are adjacent in G1 if and only if f(a) and f(b) are adjacent in G2 , for all a and b in V1 . Such a function f is called an isomorphism. Two simple graphs that are not isomorphic are called nonisomorphic.
也就是说,在G1中a,b相连接,在G2中f(a)f(b)相连接,并且这种映射是one-to-one、Onto的(双射)。one-to-one correspondence = one-to-one and onto.



考虑度、边、点

3 通路Path

3.1 Path

**Definition:**Let n be a nonnegative integer and G an undirected graph. A path of length n from u to v in G is a sequence of n edges e1, … , en of G for which there exists a sequence x0 = u, x1, …, xn-1, xn = v of vertices such that ei has, for i = 1, …, n, the endpoints xi-1 and xi.

  • 如果是简单图,则用vertice sequence来表示path
  • length>0且回到起点的path称为circuit
  • 如果path不包含重复的edge,那么称为simple path.

3.2 六度分离理论 Six degree of separation

在熟人关系图中,两个人之间有一条路径如果有一个人链连接这些人,在链中相邻的两个人互相认识。在这张图中,有六个人连接Kamini和Chingss。

3.3 连通度Connectedness

Definition: An undirected graph is called connected(连通的) if there is a path between every pair of vertices. An undirected graph that is not connected is called disconnected. We say that we disconnect a graph when we remove vertices or edges, or both, to produce a disconnected subgraph.也就是每对顶点间都是有通路的(直接相连或者间接相连)的。

3.4 连通分支

Definition: A connected component(连通分支) of a graph G is a connected subgraph of G that is not a proper subgraph of another connected subgraph of G. A graph G that is not connected has two or more connected components that are disjoint and have G as their union. The number of connected component is usually denoted as p(G).也就是说,连通分支是最小的联通子图,并且对于一个不连通的图而言,必是由许多不相交的连通分支组成,称这些不相交的连通分支个数为p(G)

3.5 点割集 Vertix cut set

Definition: An undirected graph G= <V,E>, if there is a set V’⊂V, such that p(G-V’) > p(G), and for any V’’⊂V’, we have p(G-V’’) = p(G),then V’ is a vertex cut set of G. If V’ only includes one vertex v,then v is cut-vertex.也就是说,①G去掉 V’ 中的点之后,图的连通分支p增加[p(G-V’)>p(G)],②并且去掉V’中任意一个真子集都不会带来连通分支[p(G-V’’)=p(G)]的增加,则V’称为无向图中的一个点割集

3.6 边割集 edge cut set

Definition: An undirected graph G= <V,E>。If there eixts E’⊆E such that p(G-E’)>p(G) and for any E’’⊆E’ we have p(G-E’’) =p(G),then E’ is an edge cut set of G. If E’ only includes one edge e,the we call e is a cut edge or bridge.和点割集类似,删除一组边后破坏连通性,且这组边的真子集都不破坏连通性,把点->边,割点->桥。

3.7 点连通度Vertex Connectivity

Definition:G is an undirected graph. κ(G)=min{|V’||V’is a vertex cut set of G} is called the vertex connectivity of G. For Kn, we define κ(G)=n-1. For any disconnected graph, κ(G)=0. 也就是最小点割集所包含顶点数,并且记 K n = n − 1 K_n=n-1 Kn=n1,因此Kn无点割集
使连通图G成为一个不连通图需要删除的点的最小数目,记为K,则图也可称作K-连通图

3.8 Edge Connectivity(边连通度)

**Definition:**G is an undirected graph. λ(G)=min{|E’||E’is an edge cut set of G} is called the vertex connectivity of G. For Kn, we define λ(G)=n-1. For any disconnected graph, λ(G)=0. 也就是最小边割集所包含边数,并且记 K n = n − 1 K_n=n-1 Kn=n1
使连通图G成为一个不连通图需要删去的边的最少数目,记为R,则图也可称作R边-连通图

3.7-3.8 总结

1. 若 G 连 通 , E ′ 为 边 割 集 , 则 p ( G ′ − E ′ ) = 2 2. 若 G 连 通 , V ′ 为 点 割 集 , 则 p ( G ′ − V ′ ) ≥ 2 1.若G连通,E^{'}为边割集,则p\left (G^{'}-E^{'}\right ) = 2 \\ 2.若G连通,V^{'}为点割集,则p\left ( G^{'}-V^{'} \right )\geq 2 1.GEp(GE)=22.GVp(GV)2

3.9 强连通、弱连通

Definition: A directed graph is strongly connected(强连通) if there is a path from a to b and a path from b to a whenever a and b are vertices in the graph. 也就是任意两个顶点a,b,既可以从a到b,又可以从b到a.
Definition: A directed graph is weakly connected (弱连通) if there is a path between every two vertices in the underlying undirected graph, which is the undirected graph obtained by ignoring the directions of the edges of the directed graph. 也就是把有向图的方向忽视后,任意两个点间都有path.

3.10 算法:Counting Paths between Vertices

我们可以利用图的邻接矩阵来求图中两个顶点之间的路径数。
Theorem:
设G是一个图,其邻接矩阵a关于顶点的顺序为v1,…,vn(有向边或无向边,允许有多条边和循环)。 用 矩 阵 A r = ( i , j ) 表 示 , 其 中 a i , j 表 示 从 v i 到 v j 长 度 为 r 的 不 同 路 径 数 其 中 r > 0 是 一 个 正 整 数 . 如 下 图 A 3 中 a 1 , 1 = 2 表 示 从 v 1 到 v 1 且 长 度 为 3 的 路 径 数 目 为 2 用矩阵A^r=(i,j)表示,其中a_{i,j}表示从vi到vj长度为r的不同路径数其中r>0是一个正整数.如下图A^3中a_{1,1}=2表示从v1到v1且长度为3的路径数目为2 Ar=(i,j)ai,jvivjrr>0.A3a1,1=2v1v132
注意与矩阵的表示方式有所区别,不是从0开始。

D是最短路径(Dijkstra):从A1开始看,如果到Ar中对应的I,j是1则为从i->j的最短路径为r
计算方法:

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值