This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473G Final Exam Questions (December 13, 2005) Fall 2005 You have 180 minutes to answer six of these questions. Write your answers in the separate answer booklet. You may take the question sheet with you when you leave. 1. Describe and analyze an algorithm that randomly shuffles an array X [1 .. n ], so that each of the n ! possible permutations is equally likely, in O ( n ) time. (Assume that the subroutine Random ( m ) returns an integer chosen uniformly at random from the set { 1 , 2 , , . . . , m } in O (1) time.) 2. Let G be an undirected graph with weighted edges. A heavy Hamiltonian cycle is a cycle C that passes through each vertex of G exactly once, such that the total weight of the edges in C is at least half of the total weight of all edges in G . Prove that deciding whether a graph has a heavy Hamiltonian cycle is NPcomplete. 4 8 2 7 5 3 5 1 12 8 6 5 9 A heavy Hamiltonian cycle. The cycle has total weight 34; the graph has total weight 67. 3. Suppose you are given a directed graph G = ( V, E ) with capacities c : E → ZZ + and a maximum flow F :...
View
Full Document
 Spring '11
 Smith
 Graph Theory, Vertex, Glossary of graph theory, Graph theory objects, Perfect graph

Click to edit the document details