Fabrizio Frati Dipartimento di Informatica e Automazione Università degli Studi Roma Tre Tecniche Algoritmiche per Grafi e Reti.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

NP-Completeness.
NP-Hard Nattee Niparnan.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
From Approximative Kernelization to High Fidelity Reductions joint with Michael Fellows Ariel Kulik Frances Rosamond Technion Charles Darwin Univ. Hadas.
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Approximation Algorithms
Generalization and Specialization of Kernelization Daniel Lokshtanov.
Combinatorial Algorithms
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
PCPs and Inapproximability Introduction. My T. Thai 2 Why Approximation Algorithms  Problems that we cannot find an optimal solution.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 Refined Search Tree Technique for Dominating Set on Planar Graphs Jochen Alber, Hongbing Fan, Michael R. Fellows, Henning Fernau, Rolf Niedermeier, Fran.
Hardness Results for Problems
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Kernel Bounds for Structural Parameterizations of Pathwidth Bart M. P. Jansen Joint work with Hans L. Bodlaender & Stefan Kratsch July 6th 2012, SWAT 2012,
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
A Membrane Algorithm for the Min Storage problem Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano – Bicocca WMC.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
LIMITATIONS OF ALGORITHM POWER
CES 592 Theory of Software Systems B. Ravikumar (Ravi) Office: 124 Darwin Hall.
Algorithms for hard problems Introduction Juris Viksna, 2015.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
Approximation algorithms
The NP class. NP-completeness
P & NP.
Chapter 10 NP-Complete Problems.
EMIS 8373: Integer Programming
Algorithms for hard problems
Computability and Complexity
Analysis and design of algorithm
ICS 353: Design and Analysis of Algorithms
Constrained Bipartite Vertex Cover: The Easy Kernel is Essentially Tight Bart M. P. Jansen June 4th, WORKER 2015, Nordfjordeid, Norway.
Bart M. P. Jansen June 3rd 2016, Algorithms for Optimization Problems
Constrained Bipartite Vertex Cover: The Easy Kernel is Essentially Tight Bart M. P. Jansen February 18th, STACS 2016, Orléans, France.
Computational Complexity
Approximation Algorithms
Theorem 9.3 A problem Π is in P if and only if there exist a polynomial p( ) and a constant c such that ICp (x|Π) ≤ c holds for all instances x of Π.
Lecture 24 Vertex Cover and Hamiltonian Cycle
Complexity Theory: Foundations
Presentation transcript:

Fabrizio Frati Dipartimento di Informatica e Automazione Università degli Studi Roma Tre Tecniche Algoritmiche per Grafi e Reti

3 CREDITI I° periodo: Lunedì 9:45-11:15 aula N13 Contatti: Ricevimento: mercoledì dalle 17 alle 19 II° periodo: Venerdì 8:00-9:45 aula N7

Struttura del Corso ~ 8 seminari algoritmi, strutture dati, combinatorica, graph drawing… progetti a gruppi di persone problema di ricerca Materiale Didattico slides G. Di Battista, P. Eades, R. Tamassia, I. G. Tollis, Graph Drawing: Algorithms for the Visualization of Graphs, Prentice Hall.

ACM Computing Classification System A.General Literature B.Hardware C.Computer System Organization D.Software E.Data F.Theory of Computation G.Mathematics of Computing H.Information Systems I.Computing Methodologies J.Computer Applications

ACM Computing Classification System C. Computer System Organization 1.Processor Architectures 2.Computer-Communication Networks 3.Application-Based Systems 4.Performance of Systems 5.Computer System Implementations

ACM Computing Classification System C. Computer System Organization 2. Computer-Communication Networks 2.1 Network Architectures 2.2 Network Protocols 2.3 Network Operations 2.4 Distributed Systems 2.5 LAN & WAN 2.6 Internetworking

ACM Computing Classification System A.General Literature B.Hardware C.Computer System Organization D.Software E.Data F.Theory of Computation G.Mathematics of Computing H.Information Systems I.Computing Methodologies J.Computer Applications

ACM Computing Classification System E. Data 1.Data Structures 2.Data Storage Representations 3.Data Encryption 4.Coding and Information Theory 5.Files

ACM Computing Classification System E. Data 1. Data Structures 1.1 Arrays 1.2 Distributed Data Structures 1.3 Graphs and Networks 1.4 Lists, Stacks, and Queues 1.5 Records 1.6 Tables 1.7 Trees

ACM Computing Classification System A.General Literature B.Hardware C.Computer System Organization D.Software E.Data F.Theory of Computation G.Mathematics of Computing H.Information Systems I.Computing Methodologies J.Computer Applications

