This preview shows page 1. Sign up to view the full content.
Unformatted text preview: CSE 413, Analysis of Algorithms Fall Semester, 2004 Assignment 1: The Hamiltonian Cycle Problems Due Date : Sept. 8, 2004 (at the beginning of CSE 413 class) 1. Exercise 1.9, page 6 of the textbook. (This is in fact an instance of the Hamiltonian cycle problem ; also see pages 243-244 for the definition of this problem.) (20 points) 2. Design an algorithm to solve the Hamiltonian cycle problem for an arbitrary undirected graph (not necessarily dense), and analyze the time complexity of your algorithm. The input is an undirected graph represented by an adjacency matrix (see page 84 for the adjacency matrix representation of a graph). The output is either a sequence of vertices corresponding to a Hamiltonian cycle in the graph (if one exists), or a “No” if the input graph does not admit any Hamiltonian cycle. (20 points) 3. Write and test a computer program for Problem 2 in either C or C++ ( Java would be fine too). For this exercise, submit your program source code and your output on some testfine too)....
View Full Document
- Spring '11