# Guessing Game: NP-Complete?

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at most k edges? In P 3. 2-SAT: Give a formula Φ such that each clause has at most 2 literals, is Φ is satisfiable? In P 4. 3-COLOR: Given a graph G = (V, E), can we color the nodes of G with 3 colors such that no two nodes joined by an edge have the same coloring YES 5. Factoring: Give an integer N. Find the factors of N. INAPPLICABLE 1 Copyright 2000, Kevin Wayne 1

3 Coping With NP-Completeness Q. Suppose I need to solve an NP-complete problem. What should I do? A. Theory says you're unlikely to find poly-time algorithm. Must sacrifice one of three desired features. Solve problem to optimality. Solve problem in polynomial time. Solve arbitrary instances of the problem. This lecture. Solve some special cases of NP-complete problems that arise in practice. 3 Copyright 2000, Kevin Wayne 3

4 10.1 Finding Small Vertex Covers Copyright 2000, Kevin Wayne 4

5 Vertex Cover VERTEX COVER: Given a graph G = (V, E) and an integer k, is there a subset of vertices S V such that S k, and for each edge (u, v) either u S, or v S, or both k = 4 S = { 3, 6, 7, 10 } Copyright 2000, Kevin Wayne 5

6 Finding Small Vertex Covers Q. What if k is small? Brute force. O(k n k+1 ). Try all C(n, k) = O(n k ) subsets of size k. Takes O(k n) time to check whether a subset is a vertex cover. Goal. Limit exponential dependency on k, e.g., to O(2 k k n). Ex. n = 1,000, k = 10. Brute. k n k+1 = infeasible. Better. 2 k k n = 10 7 feasible. Remark. If k is a constant, algorithm is poly-time; if k is a small constant, then it's also practical. 6 Copyright 2000, Kevin Wayne 6

7 Finding Small Vertex Covers Claim. Let u-v be an edge of G. G has a vertex cover of size k iff at least one of G { u } and G { v } has a vertex cover of size k-1. delete v and all incident edges Pf. Suppose G has a vertex cover S of size k. S contains either u or v (or both). Assume it contains u. S { u } is a vertex cover of G { u }. Pf. Suppose S is a vertex cover of G { u } of size k-1. Then S { u } is a vertex cover of G. Claim. If G has a vertex cover of size k, it has k(n-1) edges. Pf. Each vertex covers at most n-1 edges. 7 Copyright 2000, Kevin Wayne 7

8 Finding Small Vertex Covers: Algorithm Claim. The following algorithm determines if G has a vertex cover of size k in O(2 k kn) time. boolean Vertex-Cover(G, k) { if (G contains no edges) return true if (G contains kn edges) return false } let (u, v) be any edge of G a = Vertex-Cover(G - {u}, k-1) b = Vertex-Cover(G - {v}, k-1) return a or b Pf. Correctness follows previous two claims. There are 2 k+1 nodes in the recursion tree; each invocation takes O(kn) time. 8 Copyright 2000, Kevin Wayne 8

9 Finding Small Vertex Covers: Recursion Tree cn ifk = 1 T ( n, k) T ( n, k) 2T ( n, k 1) + ckn ifk > 1 k 2 ckn k k-1 k-1 k-2 k-2 k-2 k-2 k - i Copyright 2000, Kevin Wayne 9

10 10.2 Solving NP-Hard Problems on Trees Copyright 2000, Kevin Wayne 10

11 Independent Set on Trees Independent set on trees. Given a tree, find a maximum cardinality subset of nodes such that no two share an edge. Fact. A tree on at least two nodes has at least two leaf nodes. degree = 1 Key observation. If v is a leaf, there exists a maximum size independent set containing v. u Pf. (exchange argument) Consider a max cardinality independent set S. If v S, we're done. If u S and v S, then S { v } is independent S not maximum. IF u S and v S, then S { v } { u } is independent. v 11 Copyright 2000, Kevin Wayne 11

12 Independent Set on Trees: Greedy Algorithm Theorem. The following greedy algorithm finds a maximum cardinality independent set in forests (and hence trees). Independent-Set-In-A-Forest(F) { S φ while (F has at least one edge) { Let e = (u, v) be an edge such that v is a leaf Add v to S Delete from F nodes u and v, and all edges incident to them. } return S } Pf. Correctness follows from the previous key observation. Remark. Can implement in O(n) time by considering nodes in postorder. 12 Copyright 2000, Kevin Wayne 12

