190 likes | 305 Views
Lecture 19: CONNECTIVITY Sections 8.1 - 8.3. CS1050: Understanding and Constructing Proofs . Spring 2006. Jarek Rossignac. Lecture Objectives. Learn graph terminology. What are the types of graph?. Graph G(V,E) V = set of vertices (non-empty)
E N D
Lecture 19: CONNECTIVITYSections 8.1 - 8.3 CS1050: Understanding and Constructing Proofs Spring 2006 Jarek Rossignac
Lecture Objectives • Learn graph terminology
What are the types of graph? Graph G(V,E) • V = set of vertices (non-empty) • E = set of edges (unordered pairs of distinct elements of V) Loop Multiple edge Simple Graph Multigraph Pseudograph Directed graph
Examples of graphs • Simple: • Multigraph (multiple edges): • Pseudograph (multiple edges and loops): • Directed (loops): • Directed multigraph (multiple edges and loops):
Classify graphs Edge between A and B means: • They know each other • A is a parent of B • They compete • A has called B • Page A has a link to page B • Have collaborated • A has beaten B in round-robin
What is adjacency and incidence? In an undirected graph An edge E between vertices A and B is incident with them. A and B are the endpoints of E E connects A and B Vertices A and B are adjacent (neighbors) when there is an edge incident with both
What is the degree of a vertex? In an undirected graph with e edges: The degree deg(V), also called valence, of vertex V is the number of times V is used by an edge (twice by an incident loop). A vertex with degree one is pendent (dead end). A vertex with degree zero is isolated. The sum of the degrees of all vertices if 2e. There is an even number of edges of odd degree.
Directed graph terminology E is a directed edge from A to B (denoted AB) • A is adjacent to B • A is the initial vertex of E • B is adjacent from A • B is the terminal or end vertex of E A=B if E is a loop In-degree deg–(V) of vertex V is the number of edges for which it is a terminal vertex Out-degree deg+(V) of vertex V is the number of edges for which it is an initial vertex
Cycles A cycle Cn is has n vertices and n-edge the form a cycle C3 is a triangle C5
Complete graphs Kn A complete graph Kn of n vertices is a simple graph with one edge between each pair K3 is a triangle K5
Wheels A wheel Wn is a cycle with n vertices plus an additional vertex connected to all W5
Bipartite graphs A graph is bipartite when itd vertices can be colored (red/green) so that each edge joins vertices of different colors It is complete bipartite if there is an edge between each pair of vertices of different color
Subgraph A subgraph of G has a subset of the edges and vertices of G • It must include all the vertices bounding all its edges!
Representing graphs • Vertices (x,y) , edges (a,b) • Adjacency list: vertices (x, y, a, b, …) • Adjacency matrix • Simple graphs (binary, symmetric) • Multiple graph: integer entries count number of edges • Loops on diagonal • Incidence matrix: edges/vertices • Two 1s per column
Isomorphism Two graphs G and H are isomorphic if there is a bijection between their vertices that leads to the same set of edges. Expensive to compute, since there are n! vertex/label assignments Necessary conditions (invariants) help quickly decide that two graphs are NOT isomorphic • same number of vertices and edges • same degree list
Assigned Reading • 8.1, 8.2, 8.3
Assigned Homework • P 544-545: 3, 4, 5, 6, 7 • P 555: 12, 27, 29f, 36, 42 • P 562: 1, 10, 38, 39, 49, 57a, 68
Assigned Project • P9: Spanning tree