无向图 G = (V,E) Graph size parameters: n =| V |, m =| E |.
图的表示方式:
简单路径:无环
connected graph: 任意两个点之间都有路径
tree: An undirected graph is a tree if it is connected and does not contain a cycle.
第二条和第三条等价
数学归纳法:
当n, 无环 有n-1 条边,
当n+1, 新加 的点度为1 ??, 所以有n-1+1=n
无向图任何顶点可以设为根,所以需要定义一个。
s-t connectivity problem. Given two nodes s and t, is there a path between s and t?