14 Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one of three desired features. Solve problem to optimality. Solve problem in poly-time. Solve arbitrary instances of the problem. ρ-approximation algorithm. Guaranteed to run in poly-time. Guaranteed to solve arbitrary instance of the problem Guaranteed to find solution within ratio ρ of true optimum. Challenge. Need to prove a solution's value is close to optimum, without even knowing what optimum value is! 14 Copyright 2000, Kevin Wayne 14

15 11.4 The Pricing Method: Vertex Cover Copyright 2000, Kevin Wayne 15

16 Weighted Vertex Cover Weighted vertex cover. Given a graph G with vertex weights, find a vertex cover of minimum weight weight = weight = 9 16 Copyright 2000, Kevin Wayne 16

17 Weighted Vertex Cover Pricing method. Each edge must be covered by some vertex i. Edge e pays price p e 0 to use vertex i. Fairness. Edges incident to vertex i should pay w i in total. 2 4 for each vertex i : e= ( i, j) p e w i 2 9 Claim. For any vertex cover S and any fair prices p e : e p e w(s). Proof. e E p e pe wi = i S e= ( i, j) i S w( S). each edge e covered by at least one node in S sum fairness inequalities for each node in S 17 Copyright 2000, Kevin Wayne 17

18 Pricing Method Pricing method. Set prices and find vertex cover simultaneously. Weighted-Vertex-Cover-Approx(G, w) { foreach e in E p e = 0 e = ( i, j) p = e wi while ( edge i-j such that neither i nor j are tight) select such an edge e increase p e without violating fairness } } S set of all tight nodes return S 18 Copyright 2000, Kevin Wayne 18

19 Pricing Method price of edge a-b vertex weight Figure Copyright 2000, Kevin Wayne 19

20 Pricing Method: Analysis Theorem. Pricing method is a 2-approximation. Pf. Algorithm terminates since at least one new node becomes tight after each iteration of while loop. Let S = set of all tight nodes upon termination of algorithm. S is a vertex cover: if some edge i-j is uncovered, then neither i nor j is tight. But then while loop would not terminate. Let S* be optimal vertex cover. We show w(s) 2w(S*). w(s) = w i = i S i S p e e=(i, j) i V p e e=(i, j) = 2 p e 2w(S*). e E all nodes in S are tight S V, prices 0 each edge counted twice fairness lemma 20 Copyright 2000, Kevin Wayne 20

21 13.4 MAX 3-SAT Copyright 2000, Kevin Wayne 21

22 Maximum 3-Satisfiability exactly 3 distinct literals per clause MAX-3SAT. Given 3-SAT formula, find a truth assignment that satisfies as many clauses as possible. C 1 = x 2 x 3 x 4 C 2 = x 2 x 3 x 4 C 3 = x 1 x 2 x 4 C 4 = x 1 x 2 x 3 C 5 = x 1 x 2 x 4 Remark. NP-hard search problem. Simple idea. Flip a coin, and set each variable true with probability ½, independently for each variable. 22 Copyright 2000, Kevin Wayne 22

23 Maximum 3-Satisfiability: Analysis Claim. Given a 3-SAT formula with k clauses, the expected number of clauses satisfied by a random assignment is 7k/8. Pf. Consider random variable Z j = 1 if clause C j 0 otherwise. is satisfied Let Z = weight of clauses satisfied by assignment Z j. linearity of expectation E[Z] = E[Z j ] k j=1 k = Pr[clause C j is satisfied] j=1 = 7 8 k 23 Copyright 2000, Kevin Wayne 23

24 The Probabilistic Method Corollary. For any instance of 3-SAT, there exists a truth assignment that satisfies at least a 7/8 fraction of all clauses. Pf. Random variable is at least its expectation some of the time. Probabilistic method. We showed the existence of a non-obvious property of 3-SAT by showing that a random construction produces it with positive probability! 24 Copyright 2000, Kevin Wayne 24

