Computer Science 280 Fall 2002 Homework 10 Solutions

Similar documents
Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

Math 15 - Spring Homework 2.6 Solutions 1. (2.6 # 20) The following graph has 45 vertices. In Sagemath, we can define it like so:

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Math Summer 2012

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

Graph Theory Mini-course

CS 2336 Discrete Mathematics

5 Graphs

Number Theory and Graph Theory

Algorithms Activity 6: Applications of BFS

CSE 331: Introduction to Algorithm Analysis and Design Graphs

Graphs. Pseudograph: multiple edges and loops allowed

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Graph Theory Questions from Past Papers

Ma/CS 6b Class 26: Art Galleries and Politicians

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

INTRODUCTION TO GRAPH THEORY. 1. Definitions

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

Introduction III. Graphs. Motivations I. Introduction IV

CMSC 380. Graph Terminology and Representation

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

Fundamental Properties of Graphs

Two Characterizations of Hypercubes

Graphs and Discrete Structures

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

The Lower and Upper Forcing Edge-to-vertex Geodetic Numbers of a Graph

Notes for Recitation 9

Solutions to In-Class Problems Week 4, Fri

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M.

CS 280 Problem Set 10 Solutions Due May 3, Part A

Algorithms. Graphs. Algorithms

Worksheet for the Final Exam - Part I. Graphs

Planar graphs. Chapter 8

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Week 9: Planar and non-planar graphs. 7 and 9 November, 2018

Majority and Friendship Paradoxes

An Introduction to Graph Theory

Math236 Discrete Maths with Applications

Problem Set 2 Solutions

Discharging and reducible configurations

Assignment 4 Solutions of graph problems

Module 11. Directed Graphs. Contents

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Graph Theory Day Four

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

Pick s Theorem and Lattice Point Geometry

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

How many colors are needed to color a map?

Notes for Recitation 8

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

Graphs and networks Mixed exercise

Lecture 22 Tuesday, April 10

EXTREME POINTS AND AFFINE EQUIVALENCE

K 4,4 e Has No Finite Planar Cover

Matching and Planarity

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) We will be interested in s.t. ( )~1. To gain some intuition note ( )

Varying Applications (examples)

LAMC Advanced Circle October 9, Oleg Gleizer. Warm-up

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) 2 ( ) ( )

Week 9: Planar and non-planar graphs. 1st and 3rd of November, 2017

Elements of Graph Theory

Lecture 8: PATHS, CYCLES AND CONNECTEDNESS

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Graphs II: Trailblazing

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Topic 10 Part 2 [474 marks]

On median graphs and median grid graphs

Course Introduction / Review of Fundamentals of Graph Theory

Math 485, Graph Theory: Homework #3

Discrete Mathematics Course Review 3

Matchings in Graphs. Definition 1 Let G = (V, E) be a graph. M E is called as a matching of G if v V we have {e M : v is incident on e E} 1.

Graph Theory. Part of Texas Counties.

Minimum Cycle Bases of Halin Graphs

Basics of Graph Theory

Basic Definitions and Concepts Complement to the Prologue and to Chapter 1, Respecting the Rules

Discrete Mathematics I So Practice Sheet Solutions 1

Hamiltonian cycles in bipartite quadrangulations on the torus

Professor: Padraic Bartlett. Lecture 9: Trees and Art Galleries. Week 10 UCSB 2015

Face Width and Graph Embeddings of face-width 2 and 3

Indicate the option which most accurately completes the sentence.

Combining Isometries- The Symmetry Group of a Square

A Reduction of Conway s Thrackle Conjecture

ON THE STRONGLY REGULAR GRAPH OF PARAMETERS

Graph (1A) Young Won Lim 4/19/18

WUCT121. Discrete Mathematics. Graphs

2010 SMT Power Round

CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH Warm-Up: See Solved Homework questions. 2.2 Cartesian coordinate system

An Investigation of the Planarity Condition of Grötzsch s Theorem

Undirected Network Summary

Foundations of Discrete Mathematics

2. CONNECTIVITY Connectivity

8 Colouring Planar Graphs

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

Transcription:

