CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 8 - Due: 04/28/11 in class.
1
Hamilton cycle
Do Exercise 34.2-3 (p.1065). Note the definition on p.1062 does not reveal the cycle itself.
2
NPC
Do Exercise 34.5-1 (p.1100): the subgraph iso
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 7 - Due: 04/21/11 in class.
1
Shortest path
Do Exercise 24.1-1 (on p. 654). I did not explain the values, but they are just like the trace-back
pointers we encountered before.
2
Shortest pa
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 6 - Due: 04/14/11 in class.
1
Excercise 22.2-7
Do Exercise 22.2-7 on p. 602. You do not have to give a rigorous proof of the correctness of your
algorithm, but you do need to give an intuit
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 5 - Due: 03/24/11 in class.
1
Excercises for DP Algorithms on Sequences
1. Given A = cfw_1, 4, 2, 9, 7, 5, 8, 2, find the longest increasing subsequence (LIS) Show your work:
the filled dyn
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 3 - Due: 03/1/11 in class.
1
Probabilistic analysis
1. You toss a coin, which gives head with probability p and tail with probability 1 p. How many
times do you expect to toss until you get
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 4 - Due: 03/17/11 in class.
1
Heap
Do parts (a), (b) and (c) of Problem 6.2 (p.167) in textbook. For part (a), tell me where the d children
(if exists) of a node i will be located in the ar
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 2 - Due: 02/17/11 in class.
1
Search in O(logn) time
Given a sorted array of distinct integers A[1, n], you want to find out whether there is an index i for
which A[i] = i. Give an algorith
CSE 3500 Algorithms and Complexity Yufeng Wu Spring 2011
Homework 1 - Due: 02/01/10 in class.
1. Matrix Multiplication
Given two n by n matrices A and B, write an algorithm to compute the product of A and B. Then,
analyze your algorithm to find out how ma