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

Similar documents
DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

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

K 4 C 5. Figure 4.5: Some well known family of graphs

Math 485, Graph Theory: Homework #3

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes.

Math 776 Graph Theory Lecture Note 1 Basic concepts

Math 454 Final Exam, Fall 2005

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Notes 4 : Approximating Maximum Parsimony

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Ma/CS 6b Class 5: Graph Connectivity

HW Graph Theory SOLUTIONS (hbovik)

Number Theory and Graph Theory

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.

These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions.

Lecture 22 Tuesday, April 10

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Assignment 4 Solutions of graph problems

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

Midterm 2 Solutions. CS70 Discrete Mathematics and Probability Theory, Spring 2009

Discrete mathematics , Fall Instructor: prof. János Pach

Solutions to In-Class Problems Week 4, Fri

Matching Theory. Figure 1: Is this graph bipartite?

GRAPH THEORY: AN INTRODUCTION

Indicate the option which most accurately completes the sentence.

WUCT121. Discrete Mathematics. Graphs

Pebbling on Directed Graphs

Math236 Discrete Maths with Applications

Problem Set 2 Solutions

Disjoint directed cycles

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

Characterizations of Trees

Solution to Graded Problem Set 4

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

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Assignment # 4 Selected Solutions

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Graph Theory Questions from Past Papers

8 Matroid Intersection

Parallel Breadth First Search

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8

6. Lecture notes on matroid intersection

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected

Fundamental Properties of Graphs

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

MAT 145: PROBLEM SET 6

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

18 Spanning Tree Algorithms

Counting the number of spanning tree. Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University

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

CS70: Discrete Math and Probability. Fan Ye June 23, 2016

Homework 2. Sample Solution. Due Date: Thursday, May 31, 11:59 pm

2. CONNECTIVITY Connectivity

2. Lecture notes on non-bipartite matching

Discrete mathematics

Lecture 20 : Trees DRAFT

Notes for Recitation 8

{ 1} Definitions. 10. Extremal graph theory. Problem definition Paths and cycles Complete subgraphs

Kruskal s MST Algorithm

CS 2336 Discrete Mathematics

Lecture 8: The Traveling Salesman Problem

Computer Science 280 Fall 2002 Homework 10 Solutions

Problem Set 2 Solutions

Artificial Intelligence

Topic 10 Part 2 [474 marks]

Discrete mathematics II. - Graphs

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Evolution Module. 6.1 Phylogenetic Trees. Bob Gardner and Lev Yampolski. Integrated Biology and Discrete Math (IBMS 1300)

5. Lecture notes on matroid intersection

EDGE MAXIMAL GRAPHS CONTAINING NO SPECIFIC WHEELS. Jordan Journal of Mathematics and Statistics (JJMS) 8(2), 2015, pp I.

Ma/CS 6b Class 13: Counting Spanning Trees

Discrete mathematics

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs

CSE 331: Introduction to Algorithm Analysis and Design Graphs

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.

Module 7. Independent sets, coverings. and matchings. Contents

Greedy algorithms is another useful way for solving optimization problems.

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Scheduling, Map Coloring, and Graph Coloring

Graph Theory Mini-course

Quiz 1 Solutions. [1 point] No hackers are willing to waltz. Solution. x R(x) S(x) [1 point] No artists are unwilling to waltz.

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.

Greedy Algorithms. Previous Examples: Huffman coding, Minimum Spanning Tree Algorithms

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

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

Number Theory and Graph Theory

Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2

CIS 121 Data Structures and Algorithms Midterm 3 Review Solution Sketches Fall 2018

Lecture Overview. 2 Shortest s t path. 2.1 The LP. 2.2 The Algorithm. COMPSCI 530: Design and Analysis of Algorithms 11/14/2013

Planar graphs. Chapter 8

Solutions for the Exam 6 January 2014

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 02/26/15

Graphs and networks Mixed exercise

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

Transcription:

CPS 102: Discrete Mathematics Instructor: Bruce Maggs Quiz 3 Date: Wednesday November 30, 2011 NAME: Prob # Score Max Score 1 10 2 10 3 10 4 10 5 10 6 10 Total 60 1

Problem 1 [10 points] Find a minimum-cost spanning tree for the following graph. Apply Kruskal s Algorithm, The graph has edges of following weights in the increasing order 1,2,3,5,6,8,9,10,12,13,15,16,18 Include edge 1 Include edge 2 Include edge 3 Include edge 5 Include edge 6 Cant include edge 8 because it forms a cycle 2

Include edge 9 Cant include edge 10, it forms a cycle Cant include edge 12 Include edge 13 Hence the minimum spanning tree would have edge with following weights 1,2,3,5,6,9 and 13 3

