2a
a
F2012 CS 466 Assignment 10 Submission
Chen Fei Du
_
November 27, 2012
Problem 1(a)
Consider the algorithm that iterates through all n(n 1)(n 2) ordered triples of distinct
vertices, computing for each triple (31, 52, 33), the sets
V, 1m {1) E
CS 466/666 Fall 2012
A. Lubiw
due Tuesday November 27, 5 PM
ASSIGNMENT 10
You are on your honour to present your own work and acknowledge your sources.
1. [20 marks] Given a complete graph G = (V, E ) with n vertices and a distance function
d : V V R+ sat
CS 466/666 Fall 2012 A. Lubiw
due Tuesday November 20, 5 PM
ASSIGNMENT 9
You are on your honour to present your own work and acknowledge your sources. 1. [20 marks] Suppose you have n rectangles r1 , . . . , rn , where rectangle ri has height h(ri ) and w
CS 466/666 Fall 2012
A. Lubiw
due Tuesday November 13, 5 PM
ASSIGNMENT 8
You are on your honour to present your own work and acknowledge your sources.
1. [10 marks] In class we looked at the weighted set cover problem, where the sets have weights,
and we
CS 466/666 Fall 2012 A. Lubiw
due Tuesday November 6, 5 PM
ASSIGNMENT 7
You are on your honour to present your own work and acknowledge your sources.
1. [15 marks] This question is about approximation algorithms for Vertex Cover. (a) [5 marks] Prove that
CS 466/666 Fall 2012
A. Lubiw
due Tuesday October 9, 5 PM
ASSIGNMENT 4
DO NOT COPY. ACKNOWLEDGE YOUR SOURCES.
1. [10 marks] This question is about using a union nd data structure to solve the least common
ancestors problem. In a rooted tree, the least com
CS 466/666 Fall 2012
A. Lubiw
due Tuesday October 23, 5 PM
ASSIGNMENT 5
You are on your honour to present your own work and acknowledge your sources.
1. [10 marks] There are many algorithms that need to use a large random prime number. Give
a randomized a
CS 466/666 Fall 2012 A. Lubiw
due Tuesday October 2, 5 PM
ASSIGNMENT 3
DO NOT COPY. ACKNOWLEDGE YOUR SOURCES.
1. [10 marks] In class we explored the virtues of laziness for heaps. This question is about the virtues of laziness for binary search trees. The
CS 466/666 Fall 2012
A. Lubiw
due Tuesday September 25, 5 PM
ASSIGNMENT 2
DO NOT COPY. ACKNOWLEDGE YOUR SOURCES.
1. [10 marks] There are sorting algorithms that beat the (n log n) lower bound if operations
other than comparisons are allowed, in particular
CS 466/666 Fall 2012 A. Lubiw
due Tuesday September 18, 5 PM
ASSIGNMENT 1
DO NOT COPY. ACKNOWLEDGE YOUR SOURCES. Review questions on NP-completeness. 1. [5 marks] For this part, you may assume that the Hamiltonian Cycle Problem is NP-complete for undirect