1. For minimum vertex cover problem in the following graph give greedy solution = nodes __________________________________ 2-VC solution = nodes __________________________________ Optimal solution = nodes__________________________________ 1 5 6 4 7 2 9 8 10 3
4 6 3 1 1 7 2.2 12 6 3 8 2 5 6 4 4 2. For the following graph, find Double MST tour _______________________________ MST-heuristic tour _______________________________ Cristofides heuristic matching _______________________________ Cristofides Tour _______________________________ 3 8 4 6 3 9 1 7 1 2 7 1 2.2 12 6 3 8 2 a 5 6 6 4 5 4 4
3 . In the rectilinear metric for points given below find - The minimum Steiner tree (bold), its length is _________________ - The minimum spanning tree (dashed), its length is _______________ the approximation ratio of the MST heuristic in this case is _________ Approximation error in % ________________
4. For the 3-CNF f = (x’ +y+z)& (x+y’+z’)&(x+y+z’)& (x’+y’+z)&(x’+y+z’) &(x’+y’+z’) give 0-1 assignment to variables such that f=1 __________________ give 0-1 assignment to variables such that f=0 __________________ Draw the corresponding graph and mark the maximum independent set
5. Prove, that the following problem is in class NP - A thief robbing a store finds n items; the i-th item is worth Vi dollars and weight Wi pounds, where Vi and Wi are integers. He can carry at most W pounds in his knapsack. Find items maximizing a value of the load.
6. In the following graph list the vertices in Maximum Independent Set___________________________ Maximum clique___________________________ 3 6 2 4 7 5 1 8 9
1. Use dynamic programming find longest common subsequences of the following two sequences x and y: ___________________ Show all details, and circle the resulted subsequence letters. (20pts.) y B E A D E A x 0 0 0 0 0 0 0 B 0 A 0 D 0 E 0
4. Johnson’s algorithm is applied to the graph below. (20pts) Give the modified weight of the edge (2,6) ___________ The shortest path from 2 to 3 is ________ 5 5 3 3 4 -5 2 6 3 -3 12 -5 17 -7 4 11 1 7 9
1. (10pts) Given 3 points with their Cartesian coordinates A=(645,763), B=(478,529), C=(937,1187) Give the final content of the stack in Graham’s algorithm for convex hull for these 4 points A, B and C (check the order!):
1. For Graham’s scan finding convex hull of the point set given below: - Give the sorted sequence of points for Graham scan _________________ - Show the content of the stack after each change - Give the convex hull of this point set _________________ (20pts) empty 4 5 2 3 4 7 1
1. Below given a point set in the rectilinisr metric (the height/width of any cell=1) where the closest pair of points should be found using divide and conquer. Show - the first partition of the point set (draw a line) the closest pair in the left part (connect solid), left = _______ , and the right part (connect solid), right = _______ the middle strip (shade) pairs in the middle strip for which distances should be computed (connect dashed) closest pair in the middle strip (connect solid) (20pts)
6. Below given a point set in the Euclidean metric. Draw - Voronoi regions(dashed lines) - Voronoi graph / Delanau triangulation (solid edges) - minimum spanning tree (double edges)
8. Below given a point set in the octiliniar metric (the height/width of any cell=1) connect edges of the minimum spanning tree the length of the minimum spanning tree is _____________
1. Below given a point set in the Euclidean metric. Draw - Voronoi regions (dashed edges) - Voronoi graph / Delanau triangulation (solid edges) - minimum spanning tree (double edges)
2 . In the RECTILINIAR metric for points given below find: a) the MST, its length is _______ c) the Cristofides tour is (enumerate points in visited order) ______________________________________________ d) its length is ___________ b) the 2-MST tour, is (enumerate points in visited order) ___________________________________________ 1 1 2 3 2 3 4 4 5 6 5 6 7 7 8 9 a 8 9 a c b c b d e d e e) the Optimal tour (enumerate points in visited order) __________________________________________ f) its length is _________ g) the minimum Steiner Tree, its length is ____________ 1 1 2 3 2 3 4 4 5 6 5 6 7 7 8 9 a 8 9 a c b c b d e d e
Hashing Matrix Chain Multiplication Knapsack Segment Intersection LP and ILP Stable Marriage Stainer points