CSIS 0250B Design and Analysis of Algorithms
Assignment 4 Due: 11:55 PM, Apr 2, 2009 Below we assume that all networks have integer edge capacities, and the ow being considered have integer value. In
CSIS0250A Design and Analysis of Algorithms Assignment 1 Due Date: February 11, 2010, 11:59 pm Question 1. (10%) Solve the following recurrence relations (i.e., nd out what is T (n), using big-O notat
Posted on 16 April 2009 14:08
>Dear Prof. Lam
>In assignment 5 question 3, can I quote that 3D matching can be reduced
>to ZOE (Dasgupta, p254) and then do ZOE -> CNFSAT?
>Since CNFSAT is NP-complete,
More NP complete problems
3SAT Clique Knapsack 3D matching Vertex Vertex Cover subset sum Hamiltonian path set cover Hamiltonian path TSP
Todays lecture sketches some reductions. You should fill in th
The first NP-complete problem
The Satisfiability problem (SAT): Given a formula F, find a satisfying truth assignment or else report that none exists. E.g., (x1 x2) (~ x2) : x1 = true, x2 = false x2 (
NP-completeness
Most recognized theoretical aspect of CS Methodology for showing some hard problems cant be solved efficiently. Reading: Dasgupta et al. Chapter 8 Cormen et als book (not recommeded)
1
Edmond & Karp Algorithm
Identical structure as the Ford and Fulkerson algorithm.
Start with zero flow f (i.e., f(u,v)=0 for all (u,v) E). Repeat Construct the residual network Gf with forward & backwa
Faster maximum flow algorithms
Notations.
n = number of vertices; m = number of edges; integer C = max capacity.
Ford & Fulkerson: O(nmC) time. Scaling FF: O(m2 log C) time. Edmond & Karp: O(m2 n) tim
Maximum Maximum flow
To remember: max flow = min cut Reading
Dasgupta: Chapter 7.2 Cormen et al. : Chapter 26.1-2
Assignment 1
Average 29.4 / 50 (expectation: 30 35) Max 45 / 50 Difficulty rating: ~4
All-pairs shortest paths
Input:
a weighted directed graph G = (V,E) edge weight w(e) can be +ve or ve;
To find: the shortest (smallest weight) path between all pairs of vertices. Assumption: G has no
Sequence similarity
DNA: From a computer scientists viewpoint, DNA is a sequence of characters chosen from the alphabet cfw_A, C, G, T. Human genome contains ~3 billion characters.
An A4 paper contain
Polynomials & FFT Reading Cormen et al. : Chapter 30 (recommended) Dasgupta et al. : 2.6 Lipson, Elements of Algebra & Algebraic Computing (available in the library)
Fast Fourier transform: math & alg
Posted on 15 April 2009 09:49
>Hi Prof. Lam,
>Thanks for your explanation!
>One other question: Assignment 5, question 1
>Given the graph G=(V,E)
>CLIQUE-3 can only handle the problem with clique size
Posted on 14 April 2009 09:49
>I want to ask in Q3, We have to prove "3D <=p CNFSAT" or "CNFSAT <=p 3D"?
>Q3 asks for a polynomial time algorithm to reduce 3D matching to
CNFSAT. The other direction c
Posted on 14 April 2009 09:49
>I want to ask in Q3, We have to prove "3D <=p CNFSAT" or "CNFSAT <=p 3D"?
Q3 asks for a polynomial time algorithm to reduce 3D matching to
CNFSAT. The other direction ca
Posted on 25 March 2009 18:38
> Dear Prof. Lam,
> I want to clarify question 1. The question said: "You are given a matching M of G with
> n - 1 edges". I want to ask is that every edges in these n-1
Posted on 25 March 2009 10:00
> Hi Prof. Lam,
> Can I apply the Ford-Fulkerson Algorithm when the source is not in-degree 0 and the
> sink is not out-degree 0? as the assumption is that no edge enters
Posted on 26 February 2009 10:37
> Dear Prof. Lam,
> in question 2, you said that we are required to find the "weight of the
> shortest cycle", by "shortest", do you mean that the total number of edge
Posted on 24 February 2009 11:48
> Dear Prof. Lam,
> In the assignment, can i use some well-known algirithm in the
> intermediate steps? Like Q3, i want to use dijkstra algorithm on G and reverse G to
Teaching plan
Reading Assignment
Dasgupta et al's book MIT (Cormen et al) book
Written Assingment
Week 1, Jan 14 Week 2, Jan 21 Week 3, Jan 28 Week 4, Feb 4 Week 5, Feb 11 Week 6, Feb 18 Week 7, Feb 2
Shortest paths revisited
Input:
a weighted directed graph G = (V,E) edge weight w(e) can be +ve or ve; vertexes s and t
To find: the shortest (smallest weight) path from s to t (s-t path). path). Reca
Dynamic programming
Greedy algorithm. Build up a solution incrementally by optimizing some local criterion. Remark. May not give optimal solutions; when yes, it often involves non-trivial analysis. Di
CSIS0250B Design and Analysis of Algorithms Sample Solution to Assignment Five Questions 1 - 5 carry 20 marks each. 1. The input to the Clique-3 problem consists of a graph G and a positive integer b
CSIS 0250B Design and Analysis of Algorithms
Assignment 4 Due: 11:55 PM, Apr 16, 2009 1. Consider the CLIQUE problem restricted to graphs in which every vertex has degree at most 3. Call this problem
CSIS 0250B Design and Analysis of Algorithms
Assignment 4 Sampled Solution 1. As matching M of G with n 1 edges are given, we have 1 vertex on each side of the bipartite graph that are not matched. We
CSIS0250B Design and Analysis of Algorithms Sample Solution to Assignment Three Questions 1 - 4 carry 25 marks each. 1. (Solution by Tong Chiu Man) Assume U = n=1 ai is a multiple of three and ai U i
CSIS 0250B Design and Analysis of Algorithms
Assignment 3 Due: 11:55 PM, Mar 12, 2009 1. Given positive integers a1 , a2 , , an , devise a dynamic programming algorithm to determine whether it is poss
CSIS0250B - Sample solution for Assignment 2 (2009-03-12)
For a general graph, the cost value of any two nodes in the same strongly connected component will be the same since both are reachable from e
CSIS 0250B Design and Analysis of Algorithms
Assignment 2 Due: 11:59 PM, Feb 26, 2009 Warm-up (no need to turn in) 1. Given a directed graph G in adjacency list format, show how to construct the rever