图和图像的无关性
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).
基本术语(Glossary)
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:
图何时等于树
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
终于有时间再温习下算法了,接下来是实现。