25 Maximum 3-Satisfiability: Analysis Q. Can we turn this idea into a 7/8-approximation algorithm? In general, a random variable can almost always be below its mean. Lemma. The probability that a random assignment satisfies 7k/8 clauses is at least 1/(8k). Pf. Let p j be probability that exactly j clauses are satisfied; let p be probability that 7k/8 clauses are satisfied. 7 k = E[Z] = jp 8 j j 0 = jp j + jp j j <7k /8 j 7k /8 ( 7k 8 1) p 8 j + k p j j <7k /8 ( 7 8 k 1 8 ) 1 + kp j 7k /8 Rearranging terms yields p 1 / (8k). 25 Copyright 2000, Kevin Wayne 25

26 Maximum 3-Satisfiability: Analysis Johnson's algorithm. Repeatedly generate random truth assignments until one of them satisfies 7k/8 clauses. Theorem. Johnson's algorithm is a 7/8-approximation algorithm. Pf. By previous lemma, each iteration succeeds with probability at least 1/(8k). By the waiting-time bound, the expected number of trials to find the satisfying assignment is at most 8k. Waiting for a first success. Coin is heads with probability p and tails with probability 1-p. How many independent flips X until first heads? E[X] = j Pr[X = j] = j (1 p) j 1 p = j=0 j=0 p 1 p j (1 p) j = j=0 p 1 p 1 p p 2 = 1 p j-1 tails 1 head 26 Copyright 2000, Kevin Wayne 26

27 Maximum Satisfiability Extensions. Allow one, two, or more literals per clause. Find max weighted set of satisfied clauses. Theorem. [Asano-Williamson 2000] There exists a approximation algorithm for MAX-SAT. Theorem. [Karloff-Zwick 1997, Zwick+computer 2002] There exists a 7/8-approximation algorithm for version of MAX-3SAT where each clause has at most 3 literals. Theorem. [Håstad 1997] Unless P = NP, no ρ-approximation algorithm for MAX-3SAT (and hence MAX-SAT) for any ρ > 7/8. very unlikely to improve over simple randomized algorithm for MAX-3SAT 27 Copyright 2000, Kevin Wayne 27

28 What to do if the problem you want to solve is NP-hard More on approximation algorithms Recent research has classified problems based on what kinds of approximations are possible if P NP Best: (1+ε) factor for any ε>0. packing and some scheduling problems, TSP in plane Some fixed constant factor > 1, e.g. 2, 3/2, 100 Vertex Cover, TSP in space, other scheduling problems Θ(log n) factor Set Cover, Graph Partitioning problems Worst: Ω(n 1- ε ) factor for any ε>0 Clique, Independent-Set, Coloring Slides courtesy of Paul Beame 28 Copyright 2000, Kevin Wayne 28

29 What to do if the problem you want to solve is NP-hard Try an algorithm that is provably fast on average. To even try this one needs a model of what a typical instance is. Typically, people consider random graphs e.g. all graphs with a given # of edges are equally likely Problems: real data doesn t look like the random graphs distributions of real data aren t analyzable Slides courtesy of Paul Beame 29 Copyright 2000, Kevin Wayne 29

30 What to do if the problem you want to solve is NP-hard Try to search the space of possible hints/certificates in a more efficient way and hope it is quick enough Backtracking search E.g. For SAT there are 2 n possible truth assignments If we set the truth values one-by-one we might be able to figure out whole parts of the space to avoid, e.g. After setting x 1 1, x 2 0 we don t even need to set x 3 or x 4 to know that it won t satisfy ( x 1 x 2 ) ( x 2 x 3 ) (x 4 x 3 ) (x 1 x 4 ) Related technique: branch-and-bound Backtracking search can be very effective even with exponential worst-case time For example, the best SAT algorithms used in practice are all variants on backtracking search and can solve surprisingly large problems Slides courtesy of Paul Beame 30 Copyright 2000, Kevin Wayne 30

31 What to do if the problem you want to solve is NP-hard Use heuristic algorithms and hope they give good answers No guarantees of quality Many different types of heuristic algorithms Many different options, especially for optimization problems, such as TSP, where we want the best solution. We ll mention several on following slides Slides courtesy of Paul Beame 31 Copyright 2000, Kevin Wayne 31

