[Solved] CSE421-Homework 2

$25

File Name: CSE421-Homework_2.zip
File Size: 160.14 KB

SKU: [Solved] CSE421-Homework 2 Category: Tag:
5/5 - (1 vote)

P1) Let G be a tree. Use induction to prove that we can color vertices of G with 2 colors such that the endpoints of every edge have opposite colors. For example, in the following picture we give a coloring of the given tree with black and white.

P2) Given a connected undirected graph G = (V,E), design an O(m+n)-time algorithm to find a vertex in G whose removal does not disconnect G. Note that as a consequence this algorithm shows that every connected graph contains such a vertex.

P3) Given.a connectd graph G = (V,E) with n vertices and m edges.

CSE421: Design and Analysis of Algorithms April 8, 2020
Homework 2Shayan Oveis Gharan Due: April 16, 2019 at 11:59 PM
  1. Design an O(m+n) time algorithm that outputs the vertices of a cycle of G. If G has no cycles, your algorithm should output no cycle. For example, given the following graph your algorithm may output 1,2,4,3,
  2. We say a tree T is a spanning tree of G if T has n 1 edges and edges of T are a subset of E. Suppose that m n. Prove that G has at least 3 spanning trees. For example, the following are 3 spanning trees of the above graph (note that the above graph has 7 spanning trees):
  3. Given a connected graph G = (V,E) with m n, design an O(m+n) time algorithm that outputs three spanning trees of G. For example, in the above examples, your algorithm may output as follows (note that the format of the output is not important):

(1,2),(2,3),(3,4)

(1,2),(2,3),(2,4)

(1,2),(1,3),(3,4)

2-1

P4)Given a graph G = (V,E) with n vertices such that the degree of every vertex of G is at most k. Furthermore, assume that in every connected component of G there is a vertex of degree smaller than k. Show that we can color vertices of G with k colors such that the endpoints of every edge of G have distinct colors. See the following graph for an example (here k = 3)

P5) Extra Credit: Prove that we can color the edges of every graph G with two colors (red and blue) such that, for every vertex v, the number of red edges touching v and the number of blue edges touch v differ by at most 2.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSE421-Homework 2
$25