ACM Computing Classification System F. Theory of Computation 1.Computation by Abstract Devices 2.Analysis of Algorithms and Problem Complexity 3.Logics and Meanings of Programs 4.Mathematical Logic and Formal Languages

ACM Computing Classification System F. Theory of Computation 1. Computation by Abstract Devices 1.1 Models of Computation 1.2 Complexity Measures and Completeness Complexity Hierarchies Machine-Independent Complexity Reducibility and Completeness Relations among Complexity Classes

ACM Computing Classification System F. Theory of Computation 2. Analysis of Algorithms and Problem Complexity 2.1 Numerical Algorithms 2.2 Non-numerical Algorithms and Problems Complexity of Proof Procedures Computations on Discrete Structures Geometrical Problems Pattern Matching Routing and Layout Sequencing and Scheduling Sorting and Searching

ACM Computing Classification System A.General Literature B.Hardware C.Computer System Organization D.Software E.Data F.Theory of Computation G.Mathematics of Computing H.Information Systems I.Computing Methodologies J.Computer Applications

ACM Computing Classification System G. Mathematics of Computing 1.Numerical Analysis 2.Discrete Mathematics 3.Probability and Statistics 4.Mathematical Software

ACM Computing Classification System G. Mathematics of Computing 2. Discrete Mathematics 2.1 Combinatorics 2.2 Graph Theory 2.3 Applications Combinatorial Algorithms Counting Problems Generating Functions Permutations and Combinations Recurrences and Difference Equations Graph Algorithms Graph Labeling … Path and Circuit Problems Trees

a world FULL of NP-hard problems Problem: I want to travel among a set of cities driving the fewest possible number of KMs. IT’S DIFFICULT!! Problem: I want to put a set of objects into some bags, knowing that each bag can not afford more than 10 KGs and trying to use as few bags as possible. IT’S DIFFICULT!!

How to Deal with NP-hard problems? Exact Algorithms Randomized Algorithms Approximation Algorithms Fixed-Parameter Tractable Algorithms …

Approximation Algorithms

We want a solution “close” to the optimal one. Given a minimization problem Π, an algorithm is an α -approximation for Π if, for every instance I of Π, it outputs a solution SOL(I) such that SOL(I)/OPT(I) ≤ α

Vertex Cover Problem: Given a graph G(V,E), find a minimum vertex cover, that is, a set V’ V such that every edge e E has an endvertex in V’. NP-hard  [Karp]

How to Guarantee an Approximation? We want an approximation algorithm for Vertex Cover. But computing the cost of an optimal solution is NP-HARD!! LOWER BOUNDS! The cost of the solution produced by the algorithm should be compared with the cost of an optimal solution.

Lower Bound for Vertex Cover Given a graph G(V,E), a matching M is a set of edges M E such that no two edges share an endvertex. The size of a matching is a lower bound on the size of an optimal solution to Vertex Cover! A matching is maximal if no matching M’ exists such that M M’.

An Approximation Algorithm for Vertex Cover Algorithm: Find a maximal matching M and output the set S of matched vertices

An Approximation Algorithm for Vertex Cover Theorem: The previous algorithm is a 2-approximation algorithm for Vertex Cover Proof: S is a vertex cover, otherwhise the matching would not be maximal. OPT≥M, where M is the size of the output maximal matching. SOL=2M, as the number of matched vertices is twice the size of the matching.

Approximation Algorithms:much more… Approximation schemes: (1+ε)-approx. Inapproximability results. Complexity classes, e.g., APX.

Fixed-Parameter Tractable Algorithms

Problem (optimization): Let G be a graph. Which is the minimum number of vertices whose deletion makes G planar? Easy or Hard? NP-hard  [Lewis-Yannakakis ]

Problem (decision): Let G be a graph and k be an integer. Is there a set of k vertices whose deletion makes G planar? Easy or Hard? Polynomial Easy O(n k+1 ) time algorithm for solving the problem: Consider every set of k vertices. Remove such vertices. Test the planarity of the resulting graph. There are O(n k ) such sets. Testing the planarity of an n-vertex graph takes O(n) time. Then, T(n,k)= O(n k ) O(n) = O(n k+1 )

Where is the trick? Easy or Hard? In the decision version, k is a constant parameter part of the input An O(n k+1 )-time algorithm, with k constant, is a polynomial-time algorithm. But it is very slow 

Fixed-Parameter Tractability A problem is fixed-parameter tractable if it can be solved in f(k) n O(1) time, where k is a parameter of the problem, f is an arbitrary function, and n O(1) is a polynomial (not depending on k).

FPT algorithm for Vertex Cover Theorem [Melhorn]: There is an O(2 k n)- time algorithm for Vertex Cover. Proof: Consider an instance (G,k). There is a vertex cover with k=0 if and only if G has no edge. Consider any edge e=(u,v). Either u or v belongs to any vertex cover S. Consider both the case in which u S and the case in which v S.