Computer Science 280 Fall 2002 Homework 10 Solutions Part A 1. How many nonisomorphic subgraphs does W 4 have? W 4 is the wheel graph obtained by adding a central vertex and 4 additional "spoke" edges to the cycle graph C 4. We didn't talk about wheel graphs in class, but they are defined on page 448 of the text. When counting subgraphs, keep in mind that a graph is a subgraph of itself and that, by definition, a graph must have at least one vertex. There are a total of 45 subgraphs. A breakdown of the number by the number of vertices is as follows: No of vertices No of edges No of nonisomorphic subgraphs 1 0 1 2 0 1 2 1 1 3 0 1 3 1 1 3 2 1 3 3 1 4 0 1 4 1 1 4 2 2 4 3 3 (triangle, U, Y) 4 4 2 (square, triangle with arm) 4 5 1 (square with diagonal) 5 0 1 5 1 1 5 2 2 5 3 4 (triangle, U, Y, VI) 5 4 6 (triangle with arm, snake, long Y, square, triangle with segment, X) 5 5 6 (triangle with elbow-arm, triangle with 2 arms on one vertex, triangle with arms on separate vertices, square with arm, square with diagonal, pentagon) 5 6 5 (bow-tie, square with diagonal and arm, square with diagonal and center point, square with triangle, square with diagonal and arm-not-touching diagonal) 5 7 2 (2 ways to remove one edge) 5 8 1

2 The distance between two vertices in a graph is the length of the shortest path between them. The radius at v for a graph is the maximum over all distances between v and some other vertex of the graph. The radius of a graph is the minimum over all vertices v of the radius at v. The diameter of a graph is the maximum over all distances between two distinct vertices. Denote radius and diameter of a graph by r and d respectively. a. Find the radius and diameter of K 6. r = d = 1 b. Find the radius and diameter of Q 5. r = d = 5 c. Find the radius and diameter of C 9. r = d = 4 d. Find the radius and diameter of K 5,7. r = d = 2 Part B 3 G is a digraph with 1000 vertices. It is known that G has one weakly connected component of size 700. It is also known that G has one strongly connected component of size 500; there are other strongly connected components but they are of smaller size. We first observe that the strongly connected component is a subgraph of the weakly connected component. The reason is that G has only 1000 vertices in total, and so, this means that the weakly and strongly connected components share common vertices. However, since any strongly connected component is also weakly connected, it then follows that the strongly connected component is a subgraph of the weakly connected component. a. Suppose Breadth First Search started at vertex u visits 650 vertices. Is vertex u in the weakly connected component? Explain. Yes, it is in the weakly connected component. Suppose u is not in the weakly connected component, then there is no path from u to any of the vertices in the weakly connected component. So there should only be at most 300 vertices visited by Breadth First Search

(BFS). But because BFS visited 650 vertices, therefore the initial assumption that u is not in the weakly connected component is false. b. Is vertex u in the strongly connected component? Explain. No, u is not necessarily in the strongly connected component. From (a), we have established that u must be in the weakly connected component. And we know that since BFS visited 650 vertices, all the vertices in the strongly connected component were visited. As it is unknown how the edges in G point, therefore it is inconclusive whether BFS was started within the strongly connected component. c. Suppose a Breadth First Search started at vertex v visits 600 vertices when the search is run normally and also visits 600 vertices when the search is run on the graph in which all directed edges are reversed. Is vertex v in the strongly connected component? Explain. Yes, it is in the strongly connected component. Let S denote the strongly connected component. Let u be a vertex in S. In both runs of BFS, all the vertices of S are visited. This is because each run of BFS visited 600 vertices, which means that it must have visited at least some of the vertices in S. But since there is a path between any two vertices in S, it then means that all the nodes in S are visited. and so there is a path from u to v and from v to u. If v is not in S, then there should not be a path from u to v and from v to u. Therefore, v is in S. d. Prove that for any vertex w in the graph's large weakly connected component, either there is a path from v to w or a path from w to v. From (c), in each run of BFS, there are 100 vertices visited that do not belong to S. By the same reasoning employed in (c), if any of the 100 vertices is common, then that vertex should belong to S. However, none of the 100 vertices are in S, therefore there are all different. In particular, there is no vertex in the weakly connected component that is not visited by BFS, because a total of 700 (= 500 + 100 + 100) different vertices are visited. Since v (from (c)) can be any vertex in the weakly connected component, it means that all the vertices in G can be visited by running both a forward and a backward BFS from v. Equivalently, it means that for any vertex w in the graph s large weakly connected component, either there is a path from v to w or a path from w to v. 4. a. Can 7 line-segments be drawn in the plane so that each intersects exactly 5 others? Prove your answer. No, it cannot be done. Proof: We can transform the situation to a graph and solve it using the Handshaking Theorem. Construct a graph G with 7 vertices such that each edge denotes a line segment. We connect 2 vertices by an undirected edge if and only if the line segments represented by the 2 vertices intersect each other. Since each line segment intersects exactly 5 others,

