# Algorithms vs. Problems

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Algorithms vs. Problems An algorithm is a computational procedure that takes values as input and produces values as output, in order to solve a well defined computational problem. The statement of the problem specifies a desired relationship between the input and the output. The algorithm specifies how to achieve that relationship. A particular value of the input corresponds to an instance of the problem. So far, we have analyzed the time complexity of various algorithms. In this section, we switch focus from algorithms to problems. 1

2 P vs. NP vs. NP-complete Modern Complexity Theory P Class of problems that are generally considered to have feasible (tractable) solutions. P Class of problems that are solvable in polynomial time Polynomial Time: there are two positive constants c and k, and an algorithm A that solves the problem, and whose worst case running time is at most cn k (n is the input size). These are the problems that have (somewhat) efficient solutions. Most of the problems that we ve examined so far fall into this class. 2

3 P vs. NP vs. NP-complete Modern Complexity Theory NP Class of problems that are verifiable in polynomial time. If an oracle gives us a certificate corresponding to a solution, then there is an algorithm that can verify it in polynomial time. NP-Complete A subset of problems from NP such that: No tractable algorithm has been found to solve them. For any two problems A NPC and B NP, B can be reduced in polynomial time to A. 3

4 Class P: Examples Matrix Multiplication Sorting Selection MST APSP Bipartite Matching All these problems have efficient solutions. If we let n be the size of the input to the problem, then there is an algorithm that runs in time O(n k ), where k is some small number. 4

5 Class P: Examples Matrix multiplication O(n lg7 ) Sorting O(nlg n) = O(n 1+ǫ ) Selection O(n) MST O(E lg V ) APSP O(V 3 ) Bipartite Matching O(V E) 5

6 Input Size and Encodings Q: What do we mean by input size n? A: Any problem instance can be encoded as a sequence of 0 s and 1 s (i.e. represented as a binary string): For example, an input instance for the sorting problem can be {1,5,7,2}, which can be encoded into 1, 101, 111, 10, hence the input size is 9. Q: Does the encoding scheme matter? A: Only unary encoding will make a difference. For example, compare log 2 n vs. log 3 n, with log 2 n vs. n. 6

7 Tractable vs. Intractable problems Tractable: a problem which can be solved using an algorithm whose (worst-case) running time is a polynomial function of its input size. Intractable: a problem which is impossible to be solved using a polynomial time algorithm (i.e., its worst case cannot be bounded by a polynomial function of its input size). Comments: Note that intractability is a property of the problem. An algorithm whose worse case is not a polynomial does not make a problem intractable. We have to show that no polynomial algorithm exists! 7

8 Advantages of this Definition of Tractable Q: Why is this definition advantageous? A: The polynomials are closed under addition, multiplication and composition: So if the output of one polynomial-time algorithm is fed into the input of another, the composite algorithm is polynomial. A constant number of calls to polynomial-time subroutines will still result in a polynomial-time algorithm. Note: Most problems of practical importance that are solvable in polynomial-time have algorithms that run in time O(n k ) where k is a small integer (k 5). 8

9 Polynomial vs. Exponential Suppose one basic operation needs CPU time second n s s s s s s n s s s s s s n s s s s s s n s 3.2 s 24.3 s 1.7 min 5.2 min 13.0 min 2 n s 1.0 s 17.9 min 12.7 days 35.7 years 366 cent 3 n 0.59 s 58 min 6.5 years 3855 cent cent cent 9

10 Limitations of this Definition of Tractable There are some disadvantages to this definition of tractable : An algorithm that runs in time Θ(n 1000 ) is by no means feasible (though in practice, it is likely that an algorithm with a much better running time will be discovered soon for the same problem). An algorithm that runs in cnlg n steps, for some very large c is not going to be a practical algorithm. 10

11 Is everything in the set P? There are problems that are known to be unsolvable (e.g. the Halting Problem). There are also problems that are solvable, but for which no efficient solution is known: The best known algorithms for some of these problems have running times of O(2 n ). For some of these problems, there is strong evidence that they do not have efficient solutions. 11

