无向图1(UNDIRECTED GRAPHS)

图和图像的无关性

A drawing gives us intuition about the structure of the graph; but this intuition can be misleading, because the graph is defined independently of the drawing.

For example, the two drawings at left represent the same graph, because the graph is nothing more than its (unor-dered) set of vertices and its (unordered) collection of edges (vertex pairs).

无向图1(UNDIRECTED GRAPHS)_第1张图片

基本术语(Glossary)

无向图1(UNDIRECTED GRAPHS)_第2张图片

无向图1(UNDIRECTED GRAPHS)_第3张图片

无向图1(UNDIRECTED GRAPHS)_第4张图片

无向图1(UNDIRECTED GRAPHS)_第5张图片

A bipartite graph is a graph whose vertices we can divide into two sets such that all edges connect a vertex in one set with a vertex in the other set:

无向图1(UNDIRECTED GRAPHS)_第6张图片

图何时等于树

a graph G with V vertices is a tree if and only if it satisfies any of the following five conditions:

■ G has V-1 edges and no cycles.
G有V-1条边 & 不含环
■ G has V-1 edges and is connected.
G有V-1条边 & 连通的
■ G is connected, but removing any edge disconnects it.
G是连通的 & 删除任意一条边都会使其不连通
■ G is acyclic, but adding any edge creates a cycle.
G是无环图 & 添加任意一条边都会产生一条环
■ Exactly one simple path connects each pair of vertices in G.
任意一对顶点仅有一条边

API

无向图1(UNDIRECTED GRAPHS)_第7张图片

终于有时间再温习下算法了,接下来是实现。

你可能感兴趣的:(数据结构与算法)