University of Delaware Computer and Information Sciences CIS621 Algorithm Design and Analysis Homework Set #4 Due Thursday, November 16, 1995

14.

a) 23.2-5

b) 23.2-6 You can assume the graph is connected. Definition: A graph is bipartite if there is a cut {S, V-S} such that every edge has one endpoint in S and one in V-S.

15.

a) 23.1-4

b) 23.5-5

16. A scorpion on n vertices is an undirected graph that has a vertex of degree 1 (the tail), connected to a vertex of degree 2 (the body), connected to a vertex of degree n-2 (the head). The other n-3 vertices (the feet) can be arbitrarily interconnected. Give an O(n) algorithm for deciding whether or not an arbitrary graph is a scorpion, assuming that the graph is represented by an adjacency matrix. Alternative: For half credit (5 points) you may do the problem assuming that the graph is represented using adjacency lists.

Hint: you may find exercise 23.1-6 a useful “warm-up”.

17.

a) 24.1-5

b) Suppose a weighted graph G has a unique edge with the maximum weight. Give an efficient algorithm to determine if G has a minimum spanning tree which includes the maximum weight edge.

EC-3. 23.3-10

Remember to put your solutions to separate problems on separate pages and to put your name on each.