This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Chap . 23 Graphs . Combinatorial Optimization Sec . 23 . 1 Graphs and Digraphs Problem Set 23 . 1 . Page 958 13 . Adjacency matrix of a digraph . The given figure shows 4 vertices, denoted by 1, 2, 3, 4, and 4 edges e 1 , e 2 , e 3 , e 4 . This is a digraph (directed graph), not just a graph, because each edge has a direction, indicated by an arrow head. Thus, edge e 1 goes from vertex 1 to vertex 2, and so on. And there are two edges connecting vertices 1 and 3. These have opposite directions ( e 2 from vertex 1 to vertex 3, and e 3 from vertex 3 to vertex 1). In a graph there cannot be two edges connecting the same pair of vertices because we have excluded this (as well as edges going from a vertex back to the same vertex, as well as isolated vertices; see Fig. 477). An adjacency matrix A of a graph or digraph is always square, n u n , where n is the number of vertices. This is the case, regardless of the number of edges. Hence in the present problem, A is 4 u 4. The definition on p. 956 shows that in our case, a 12 U 1 because the digraph has an edge (namely, e 1 ) which goes from vertex 1 to vertex 2. Now comes a point about which you should take some time to think a little. a 12 is the entry in Row 1 and Column 2. Since e 12 goes from 1 to 2, by definition, the row number is the number of the vertex at which an edge begins , and the column number is the number of the vertex at which the edge ends . Think this over and look at the matrix in Example 2 on p. 957. Since there are three edges that begin at 1 and end at 2, 3, 4, and since there is no edge that begins at 1 and ends at 1 (no loop), the first row of A is 1 1 1. Since the digraph has 4 edges, the matrix A must have 4 ones, the three we have just listed and a fourth resulting from the edge that goes from 3 to 1. Obviously, this gives the entry a 31 U 1. In this way you obtain the matrix shown in the answer on p. A53 of the book. 15 . Graph for a given adjacency matrix . Since the matrix is 4 u 4, the corresponding graph G has 4 vertices. Since the matrix has 4 ones and each edge contributes 2 ones, the graph G has 2 edges. Since a 12 U 1, the graph has the edge u 1,2 U ; here you have numbered the 4 vertices by 1, 2, 3, 4, and 1 and 2 are the endpoints of this edge. Similarly, a 34 U 1 implies that G has the edge u 3,4 U with endpoints 3 and 4. An adjacency matrix of a graph is always symmetric. Hence you must have a 21 U 1 because a 12 U 1, and similarly, a 43 U 1 since a 34 U 1. Differently formulated, the vertices 1 and 2 are adjacent, they are connected by an edge in G , namely, by u 1,2 U . This results in a 12 U 1 as well as a 21 U 1. Similarly for u 3,4 U . 23 . Incidence matrix B of a digraph . The incidence matrix of a graph or digraph is an n u m matrix, where n is the number of vertices and m is the number of edges. Hence each column contains 2 ones (in the case of a graph), or a one and a minus one (in the case of a digraph). In Prob. 23 you have 3 vertices and 5 edges, hence...
View Full Document
- Spring '12
- Graph Theory, Vertex, Dijkstra, Combinatorial optimization