32 Heuristic algorithms for NP-hard problems local search for optimization problems need a notion of two solutions being neighbors Start at an arbitrary solution S While there is a neighbor T of S that is better than S S T Usually fast but often gets stuck in a local optimum and misses the global optimum With some notions of neighbor can take a long time in the worst case Slides courtesy of Paul Beame 32 Copyright 2000, Kevin Wayne 32

33 e.g., Neighboring solutions for TSP Solution S Solution T Two solutions are neighbors iff there is a pair of edges you can swap to transform one to the other Slides courtesy of Paul Beame 33 Copyright 2000, Kevin Wayne 33

34 Heuristic algorithms for NP-hard problems randomized local search start local search several times from random starting points and take the best answer found from each point more expensive than plain local search but usually much better answers simulated annealing like local search but at each step sometimes move to a worse neighbor with some probability probability of going to a worse neighbor is set to decrease with time as, presumably, solution is closer to optimal helps avoid getting stuck in a local optimum but often slow to converge (much more expensive than randomized local search) analogy with slow cooling to get to lowest energy state in a crystal (or in forging a metal) Slides courtesy of Paul Beame 34 Copyright 2000, Kevin Wayne 34

35 Heuristic algorithms artificial neural networks based on very elementary model of human neurons Set up a circuit of artificial neurons each artificial neuron is an analog circuit gate whose computation depends on a set of connection strengths Train the circuit Adjust the connection strengths of the neurons by giving many positive & negative training examples and seeing if it behaves correctly The network is now ready to use useful for ill-defined classification problems such as optical character recognition but not typical cut & dried problems Slides courtesy of Paul Beame 35 Copyright 2000, Kevin Wayne 35

36 Other directions Quantum computing Use physical processes at the quantum level to implement weird kinds of circuit gates unitary transformations Quantum objects can be in a superposition of many pure states at once can have n objects together in a superposition of 2 n states Each quantum circuit gate operates on the whole superposition of states at once inherent parallelism but classical randomized algorithms have a similar parallelism: not enough on its own Advantage over classical: parallel copies interfere with each other. Need totally new kinds of algorithms to work well. Theoretically able to factor efficiently but huge practical problems: errors, decoherence. Slides courtesy of Paul Beame 36 Copyright 2000, Kevin Wayne 36

37 Loose Ends Space Complexity: Amount of memory used by an algorithm If an algorithm runs in time T, then it uses at most T units of memory Every poly-time algorithm uses poly-space If an algorithm uses S units of memory, it run in time O(2 ) PSPACE: class of algorithms solvable by algorithms that use a polynomial amount of space. P PSPACE Another big question in complexity is whether P = PSPACE. 37 Copyright 2000, Kevin Wayne 37

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### A Randomized Approximation Algorithm for MAX 3-SAT

A Randomized Approximation Algorithm for MAX 3-SAT CS 511 Iowa State University December 8, 2008 Note. This material is based on Kleinberg & Tardos, Algorithm Design, Chapter 13, Section 4, and associated

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

### Algorithm Design and Analysis

Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

### 11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: vertex cover LP rounding: vertex cover generalized load balancing knapsack problem Lecture slides by Kevin Wayne Copyright 2005

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

### Spectral graph theory

Spectral graph theory Uri Feige January 2010 1 Background With every graph (or digraph) one can associate several different matrices. We have already seen the vertex-edge incidence matrix, the Laplacian

### Near Optimal Solutions

Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

### 13. Randomized Algorithms Contention Resolution. Randomization. Contention Resolution in a Distributed System. Algorithmic design patterns.

Randomization 13 Randomized Algorithms Algorithmic design patterns! Greed! Divide-and-conquer! Dynamic programming! Network flow! Randomization in practice, access to a pseudo-random number generator Randomization

### CSC 373: Algorithm Design and Analysis Lecture 16

CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements

### Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 The final exam will cover seven topics. 1. greedy algorithms 2. divide-and-conquer algorithms

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### Lecture 6: Approximation via LP Rounding

Lecture 6: Approximation via LP Rounding Let G = (V, E) be an (undirected) graph. A subset C V is called a vertex cover for G if for every edge (v i, v j ) E we have v i C or v j C (or both). In other

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Lecture 7: Approximation via Randomized Rounding

