final(5) - CS 473G Final Exam Questions (December 13, 2005)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 NP-complete. 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

This note was uploaded on 10/14/2011 for the course ECON 101 taught by Professor Smith during the Spring '11 term at West Virginia University Institute of Technology.

Page1 / 2

final(5) - CS 473G Final Exam Questions (December 13, 2005)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online