12 The Clique Problem: Optimization vs. Decision Definition: Let G = (V, E) be an undirected graph. A clique of G is a set V V such that u, v V, we have (u, v) E, i.e., clique is a complete subgraph of G. Optimization Problem: Given G, find the size of the largest clique. Decision Problem: Given G and k, is there a clique of size k in the graph G? CLIQUE = {< G, k >: G is a graph with a clique of size k} 12

13 A Brute Force Algorithm Largest-Clique(G) { for j := V to 1 do check if any subset of j vertices is a clique. if a clique was found then return j } Time complexity = Ω(2 V ) very slow! Q: Is the Clique problem tractable? A: We do not know. But it is very likely that it does not have a polynomial time solution. 13

14 Three general categories of problems 1) Problems for which polynomial-time algorithms have been found: Sorting in O(nlgn). APSP in O(n 3 ).... 2) Problems that have been proven to be intractable: Non-polynomial: generating all permutations of n elements is Ω(2 n ). Undecidable: the Halting Problem (Turing, 1936). 14

15 Three general categories of problems 3) Problems that have not been proven to be intractable, but for which a polynomial-time algorithm has never been found: Traveling Salesperson Problem Subset Sum Problem Graph Coloring Hamiltonian Cycle... Primality Test used to be in this category until 2002, when Agrawal-Kayal-Saxena from IIT Kanpur proved that PRIMES is in P. 15

16 Why should we care about category 3? These hard problems really come up all the time. Recognizing a problem is hard makes you stop hitting your head again a wall trying to solve it, and do something more feasible: Solve the problem approximately instead of exactly; instead of finding the optimal solution, finding a near-optimal solution is often good enough in practice. Use an exponential time solution anyway; if you really have to solve the problem exactly, you can settle down to writing an exponential time algorithm and stop worrying about finding a better solution, especially if the size if the input is small. 16

17 Decision problems Decision problems are those problems whose output is either yes or no. We will carry out discussions based only on decision problems: A unified way to treat all problems. The optimization and decision versions of the same problem are usually in the same complexity class. 17

18 Decision problems vs. Optimization problems Clique Problem: Optimization Problem: Given G, find the size of the largest clique. Decision problem: Given < G, k >, G is an undirected graph and k is an integer, does G have a clique of size k? Shortest-Path Problem: Optimization Problem: Given graph G and nodes u, v, find the shortest path from u to v. Decision problem: Given < G, u, v, k >, is there a path from u to v of length k? 18

19 Optimization problems vs. Decision problems Theorem: optimization problem solvable in polynomial time decision problem solvable in polynomial time. Proof: (Optimization Decision): The optimization problem can be solved in O(n c ) time, where c is a constant. Let M be the answer to the optimization problem (e.g. M is the size of the maximum clique existing in G). To solve the decision problem, simply compare M with k; if M k, then the answer is YES ; otherwise NO. Comparison takes constant time, so the decision problem can be solved also in polynomial time: O(n c ) + Θ(1). 19

20 Optimization problems vs. Decision problems Proof: (Decision Optimization): The decision problem can be solved in O(n c ) time, namely, for a given k, it takes O(n c ) time to output YES or NO. To solve the optimization problem, try all different ks, starting from n all the way down to 1. The first k that produces YES to the decision problem tells the answer to the optimization problem (e.g. the size of the maximum clique in the graph). The complexity is n O(n c ) = O(n 1+c ), still polynomial. 20

21 A More Natural Decision Problem SAT: The satisfiability problem. Input: A boolean formula α consisting of variables, x 1,..., x n, (, ),,,. Ex.: α = (x 1 x 2 ) ( x 1 x 2 ) (x 1 x 2 ). Problem: Does α have a satisfying assignment, i.e. is there a setting of the variables in α so that α evaluates to TRUE? In the example above, the answer is YES. To see this, let x 1 = TRUE and let x 2 = TRUE. 21

22 The class NP Definition: NP is the set of all decision problems that are verifiable in polynomial time. A problem is in NP if we can test, in polynomial time, whether a solution is correct (without worrying about how hard it might be to find the solution). To prove that a problem belongs to NP, all we need to do is to demonstrate that: If an oracle gives us a certificate for a solution to the problem, Then we can verify the certificate in polynomial time (i.e. we can show that it indeed corresponds to a solution to the problem). 22