Lecture 7: Approximation via Randomized Rounding Often LPs return a fractional solution where the solution x, which is supposed to be in {0, } n, is in [0, ] n instead. There is a generic way of obtaining

### 2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

### Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

### Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

### Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques. My T. Thai

Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques My T. Thai 1 Overview An overview of LP relaxation and rounding method is as follows: 1. Formulate an optimization

### Lecture 7: NP-Complete Problems

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

### NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness

Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

### Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

### Lecture Notes 6: Approximations for MAX-SAT. 2 Notes about Weighted Vertex Cover Approximation

Algorithmic Methods //00 Lecture Notes 6: Approximations for MAX-SAT Professor: Yossi Azar Scribe:Alon Ardenboim Introduction Although solving SAT is nown to be NP-Complete, in this lecture we will cover

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

### Quantum and Non-deterministic computers facing NP-completeness

Quantum and Non-deterministic computers facing NP-completeness Thibaut University of Vienna Dept. of Business Administration Austria Vienna January 29th, 2013 Some pictures come from Wikipedia Introduction

### 8.1 Min Degree Spanning Tree

CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

### Problem Set 7 Solutions

8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

### CS5314 Randomized Algorithms. Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles)

CS5314 Randomized Algorithms Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles) 1 Objectives Introduce Random Graph Model used to define a probability space for all graphs with

### Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

### NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

### (Refer Slide Time: 01:35)

Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 6 Informed Search -2 Today we start our 6 th lecture. This

### SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

### What s next? Reductions other than kernelization

What s next? Reductions other than kernelization Dániel Marx Humboldt-Universität zu Berlin (with help from Fedor Fomin, Daniel Lokshtanov and Saket Saurabh) WorKer 2010: Workshop on Kernelization Nov

### Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

### NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

### Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

### Tutorial 8. NP-Complete Problems

Tutorial 8 NP-Complete Problems Decision Problem Statement of a decision problem Part 1: instance description defining the input Part 2: question stating the actual yesor-no question A decision problem

### OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a \$ 1,000,000 prize for the

### Planar Tree Transformation: Results and Counterexample

Planar Tree Transformation: Results and Counterexample Selim G Akl, Kamrul Islam, and Henk Meijer School of Computing, Queen s University Kingston, Ontario, Canada K7L 3N6 Abstract We consider the problem

### Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs Yong Zhang 1.2, Francis Y.L. Chin 2, and Hing-Fung Ting 2 1 College of Mathematics and Computer Science, Hebei University,

### Definition 11.1. Given a graph G on n vertices, we define the following quantities:

Lecture 11 The Lovász ϑ Function 11.1 Perfect graphs We begin with some background on perfect graphs. graphs. First, we define some quantities on Definition 11.1. Given a graph G on n vertices, we define

### A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

### On the Unique Games Conjecture

On the Unique Games Conjecture Antonios Angelakis National Technical University of Athens June 16, 2015 Antonios Angelakis (NTUA) Theory of Computation June 16, 2015 1 / 20 Overview 1 Introduction 2 Preliminary

### Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

### A Working Knowledge of Computational Complexity for an Optimizer

A Working Knowledge of Computational Complexity for an Optimizer ORF 363/COS 323 Instructor: Amir Ali Ahmadi TAs: Y. Chen, G. Hall, J. Ye Fall 2014 1 Why computational complexity? What is computational

### Discuss the size of the instance for the minimum spanning tree problem.

3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

### Introduction to computer science

Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

### Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### 10.1 Integer Programming and LP relaxation

CS787: Advanced Algorithms Lecture 10: LP Relaxation and Rounding In this lecture we will design approximation algorithms using linear programming. The key insight behind this approach is that the closely

### Small Maximal Independent Sets and Faster Exact Graph Coloring

Small Maximal Independent Sets and Faster Exact Graph Coloring David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science The Exact Graph Coloring Problem: Given an undirected

### Distributed Computing over Communication Networks: Maximal Independent Set

Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.

### RANDOMIZATION IN APPROXIMATION AND ONLINE ALGORITHMS. Manos Thanos Randomized Algorithms NTUA

RANDOMIZATION IN APPROXIMATION AND ONLINE ALGORITHMS 1 Manos Thanos Randomized Algorithms NTUA RANDOMIZED ROUNDING Linear Programming problems are problems for the optimization of a linear objective function,

