Connectivity in graphs
暂无分享,去创建一个
a b x u y w v c d Typical question: Is it possible to get from some node u to another node v ? Example: Train network – if there is path from u to v , possible to take train from u to v and vice versa. If it's possible to get from u to v , we say u and v are connected and there is a path between u and v Paths a b x u y w v c d A path between u and v is a sequence of edges that starts at vertex u, moves along adjacent edges, and ends in v. A simple path is a path that does not repeat any edges What are all the simple paths from z to w ? What are all the simple paths from x to y? How many paths (can be non-simple) are there from x to y? Connectedness a b x u y w v c d A graph is connected if there is a path between every pair of vertices in the graph Example: This graph not connected; e.g., no path from x to d A connected component of a graph G is a maximal connected subgraph of G Example Prove: Suppose graph G has exactly two vertices of odd degree, say u and v. Then G contains a path from u to v .