23 NP example CLIQUE NP. Proof: For a given graph G = (V, E) and a number k, an oracle gives us a set V V saying it makes a clique. Checking whether V is a clique can be accomplished in O( V 2 ) time by checking whether, for each pair u, v V, the edge (u, v) belongs to E. 23

24 Is everything in NP? The Halting Problem: Given a description of a program and a finite input, Decide whether the program finishes running, or will run forever, given that input. Turing proved in 1936 that there is no algorithm that can solve the halting problem for all possible pairs program, input. 24

25 A Formal Language framework Definition: An alphabet Σ is a finite set of symbols. Example: Σ = {0,1}. Definition: A language L over Σ is a set of strings made up of symbols from Σ. Example: L = {10, 11, 101, 111,...} is the language of binary representations of prime numbers. ǫ denotes the empty string. denotes the empty language. Σ denotes the language of all strings over Σ. For example, if Σ = {0,1}, then Σ = {ǫ,0,1,00,01,...} 25

26 A Formal Language framework: Algorithms An algorithm for a decision problem can be viewed in terms of the language that it decides: The language accepted by an algorithm A is L = {x {0,1} A(x) = 1} The language rejected by an algorithm A is L = {x {0,1} A(x) = 0} A language L is decided by an algorithm A if every binary string in L is accepted by A, and every binary string not in L is rejected by A. 26

27 A Formal Language Framework: Problems A decision problem can be viewed as a language-recognition problem: Let U be the set of all possible inputs to the decision problem and L U be the set of all inputs (i.e. the language) for which the answer to the problem is YES (i.e. the symbol 1). The decision problem is to recognize whether a given input belongs to L. We call L the language corresponding to the decision problem. 27

28 Decision problems and corresponding languages The decision problem PRIME: given a number z, is z a prime number? Let U be the all possible inputs, i.e., {1,2,3,4,5,6,...}, or {1, 10, 11, 100, 101, 110,...} under binary encoding. L is {2,3,5,...} or {1,10,11,101,...}. The decision problem PRIME can be fully characterized by the set L. PRIME is to recognize whether a given input z belongs to L. PRIME = {z {0,1} z is prime }. 28

29 Decision problems and corresponding languages The decision problem CLIQUE: Given G and an integer k, is there a clique size of k in G? The corresponding language L is the set of binary encodings of all the graphs G that have a clique of size k CLIQUE = { G, k : G has a clique of size of k}. 29

30 A Formal Language Framework: Class P An alternative definition of the complexity class P: P = {L {0,1} there exists an algorithm A that decides L in polynomial time} Theorem 34.2: P = {L {0,1} there exists an algorithm A that accepts L in polynomial time} 30

31 A Formal Language Framework: Class NP An alternative definition of the complexity class NP: A language L belongs to NP iff there exist a two-input polynomial-time algorithm A and constant c such that: L = {x {0,1} there exists a certificate y with y = O( x c ) such that A(x, y) = 1} We say that A verifies language L in polynomial time. 31

32 P versus NP P NP. We can ignore the certificate and solve a P-problem in polynomial time. In other words, for a given input instance, we can check whether it belongs to the language corresponding to the decision problem in poly-time, without looking at the proposed solution certificate. P = NP? The most famous open question in CS. US\$1,000,000 prize for the first person to provide an answer. 32

33 Two possible worlds 33

### 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

### 1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

### 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

### 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

### 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

### 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

### 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

### 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

### 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.

### 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

### 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

### 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

### 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

### P versus NP, and More

1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

### 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

### Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

### 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

### JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

### On the Relationship between Classes P and NP

Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,

### One last point: we started off this book by introducing another famously hard search problem:

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 261 Factoring One last point: we started off this book by introducing another famously hard search problem: FACTORING, the task of finding all prime factors

### 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

### Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the

### 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

### The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

### Integer factorization is in P

Integer factorization is in P Yuly Shipilevsky Toronto, Ontario, Canada E-mail address: yulysh2000@yahoo.ca Abstract A polynomial-time algorithm for integer factorization, wherein integer factorization

### Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

Why Study NP- hardness NP Hardness/Completeness Overview Ron Parr CPS 570 NP hardness is not an AI topic It s important for all computer scienhsts Understanding it will deepen your understanding of AI

### Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

### 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....................

### 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

### 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

### Classification - Examples

Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking

### 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

### The P versus NP Solution

The P versus NP Solution Frank Vega To cite this version: Frank Vega. The P versus NP Solution. 2015. HAL Id: hal-01143424 https://hal.archives-ouvertes.fr/hal-01143424 Submitted on 17 Apr

### Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

### Analysis of Algorithms, I

Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 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].

### ! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

Decision Problems 8.2 Definition of NP Decision problem. X is a set of strings. Instance: string s. Algorithm A solves problem X: A(s) = yes iff s X. Polynomial time. Algorithm A runs in polytime if for

### Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

### NP-completeness and the real world. NP completeness. NP-completeness and the real world (2) NP-completeness and the real world

-completeness and the real world completeness Course Discrete Biological Models (Modelli Biologici Discreti) Zsuzsanna Lipták Imagine you are working for a biotech company. One day your boss calls you

### Network File Storage with Graceful Performance Degradation

Network File Storage with Graceful Performance Degradation ANXIAO (ANDREW) JIANG California Institute of Technology and JEHOSHUA BRUCK California Institute of Technology A file storage scheme is proposed

### 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

### 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

### Chapter 7 Uncomputability

Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

### Introduction to NP-Completeness Written and copyright c by Jie Wang 1

91.502 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of

### Algebraic Computation Models. Algebraic Computation Models

Algebraic Computation Models Ζυγομήτρος Ευάγγελος ΜΠΛΑ 201118 Φεβρουάριος, 2013 Reasons for using algebraic models of computation The Turing machine model captures computations on bits. Many algorithms

### 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.

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### 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

### 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

### Fairness in Routing and Load Balancing

Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria

### Chapter 1. NP Completeness I. 1.1. Introduction. By Sariel Har-Peled, December 30, 2014 1 Version: 1.05

Chapter 1 NP Completeness I By Sariel Har-Peled, December 30, 2014 1 Version: 1.05 "Then you must begin a reading program immediately so that you man understand the crises of our age," Ignatius said solemnly.

### Algorithms and Data Structures

Algorithm Analysis Page 1 BFH-TI: Softwareschule Schweiz Algorithm Analysis Dr. CAS SD01 Algorithm Analysis Page 2 Outline Course and Textbook Overview Analysis of Algorithm Pseudo-Code and Primitive Operations

### Mathematical Induction

Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

### CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory Allan Borodin November 15, 2012; Lecture 10 1 / 27 Randomized online bipartite matching and the adwords problem. We briefly return to online algorithms

### 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

### SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL Department of Computer Science APPROVED: Vladik Kreinovich, Chair, Ph.D. Luc Longpré, Ph.D. Mohamed Amine Khamsi, Ph.D. Pablo

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

### On the Multiple Unicast Network Coding Conjecture

On the Multiple Unicast Networ Coding Conjecture Michael Langberg Computer Science Division Open University of Israel Raanana 43107, Israel miel@openu.ac.il Muriel Médard Research Laboratory of Electronics

### 2.1 Complexity Classes

15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look

### Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the

### Cycle transversals in bounded degree graphs

Electronic Notes in Discrete Mathematics 35 (2009) 189 195 www.elsevier.com/locate/endm Cycle transversals in bounded degree graphs M. Groshaus a,2,3 P. Hell b,3 S. Klein c,1,3 L. T. Nogueira d,1,3 F.

### Cycles and clique-minors in expanders