Problem 2 [10 points] Recall that in an n-node tree, e = n 1, where e is the number of edges in the tree. Also, in any graph, the sum of the degrees of the nodes is 2e. Let n i denote the number of nodes in the tree with degree i, so that n = n 1 +n 2 + +n n 1. (Assume that n > 1, so that n 0 = 0.) Write a formula expressing n 1 as a function of n 2,n 3,...,n n 1. (Hint: Start by writing an equation involving the sum of the degrees of the nodes.) n 1 +2n 2 +3n 3 +...+(n 1)n n 1 = 2e = 2(n 1) = 2(n 1 +n 2 +...+n n 1 1) now subtracting the right hand side from both sides, we have n 1 +n 3 +2n 4 +3n 5 +...+(n 3)n n 1 +2 = 0 so that n 1 = n 3 +2n 4 +3n 5 +...+(n 3)n n 1 +2 4

Problem 3 [10 points] An edge coloring of an undirected graph is an assignment of colors to the edges of a graph so that no two edges incident on the same vertex have the same color. I.e., if vertex u is connected to vertices v 1 and v 2, then the edges {u,v 1 } and {u,v 2 } must have different colors. Suppose that δ is the maximum degree of any node in an undirected graph. Show that the edges can be colored using at most 2δ 1 colors. Color the edges one-by-one. When it is time to color an edge {u,v}, you will always be left with a color among 2δ 1 colors which is different from colors on other edges incident on u or v. Proof of this is below. Each node has a maximum degree of δ. Hence, the maximum number of colors used by edges incident on u excluding edge {u,v} is δ 1 Similarly, The maximum number of colors used by edges incident on v excluding edge {u,v} is δ 1 Maximum colors used by edges which are neighbors of {u,v} is δ 1 + δ 1 = 2 δ 2 Hence, there is one color left among 2 δ 1 colors which can be used to color {u,v} This property holds for every edge {u,v}, hence the graph will not require more than 2 δ 1 colors. 5

Problem 4 [10 points] Prove by strong induction that the nodes of any tree can be colored using at most two colors so that no two adjacent nodes have the same color. (Hint: given an n-node tree, start by removing a single edge to partition the tree into two smaller trees. Then apply the inductive hypothesis.) Proof By Induction: Base Case: A tree with one node can be trivially colored with one color. The Base case is valid Inductive Step: Assume that the theorem is true for all trees with less than k nodes. Consider a tree with k nodes. Divide it into a forest of two sub-trees by removing an edge. These two sub-trees have less than k nodes and hence 2-colorable by inductive assumption. Now look at the two vertices, one from each sub-tree which were incident with the edge we just removed. 1. Case 1: If they both have different colors, putting back the edge will not violate coloring and hence we get back the k node tree which is two colorable 2. Case 2: If they both have same colors, swap colors of nodes in one of the sub-trees, such that the two vertices in consideration have different colors. Now, by case 1, we again get back the original k node tree which is 2-colorable We have covered all cases and shown that a k node tree is two colorable whenever trees with less than k nodes are two colorable. Hence by induction, the theorem has been proved 6

Problem 5 [10 points] An independent set of vertices in an undirected graph is a set of vertices no two of which are adjacent. Show that every n-node tree has an independent set containing at least n/2 vertices. (Hint: every tree can be colored using only two colors, as you showed in the previous problem.) Following up from the previous problem, we know that a tree is 2-colorable. The set of all nodes which have the same color form an independent set. If they did not form an independent set, then atleast two nodes in the set have to be adjacent. This is a contradiction, because two adjacent nodes cannot have same color. Hence, the set of nodes having same color are independent. A tree of n nodes is 2-colorable. Hence it can be divided into two sets, each of which have the same color. By pigeonhole principle, one of these two sets should have atleast n/2 nodes 7

Problem 6 [10 points] Please write True or False next to each of the following statements. No explanation is necessary. 1. Suppose we define a cycle graph as a connected undirected graph in which every vertex has degree two. Then the vertices in a cycle can be colored using two colors so that no two adjacent vertices are assigned the same color. 2. Suppose every edge in an undirected graph has a unique weight. Then there must be a minimum-cost spanning tree that includes the edge with minimum weight. 3. Suppose every edge in an undirected graph has a unique weight. Then there must be a minimum-cost spanning tree that does not include the edge with maximum weight. 4. A bipartite graph is a graph in which the vertices can be partitioned into two sets V 1 and V 2 such that each edge connects a vertex in V 1 to a vertex in V 2. True or false: a tree is a bipartite graph. 5. A Hamiltonian cycle in a graph is a cycle that starts at some vertex v, visits every other vertex exactly once, and ends at v. True or false: every graph contains a Hamiltonian cycle. 1. false: a cycle of length 3 requires 3 colors 2. true: kruskal s algorithm always includes the edge of minimum weight 3. false: if the graph is a tree, then ALL edges must be included 4. true; let V 1 be nodes colored red, let V 2 be nodes colored blue 5. false; a tree is acyclic 8