1. For minimum vertex cover problem in the following graph give

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Chapter 4 Partition I. Covering and Dominating.
Lecture 15. Graph Algorithms
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Instructor Neelima Gupta Table of Contents Approximation Algorithms.
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
Comments We consider in this topic a large class of related problems that deal with proximity of points in the plane. We will: 1.Define some proximity.
Approximations of points and polygonal chains
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Greed is good. (Some of the time)
Chapter 4 The Greedy Approach. Minimum Spanning Tree A tree is an acyclic, connected, undirected graph. A spanning tree for a given graph G=, where E.
NP-Complete Problems Polynomial time vs exponential time
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Convex Hull(35.3) Convex Hull, CH(X), is the smallest convex polygon containing all points from X, |X|=n Different methods: –incremental: moving from left.
Combinatorial Algorithms
Chapter 3 The Greedy Method 3.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
1 -1 Chapter 1 Introduction Why Do We Need to Study Algorithms? To learn strategies to design efficient algorithms. To understand the difficulty.
1 Assignment 4. This one is cancelled since there is a solution on website. I new assignment will be given on Nov. 28. (Due on Friday of Week 14. Drop.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
1 NP-Complete Problems Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph, the length.
NP-Complete Problems (Fun part)
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
CPSC 411, Fall 2008: Set 4 1 CPSC 411 Design and Analysis of Algorithms Set 4: Greedy Algorithms Prof. Jennifer Welch Fall 2008.
1 NP-Complete Problems (Fun part) Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph,
Approximation Algorithms
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
What is Computer Science About? Part 2: Algorithms.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Projects Network Theory VLSI PSM 1. Network 1. Steiner trees
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – March 12, 2009 ILP – Integer Linear Programming Approximate algorithm.
Routing Topology Algorithms Mustafa Ozdal 1. Introduction How to connect nets with multiple terminals? Net topologies needed before point-to-point routing.
© The McGraw-Hill Companies, Inc., Chapter 1 Introduction.
Steiner Tree Problem Given: A set S of points in the plane = terminals
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Introduction to NP Instructor: Neelima Gupta 1.
2016/3/13Page 1 Semester Review COMP3040 Dept. Computer Science and Technology United International College.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Divide and Conquer. Problem Solution 4 Example.
Honors Track: Competitive Programming & Problem Solving Seminar Topics Kevin Verbeek.
Greedy Technique.
Lecture 2-2 NP Class.
Lecture 5 Dynamic Programming
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Hamiltonian Cycle and TSP
Lecture 22 Complexity and Reductions
Lecture 5 Dynamic Programming
Lecture 5 NP Class.
OVERVIEW 1-st Midterm: 3 problems 2-nd Midterm 3 problems
Computational Geometry (35/33)
Exam 2 LZW not on syllabus. 73% / 75%.
Course Contents: T1 Greedy Algorithm Divide & Conquer
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
Algorithm Design Methods
What is Computer Science About? Part 2: Algorithms
Chapter 1 Introduction.
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Algorithms CSCI 235, Spring 2019 Lecture 30 More Greedy Algorithms
Department of Computer Science & Engineering
3. Brute Force Selection sort Brute-Force string matching
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

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