it means that the degree of each vertex is 5. Therefore, we want to prove that such a graph G with 7 vertices, all of degree 5, cannot be constructed. This means that the sum of the degrees of the vertices of G is 35, which is odd. However, by the Handshaking Theorem, the sum must be even. Therefore, G is impossible. b. Suppose a simple graph has exactly two vertices of odd degree. Prove that there is a path between between the two odd-degree vertices. We shall prove it by contradiction: Suppose a simple graph G has 2 vertices v 1 and v 2 such that both v 1 and v 2 are of odd degree and there is no path between v 1 and v 2. Since there is no path between v 1 and v 2, it therefore means that we can let v 1 be a vertex in G 1 and v 2 be a vertex in G 2 such that G 1 and G 2 are both subgraphs of G and they are connected graphs on their own. Because G has exactly 2 vertices of odd degree, it implies that every other vertex in G is of even degree. Therefore, every vertex in G 1 and G 2, other than v 1 and v 2, is of even degree. This means that the sum of the degrees of the vertices in both G 1 and G 2 is odd. However, by the Handshaking Theorem, the sum of the degrees of the vertices in both G 1 and G 2 must be even. Therefore, there is a contradiction and our initial assumption that there is no path between v 1 and v 2 is false. As such, we prove the claim and that there is indeed a path between the 2 odd-degree vertices in a simple graph with exactly 2 vertices of odd degree. Part C 4 For each of the following descriptions, determine whether the described graph is possible or impossible. Explain your answer; for credit, your explanation must be brief and easy to understand. (Hint: To show a graph is possible, either refer to one of the standard graph types or explain how to construct such a graph.) a. A simple graph with 8 vertices, all of degree 3. Possible. Q 3 is a graph that satisfies the description. For a diagram of Q 3, refer to Figure 6 on page 449 of Discrete Mathematics and Its Applications, 4 th Edition by Kenneth H. Rosen. b. A simple graph with 6 vertices, all of degree 5. Possible. K 6 is a graph that satisfies the description. For a diagram of K 6, refer to Figure 3 on page 448 of Discrete Mathematics and Its Applications, 4 th Edition by Kenneth H. Rosen. c. A simple, planar graph with 5 vertices, all of degree 4. Impossible. Let G be such a graph. Since every vertex is of degree 4, v = 4 and e = 10. By Corollary 1 of Euler s Theorem, if G is a simple, planar graph and v 3, then e 3v 6. However, the inequality is not satisfied in this case. Therefore, G cannot be a simple, planar graph.

d. A simple, planar graph with 8 vertices and 20 edges. Impossible. Let G be such a graph such that v = 8 and e = 20. By Corollary 1 of Euler s Theorem, if G is a simple, planar graph and v 3, then e 3v 6. However, the inequality is not satisfied in this case. Therefore, G cannot be a simple, planar graph. 6 For each of the following descriptions, determine whether the described graph is possible or impossible. Explain your answer; for credit, your explanation must be easy to understand. a. A simple, connected graph with 10 vertices: 4 of degree 3, 6 of degree 1. Possible. An example is as follows: b. A simple, connected graph with 20 vertices: 8 of degree 3, 12 of degree 1. Impossible. Let G be such a graph. By the Handshaking Theorem, we know that e = 18. As given, v = 20. Since an edge connects 2 nodes, therefore there must be at least 19 edges for G to be connected. However, in this case, e < 19, so this graph is impossible. c. A simple, connected graph with 20 vertices: 10 of degree 3, 5 of degree 2, 5 of degree 1. Impossible. By the Handshaking Theorem, the sum of the degrees of the vertices of any simple, connected, undirected graph is even. However, in this case, the sum of degrees is 45, which is odd, so this graph is impossible. a. d. A simple, planar, connected graph with 44 vertices: 43 of degree 3, one of degree 43. Possible. W 43 is a graph that satisfies the description.