practiceGraphs solutions

practiceGraphs solutions - EECS 310, Fall 2011 Instructor:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EECS 310, Fall 2011 Instructor: Nicole Immorlica Practice Problems: Graph Theory 1. Does there exist a (simple) graph with five vertices of the following degrees? If so, draw such a graph. If not, explain why. (a) 3 , 3 , 3 , 3 , 2 Solution: Yes, draw a complete graph on 4 vertices, and then split one edge by adding a vertex in the middle. (b) 1 , 2 , 3 , 4 , 5 Solution: No, the sum of degrees must be even, but 1 + 2 + 3 + 4 + 5 is odd. (c) 0 , 1 , 2 , 2 , 3 Solution: Yes, draw a complete graph on 3 vertices, add a vertex with an edge to one of the first three, and another vertex with no edges. (d) 0 , 1 , 1 , 2 , 4 Solution: No, removing the degree zero vertex leaves a graph on n = 4 vertices with max degree Δ( G ) = 4, but in any simple graph, Δ( G ) n - 1. 2. Draw the graph with the following adjacency matrix: . v 1 v 2 v 3 v 4 v 5 v 1 0 1 0 1 0 v 2 1 0 1 1 0 v 3 0 1 0 0 1 v 4 1 1 0 0 1 v 5 0 0 1 1 0 Solution: Draw a 5-cycle where the order of vertices is v 1 ,v 2 ,v 3 ,v 5 ,v 4 and add an edge between v 2 and v 4 . (a) What is the length of the shortest path between vertices v 1 and v 3 ? Solution: Take powers of the adjacency matrix until the corresponding entry is non-zero to get the answer: 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(b) How many walks of length 3 are there between vertices v 1 and v 2 ? Solution: Cube the adjacency matrix and read off the entry in the 1’st row and 2’nd column to get the answer: 4. (c) Derive a formula that relates the adjacency matrix to the number of triangles in
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course ECON 101 taught by Professor N/a during the Fall '11 term at Middlesex CC.

Page1 / 4

practiceGraphs solutions - EECS 310, Fall 2011 Instructor:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online