### Facility Location: Discrete Models and Local Search Methods

Facility Location: Discrete Models and Local Search Methods Yury KOCHETOV Sobolev Institute of Mathematics, Novosibirsk, Russia Abstract. Discrete location theory is one of the most dynamic areas of operations

### School Timetabling in Theory and Practice

School Timetabling in Theory and Practice Irving van Heuven van Staereling VU University, Amsterdam Faculty of Sciences December 24, 2012 Preface At almost every secondary school and university, some

### Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams André Ciré University of Toronto John Hooker Carnegie Mellon University INFORMS 2014 Home Health Care Home health care delivery

### Triangle deletion. Ernie Croot. February 3, 2010

Triangle deletion Ernie Croot February 3, 2010 1 Introduction The purpose of this note is to give an intuitive outline of the triangle deletion theorem of Ruzsa and Szemerédi, which says that if G = (V,

### CAD Algorithms. P and NP

CAD Algorithms The Classes P and NP Mohammad Tehranipoor ECE Department 6 September 2010 1 P and NP P and NP are two families of problems. P is a class which contains all of the problems we solve using

### COMS4236: Introduction to Computational Complexity. Summer 2014

COMS4236: Introduction to Computational Complexity Summer 2014 Mihalis Yannakakis Lecture 17 Outline conp NP conp Factoring Total NP Search Problems Class conp Definition of NP is nonsymmetric with respect

### Chapter 4. Trees. 4.1 Basics

Chapter 4 Trees 4.1 Basics A tree is a connected graph with no cycles. A forest is a collection of trees. A vertex of degree one, particularly in a tree, is called a leaf. Trees arise in a variety of applications.

### Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

### Solutions to Exercises 8

Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

### GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

### Construction Heuristics

Outline DM811 HEURISTICS AND LOCAL SEARCH ALGORITHMS FOR COMBINATORIAL OPTIMZATION Lecture 5 Construction Heuristics Marco Chiarandini 1. Complete Search Methods 2. Incomplete Search Methods 3. Other Tree

### CSE 20: Discrete Mathematics for Computer Science. Prof. Miles Jones. Today s Topics: Graphs. The Internet graph

Today s Topics: CSE 0: Discrete Mathematics for Computer Science Prof. Miles Jones. Graphs. Some theorems on graphs. Eulerian graphs Graphs! Model relations between pairs of objects The Internet graph!

### Lecture 2: March 20, 2015

Automatic Software Verification Spring Semester, 2015 Lecture 2: March 20, 2015 Lecturer: Prof. Mooly Sagiv Scribe: Kalev Alpernas and Elizabeth Firman 2.1 Introduction In this lecture we will go over

### ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu

ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a

### Chapter. NP-Completeness. Contents

Chapter 13 NP-Completeness Contents 13.1 P and NP......................... 593 13.1.1 Defining the Complexity Classes P and NP...594 13.1.2 Some Interesting Problems in NP.......... 597 13.2 NP-Completeness....................

### Solving the ILP using branch-and-cut

Solving the ILP using branch-and-cut Solving ILPs is a main topic in combinatorial optimization. We will take a brief look at the branch-and-cut approach. Branch-and-cut makes use of two techniques: Cutting

### COLORED GRAPHS AND THEIR PROPERTIES

COLORED GRAPHS AND THEIR PROPERTIES BEN STEVENS 1. Introduction This paper is concerned with the upper bound on the chromatic number for graphs of maximum vertex degree under three different sets of coloring

### / Approximation Algorithms Lecturer: Michael Dinitz Topic: Steiner Tree and TSP Date: 01/29/15 Scribe: Katie Henry

600.469 / 600.669 Approximation Algorithms Lecturer: Michael Dinitz Topic: Steiner Tree and TSP Date: 01/29/15 Scribe: Katie Henry 2.1 Steiner Tree Definition 2.1.1 In the Steiner Tree problem the input

### Answers to some of the exercises.

Answers to some of the exercises. Chapter 2. Ex.2.1 (a) There are several ways to do this. Here is one possibility. The idea is to apply the k-center algorithm first to D and then for each center in D

### Satisfiability of Boolean Expressions

Satisfiability of Boolean Expressions In the previous section, we have analysed in great detail one particular problem reachability in directed graphs. The reason for the attention devoted to this one

### Complexity Classes P and NP

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

### CSC2420 Spring 2015: Lecture 3

CSC2420 Spring 2015: Lecture 3 Allan Borodin January 22, 2015 1 / 1 Announcements and todays agenda Assignment 1 due next Thursday. I may add one or two additional questions today or tomorrow. Todays agenda

### Nonnegative Matrix Factorization: Algorithms, Complexity and Applications

Nonnegative Matrix Factorization: Algorithms, Complexity and Applications Ankur Moitra Massachusetts Institute of Technology July 6th, 2015 Ankur Moitra (MIT) NMF July 6th, 2015 m M n W m M = A inner dimension

### Nan Kong, Andrew J. Schaefer. Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA

A Factor 1 2 Approximation Algorithm for Two-Stage Stochastic Matching Problems Nan Kong, Andrew J. Schaefer Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA Abstract We introduce

### 1 Basic Definitions and Concepts in Graph Theory

CME 305: Discrete Mathematics and Algorithms 1 Basic Definitions and Concepts in Graph Theory A graph G(V, E) is a set V of vertices and a set E of edges. In an undirected graph, an edge is an unordered

### Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

### Existence of pure Nash equilibria (NE): Complexity of computing pure NE: Approximating the social optimum: Empirical results:

Existence Theorems and Approximation Algorithms for Generalized Network Security Games V.S. Anil Kumar, Rajmohan Rajaraman, Zhifeng Sun, Ravi Sundaram, College of Computer & Information Science, Northeastern

### Uniform Multicommodity Flow through the Complete Graph with Random Edge-capacities

Combinatorics, Probability and Computing (2005) 00, 000 000. c 2005 Cambridge University Press DOI: 10.1017/S0000000000000000 Printed in the United Kingdom Uniform Multicommodity Flow through the Complete

### Single machine parallel batch scheduling with unbounded capacity

Workshop on Combinatorics and Graph Theory 21th, April, 2006 Nankai University Single machine parallel batch scheduling with unbounded capacity Yuan Jinjiang Department of mathematics, Zhengzhou University

### Private Approximation of Clustering and Vertex Cover

Private Approximation of Clustering and Vertex Cover Amos Beimel, Renen Hallak, and Kobbi Nissim Department of Computer Science, Ben-Gurion University of the Negev Abstract. Private approximation of search

### Notes on NP Completeness

Notes on NP Completeness Rich Schwartz November 10, 2013 1 Overview Here are some notes which I wrote to try to understand what NP completeness means. Most of these notes are taken from Appendix B in Douglas

### Basic Notions on Graphs. Planar Graphs and Vertex Colourings. Joe Ryan. Presented by

Basic Notions on Graphs Planar Graphs and Vertex Colourings Presented by Joe Ryan School of Electrical Engineering and Computer Science University of Newcastle, Australia Planar graphs Graphs may be drawn

### Data Structures Fibonacci Heaps, Amortized Analysis

Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:

### Counting Falsifying Assignments of a 2-CF via Recurrence Equations

Counting Falsifying Assignments of a 2-CF via Recurrence Equations Guillermo De Ita Luna, J. Raymundo Marcial Romero, Fernando Zacarias Flores, Meliza Contreras González and Pedro Bello López Abstract

### Minimum Makespan Scheduling

Minimum Makespan Scheduling Minimum makespan scheduling: Definition and variants Factor 2 algorithm for identical machines PTAS for identical machines Factor 2 algorithm for unrelated machines Martin Zachariasen,

### CoNP and Function Problems

CoNP and Function Problems conp By definition, conp is the class of problems whose complement is in NP. NP is the class of problems that have succinct certificates. conp is therefore the class of problems

### Memoization/Dynamic Programming. The String reconstruction problem. CS125 Lecture 5 Fall 2016

CS125 Lecture 5 Fall 2016 Memoization/Dynamic Programming Today s lecture discusses memoization, which is a method for speeding up algorithms based on recursion, by using additional memory to remember

### Computational complexity theory

Computational complexity theory Goal: A general theory of the resources needed to solve computational problems What types of resources? Time What types of computational problems? decision problem Decision

### Universality in the theory of algorithms and computer science

Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)