Cycles and clique-minors in expanders Benny Sudakov UCLA and Princeton University Expanders Definition: The vertex boundary of a subset X of a graph G: X = { all vertices in G\X with at least one neighbor

### On the k-path cover problem for cacti

On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China zeminjin@eyou.com, x.li@eyou.com Abstract In this paper we

### CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer

### 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

### 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

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice,

### 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

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### Codes for Network Switches

Codes for Network Switches Zhiying Wang, Omer Shaked, Yuval Cassuto, and Jehoshua Bruck Electrical Engineering Department, California Institute of Technology, Pasadena, CA 91125, USA Electrical Engineering

### 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

### ! 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

### Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

### Lecture 5 - CPA security, Pseudorandom functions

Lecture 5 - CPA security, Pseudorandom functions Boaz Barak October 2, 2007 Reading Pages 82 93 and 221 225 of KL (sections 3.5, 3.6.1, 3.6.2 and 6.5). See also Goldreich (Vol I) for proof of PRF construction.

### Primality - Factorization

Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.

### Finding and counting given length cycles

Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

### each college c i C has a capacity q i - the maximum number of students it will admit

n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

### THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware

### CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

CS311H Prof: Department of Computer Science The University of Texas at Austin Good Morning, Colleagues Good Morning, Colleagues Are there any questions? Logistics Class survey Logistics Class survey Homework

### Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,

### Network Algorithms for Homeland Security

Network Algorithms for Homeland Security Mark Goldberg and Malik Magdon-Ismail Rensselaer Polytechnic Institute September 27, 2004. Collaborators J. Baumes, M. Krishmamoorthy, N. Preston, W. Wallace. Partially

Logistics Big Data Algorithmic Introduction Prof. Yuval Shavitt Contact: shavitt@eng.tau.ac.il Final grade: 4 6 home assignments (will try to include programing assignments as well): 2% Exam 8% Big Data

### THE P VERSUS NP PROBLEM

THE P VERSUS NP PROBLEM STEPHEN COOK 1. Statement of the Problem The P versus NP problem is to determine whether every language accepted by some nondeterministic algorithm in polynomial time is also accepted

### Tetris is Hard: An Introduction to P vs NP

Tetris is Hard: An Introduction to P vs NP Based on Tetris is Hard, Even to Approximate in COCOON 2003 by Erik D. Demaine (MIT) Susan Hohenberger (JHU) David Liben-Nowell (Carleton) What s Your Problem?

### 1 The Line vs Point Test

6.875 PCP and Hardness of Approximation MIT, Fall 2010 Lecture 5: Low Degree Testing Lecturer: Dana Moshkovitz Scribe: Gregory Minton and Dana Moshkovitz Having seen a probabilistic verifier for linearity

### Transportation Polytopes: a Twenty year Update

Transportation Polytopes: a Twenty year Update Jesús Antonio De Loera University of California, Davis Based on various papers joint with R. Hemmecke, E.Kim, F. Liu, U. Rothblum, F. Santos, S. Onn, R. Yoshida,

### Heuristic Methods. Part #1. João Luiz Kohl Moreira. Observatório Nacional - MCT COAA. Observatório Nacional - MCT 1 / 14

Heuristic Methods Part #1 João Luiz Kohl Moreira COAA Observatório Nacional - MCT Observatório Nacional - MCT 1 / Outline 1 Introduction Aims Course's target Adviced Bibliography 2 Problem Introduction

### Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

### The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

### SYSM 6304: Risk and Decision Analysis Lecture 5: Methods of Risk Analysis

SYSM 6304: Risk and Decision Analysis Lecture 5: Methods of Risk Analysis M. Vidyasagar Cecil & Ida Green Chair The University of Texas at Dallas Email: M.Vidyasagar@utdallas.edu October 17, 2015 Outline

### Efficient Recovery of Secrets

Efficient Recovery of Secrets Marcel Fernandez Miguel Soriano, IEEE Senior Member Department of Telematics Engineering. Universitat Politècnica de Catalunya. C/ Jordi Girona 1 i 3. Campus Nord, Mod C3,

### 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

### A Fast Algorithm For Finding Hamilton Cycles

A Fast Algorithm For Finding Hamilton Cycles by Andrew Chalaturnyk A thesis presented to the University of Manitoba in partial fulfillment of the requirements for the degree of Masters of Science in Computer

### Bounded Treewidth in Knowledge Representation and Reasoning 1

Bounded Treewidth in Knowledge Representation and Reasoning 1 Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien Luminy, October 2010 1 Joint work with G.

### Diversity Coloring for Distributed Data Storage in Networks 1

Diversity Coloring for Distributed Data Storage in Networks 1 Anxiao (Andrew) Jiang and Jehoshua Bruck California Institute of Technology Pasadena, CA 9115, U.S.A. {jax, bruck}@paradise.caltech.edu Abstract