FPT algorithm for Vertex Cover u S -> S is a vertex cover of G if and only if S-{u} is a vertex cover of G-{u} -> solve the instance (G-{u}, k-1) v S -> S is a vertex cover of G if and only if S-{v} is a vertex cover of G-{v} -> solve the instance (G-{v}, k-1) u v v u

FPT algorithm for Vertex Cover Time complexity T(n,k): T(n,0) = O(n) T(n,k) = 2 T(n-1, k-1) +O(n) ≤ 2 T(n, k-1) +O(n) ≤ 2 (2 T(n, k-2) +O(n)) +O(n) ≤ 2 (2 (2 T(n, k-3) +O(n)) +O(n)) +O(n) ≤ 2 (2 (2 (…(2 T(n, 0)+O(n)) + … +O(n)) +O(n)) +O(n) ≤ 2 k O(n) + (2 k k k ) O(n) = 2 k O(n) + (2 k - 1) O(n) = O(2 k n)

Reduction Rules Reduction rule : a rule (that is, a polynomial time algorithm) that transforms an instance (I,k) to an "equivalent and simpler” instance (I', k’). Equivalent: (I,k) is a YES instance if and only if (I', k') is a YES instance. Simpler: |I'|<|I| or k'<k or I' has fewer occurrences of a particular substructure.

Another FPT algorithm for Vertex Cover Theorem: There is an O( k n 2 )-time algorithm for Vertex Cover. Proof: Consider an instance (G,k). We apply the following two reduction rules: If G has a vertex u of degree 0, then let (G',k')=(G-{u},k). If G has a vertex u of degree 1, then let N(u) denote the set of neighbors of u (here |N(u)|=1). Add N(u) to S and let (G',k')=(G-{u,N(u)},k-1).

Another FPT algorithm for Vertex Cover If G has a vertex u of degree 0, then let (G',k')=(G-{u},k). Correctness: if S is a vertex cover of G and u is in S, then S-{u} is also a vertex cover of G, as u has no incident edge. If G has a vertex u of degree 1, then let N(u) denote the set of neighbors of u (here |N(u)|=1). Add N(u) to S and let (G',k')=(G-{u, N(u)},k-1). Correctness: if S is a vertex cover of G and u is in S, then S-{u} N(u) is also a vertex cover of G, as u has no other incident edge.

Another FPT algorithm for Vertex Cover If neither of the two rules can be applied, then every vertex has degree at least 2. Pick a vertex u. Any vertex cover of G contains either u or N(u). Thus, (G,k) is a YES instance if and only if (G-{u},k-1) or (G-N(u),k-|N(u)|) is.

FPT algorithm for Vertex Cover Time complexity T(n,k): Since |N(u)|\geq 2, T(n,k) ≤ T(n,k-1)+ T(n,k-2)+O(n^2). The k-th number of the Fibonacci series tends to the golden ratio to the power of k. Fibonacci series: every number is the sum of the previous two x k =x k-1 +x k-2 +c. T(n,k)=Φ k O(n 2 )=((1+√5)/2) k O(n 2 ) = O( k n 2 ).

Kernelization Sometimes the reduction rules work till the size of the problem is reduced really a lot. That is, after the reduction rules have been applied, the problem has size g(k), for some function k. In this case the problem has a g(k)-kernel. Kernel: given a problem and an instance (I,k), a kernel is an algorithm that outputs in polynomial time an instance (I',k') such that (a) (I',k') is a YES instance if and only if (I,k) is; (b) |I'|<g(k), and k'<g(k).

Kernelization Theorem [Niedermaier] : Every fixed-parameter tractable problem has a g(k)-kernel. Proof: Suppose that there exists a FPT algorithm with running time f(k) n c, for some function f and some constant c. Consider an instance (I,k) with |I|=n. If n>f(k), we run the decision algorithm in time f(k) n c < n c+1. If it returns YES (NO), the kernelization algorithm outputs a constant size YES (resp. NO) instance. If n≤f(k), the the kernelization algorithm returns (I,k).

Kernelization The last theorem implies that every problem that is FPT has a kernel. However, the goal is to obtain kernels that are "small", that is, polynomial in k, or even constant.

FPT: much more… Some problems are not FPT (e.g., graph coloring). Complexity classes: W[1] -> Can a non- deterministic Turing machine accept an unary string s in at most k steps? Independent Set is W[1]-hard. Reductions to W[1]-hard problems give new W[1]-hard problems. Lower bounds for FPT tractability Upper and lower bounds for the size of the kernels

FPT: much more… Theorem [Robertson and Seymour]: Every graph problem with parameter k whose YES istances are closed under taking minors can be solved in O(f(k) n 3 )