Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

Size: px
Start display at page:

Download "Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course"

Transcription

1 Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course Alex Angelopoulos, NTUA January 22, 2015

2 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 0/1 Integer Programming 2/26 0/1 Integer Programming Vertex Cover 3-colorability Hamilton Path (HP) Traveling Salesman Problem (TSP)

3 Reducing 3-SAT to 0/1 IP Definition 1 (0/1 IP). Input: an integer matrix C and vector b. Output: decide if there is a 0/1 vector x such that: Cx b. 0/1 IP NP (why?) We choose 3-SAT as our known NP-complete problem and consider the formula: φ = C 1 C 2... C m, literals x 1,..., x n We will construct our m n matrix C : 1, if x j C i c ij = 1, if x j C i 0, otherwise b i = 1 (the number of complemented variables in C i ) Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 0/1 Integer Programming 3/26

4 Reducing 3-SAT to 0/1 IP Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 0/1 Integer Programming 4/26 Note that: Cx b actually means n j=1 c ijx j b i, i. If 3-SAT is satisfiable, then every C i is True. Focus on a line of C and discard the zeros: c ij1 x j1 + c ij2 x j2 + c ij3 x j3 1 #(complemented) = 1x j1 + 1x j2 + 1x j3 1 1x j1 + 1x j2 1x j3 0 1x j1 1x j2 1x j3 1 1x j1 1x j2 1x j3 2 3-SAT P 0/1 IP

5 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Vertex Cover 5/26 0/1 Integer Programming Vertex Cover 3-colorability Hamilton Path (HP) Traveling Salesman Problem (TSP)

6 From 3-SAT to Vertex Cover Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Vertex Cover 6/26 Definition 2 (Vertex Cover (VC)). Input: a graph G(V, E). Output: decide if there is a set S V of size S k such that every edge is adjacent to a vertex v S. VC NP (why?) We choose 3-SAT as our known NP-complete problem and consider (again) the formula: φ = C 1 C 2... C m, with literals x 1,..., x n

7 Intro to gadgets! Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Vertex Cover 7/26 A gadget is anything (in the context of the target problem) that can help you fix the desired instance... z y y x x x y z z Size of a VC here: 5 = 3 (literals) + 2 (2 clause)

8 G φ and the if and only if check Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Vertex Cover 8/26 φ = (x y z) ( y z w) x x y y z z w w z w x y y z ( ) {x, y, z, w} = {T, F, T, T } is a satisfying assignment. See that we need 2 nodes from each clause gadget in order to get a valid VC of size k = n + 2m.

9 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Vertex Cover 9/26 G φ and the if and only if check x x y y z z w w z w x y y z ( ) For a VC we must get: At least 1 vertex of each literal gadget Clause gadget s vetrices cannot cover the literal gadget s edges. At least 2 vertices of each clause gadget (1 cannot cover the triangle). If there is a cover of size n + 2m then the literal gadgets indicate the satisfying assignment!

10 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 10/26 0/1 Integer Programming Vertex Cover 3-colorability Hamilton Path (HP) Traveling Salesman Problem (TSP)

11 Reducing 3-SAT to 3-COLOR Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 11/26 Definition 3 (3-COLOR). Input: a graph G(V, E). Output: decide if χ(g) 3? 3-COLOR NP (why?) We choose 3-SAT as our known NP-complete problem and consider (yet again) the formula: φ = C 1 C 2... C m, with literals x 1,..., x n

12 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 12/26 Constructing the graph G φ We ll consider the forumla φ = (x y z) ( y z w). Let s start with the vertices of the literals: for each x i we create v i and v i. In order to dictate an equivalent True/False coloring of v i, v i, we draw all edges v i v i plus we link all v i, v i with a base vertex b. Check that now we have n triangles, all having b in common. b x x y y z z w w

13 c Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 13/26 Constructing the graph G φ The gadget: a color-driven or gate C i s literals as input a b c C i evaluation If all a,b,c are colored False, the output vertex has to be False. If a or b or c is True, then the output vertex can also be True.

14 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 14/26 Completing G φ φ = (x y z) ( y z w) t f b x x Let s satisfy φ... χ(g φ ) 3 y y G 1 z z w w G 2

15 Checking the if and only if Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- 3-colorability 15/26 Now let G φ be 3-colorable. And pay attention to the coloring of u i, ū i t f b 3-SAT P 3-COLOR u1 u1 u2 u2 G1 u3 u3 u4 u4. G2. Since the gadgets output orange, they must each have an orange input. So our true color is the orange, and an assignment that satisfies φ follows the orange u-nodes.

16 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 16/26 0/1 Integer Programming Vertex Cover 3-colorability Hamilton Path (HP) Traveling Salesman Problem (TSP)

17 Reducing 3-SAT to Hamilton Path Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 17/26 Definition 4 (Hamilton Path). Input: graph G. Output: decide whether G allows a path visiting all nodes excatly once. Hamilton Path NP. We can guess n 1 edges and verify if they add up to a Hamilton Path. We need 3 gadgets for this problem..

18 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 18/26 Gadgets (1/3) The choice gadget - one per literal T F Actually, the colored edges will become subgraphs that allow a path between the blue nodes. They sure translate to an evaluation True of False for the literal.

19 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 19/26 Gadgets (2/3) The consistency gadget - an xor gate A part o a Hamilton Path must either enter and exit this subgraph using both top vertices or both bottom vertices. That exclusive or functionality will be the hint for gadget 3 to prove useful.

20 Gadgets (3/3) Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 20/26 The constraint gadget - one per clause x 3 x 3 x 1 x 1 C i x 2 x 2 Let s take C i = (x 1 x 2 x 3 ) We must force that the edges (paths) of the triangle are traversed by a Hamilton Path if and only if the corresponding literal is false. Then the clause is True, or else there would be no Hamilton Path!

21 Constructing the full R(φ) Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 21/26 Let φ = (x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) s t Orange nodes form a clique

22 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 22/26 φ is satisfiable R(φ) has a Hamilton Path Let φ = (x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) s t

23 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Hamilton Path (HP) 23/26 R(φ) has a Hamilton Path φ is satisfiable Remember the costraint gadget. If the red edge- xor path belongs to the Hamilton Path, then both green edges do not belong to the path. But this defines a truth assignment, where no clause gets all 3 literals false. t3-sat P Hamilton Path

24 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Traveling Salesman Problem (TSP) 24/26 0/1 Integer Programming Vertex Cover 3-colorability Hamilton Path (HP) Traveling Salesman Problem (TSP)

25 The Traveling Salesman Problem Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Traveling Salesman Problem (TSP) 25/26 Definition 5 (TSP). Given a set of n cities and the distance between any two of them, find the shortest tour covering all cities. Definition 6 (TSP (Decision problem)). Input: a complete graph G with weighted edges, budget (target cost) B Output: is there a tour (cycle) visiting every vertex of G with total cost B? Verify that TSP(D) belongs to class NP... We shall use Hamilton Path as ou known NP-complete problem.

26 Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness- Traveling Salesman Problem (TSP) 26/26 Hamilton Path P TSP(D) Take any instance of Hamilton Path (i.e. any graph G with n vertices) and take a copy of it, Ḡ. Set all edges of Ḡ to have a weight equal to 1. Insert all missing edges of Ḡ with weight 2. To finalize the instance of TSP(D), take B = n + 1. G has a Hamilton Path Ḡ has a tour of cost n Hamilton Path P TSP(D) Ḡ has a tour of cost n + 1 G has a Hamilton Path...

Lecture 7: NP-Complete Problems

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

More information

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

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

More information

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

More information

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

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

More information

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

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

More information

Definition. A graph is a collection of vertices, and edges between them. They are often represented by a drawing:

Definition. A graph is a collection of vertices, and edges between them. They are often represented by a drawing: 1. GRAPHS AND COLORINGS Definition. A graph is a collection of vertices, and edges between them. They are often represented by a drawing: 3 vertices 3 edges 4 vertices 4 edges 4 vertices 6 edges A graph

More information

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

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

More information

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

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

More information

Introduction to Logic in Computer Science: Autumn 2006

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

More information

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

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

More information

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

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

More information

Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, === Homework submission instructions ===

Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, === Homework submission instructions === Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, 2012 === Homework submission instructions === Submit the answers for writing problems (including your programming report) through

More information

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

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

More information

2.3 Scheduling jobs on identical parallel machines

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

More information

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY 11794 4400

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY 11794 4400 Lecture 19: Introduction to NP-Completeness Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Reporting to the Boss Suppose

More information

CMPSCI611: Approximating MAX-CUT Lecture 20

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

More information

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

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

More information

Problem Set 7 Solutions

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

More information

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

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

More information

CSC 373: Algorithm Design and Analysis Lecture 16

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

More information

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

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)

More information

The Traveling Beams Optical Solutions for Bounded NP-Complete Problems

The Traveling Beams Optical Solutions for Bounded NP-Complete Problems The Traveling Beams Optical Solutions for Bounded NP-Complete Problems Shlomi Dolev, Hen Fitoussi Abstract Architectures for optical processors designed to solve bounded instances of NP-Complete problems

More information

CoNP and Function Problems

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

More information

Graph Theory. Euler tours and Chinese postmen. John Quinn. Week 5

Graph Theory. Euler tours and Chinese postmen. John Quinn. Week 5 Graph Theory Euler tours and Chinese postmen John Quinn Week 5 Recap: connectivity Connectivity and edge-connectivity of a graph Blocks Kruskal s algorithm Königsberg, Prussia The Seven Bridges of Königsberg

More information

Notes on Matrix Multiplication and the Transitive Closure

Notes on Matrix Multiplication and the Transitive Closure ICS 6D Due: Wednesday, February 25, 2015 Instructor: Sandy Irani Notes on Matrix Multiplication and the Transitive Closure An n m matrix over a set S is an array of elements from S with n rows and m columns.

More information

Answers to some of the exercises.

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

More information

Notes on NP Completeness

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

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 04 Graph Theory Homework 7 Solutions April 3, 03 Introduction to Graph Theory, West Section 5. 0, variation of 5, 39 Section 5. 9 Section 5.3 3, 8, 3 Section 7. Problems you should

More information

On the Unique Games Conjecture

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

More information

CAD Algorithms. P and NP

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

More information

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

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:

More information

Informatique Fondamentale IMA S8

Informatique Fondamentale IMA S8 Informatique Fondamentale IMA S8 Cours 4 : graphs, problems and algorithms on graphs, (notions of) NP completeness Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université

More information

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

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

More information

Graph Theory Problems and Solutions

Graph Theory Problems and Solutions raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

More information

Guessing Game: NP-Complete?

Guessing Game: NP-Complete? 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

More information

A Working Knowledge of Computational Complexity for an Optimizer

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

More information

Chapter. NP-Completeness. Contents

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

More information

Complexity and Completeness of Finding Another Solution and Its Application to Puzzles

Complexity and Completeness of Finding Another Solution and Its Application to Puzzles yato@is.s.u-tokyo.ac.jp seta@is.s.u-tokyo.ac.jp Π (ASP) Π x s x s ASP Ueda Nagao n n-asp parsimonious ASP ASP NP Complexity and Completeness of Finding Another Solution and Its Application to Puzzles Takayuki

More information

Existence of Simple Tours of Imprecise Points

Existence of Simple Tours of Imprecise Points Existence of Simple Tours of Imprecise Points Maarten Löffler Department of Information and Computing Sciences, Utrecht University Technical Report UU-CS-007-00 www.cs.uu.nl ISSN: 09-7 Existence of Simple

More information

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

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

More information

Theoretical Computer Science (Bridging Course) Complexity

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

More information

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

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

More information

COLORED GRAPHS AND THEIR PROPERTIES

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

More information

Tetris is Hard: An Introduction to P vs NP

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?

More information

Lecture 4: The Chromatic Number

Lecture 4: The Chromatic Number Introduction to Graph Theory Instructor: Padraic Bartlett Lecture 4: The Chromatic Number Week 1 Mathcamp 2011 In our discussion of bipartite graphs, we mentioned that one way to classify bipartite graphs

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Complexity Theory: Efficient Reductions Between Computational Problems Lecture 26 (Nov 18, 2010) A Graph Named Gadget K-Coloring We define a k-coloring

More information

Tutorial 8. NP-Complete Problems

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

More information

Boolean Representations and Combinatorial Equivalence

Boolean Representations and Combinatorial Equivalence Chapter 2 Boolean Representations and Combinatorial Equivalence This chapter introduces different representations of Boolean functions. It then discuss the applications of these representations for proving

More information

Finding the Shortest Move-Sequence in the Graph-Generalized 15-Puzzle is NP-Hard

Finding the Shortest Move-Sequence in the Graph-Generalized 15-Puzzle is NP-Hard Finding the Shortest Move-Sequence in the Graph-Generalized 15-Puzzle is NP-Hard Oded Goldreich Abstract. Following Wilson (J. Comb. Th. (B), 1975), Johnson (J. of Alg., 1983), and Kornhauser, Miller and

More information

Homework 15 Solutions

Homework 15 Solutions PROBLEM ONE (Trees) Homework 15 Solutions 1. Recall the definition of a tree: a tree is a connected, undirected graph which has no cycles. Which of the following definitions are equivalent to this definition

More information

We know a formula for and some properties of the determinant. Now we see how the determinant can be used.

We know a formula for and some properties of the determinant. Now we see how the determinant can be used. Cramer s rule, inverse matrix, and volume We know a formula for and some properties of the determinant. Now we see how the determinant can be used. Formula for A We know: a b d b =. c d ad bc c a Can we

More information

Lattice Point Geometry: Pick s Theorem and Minkowski s Theorem. Senior Exercise in Mathematics. Jennifer Garbett Kenyon College

Lattice Point Geometry: Pick s Theorem and Minkowski s Theorem. Senior Exercise in Mathematics. Jennifer Garbett Kenyon College Lattice Point Geometry: Pick s Theorem and Minkowski s Theorem Senior Exercise in Mathematics Jennifer Garbett Kenyon College November 18, 010 Contents 1 Introduction 1 Primitive Lattice Triangles 5.1

More information

DATA ANALYSIS II. Matrix Algorithms

DATA ANALYSIS II. Matrix Algorithms DATA ANALYSIS II Matrix Algorithms Similarity Matrix Given a dataset D = {x i }, i=1,..,n consisting of n points in R d, let A denote the n n symmetric similarity matrix between the points, given as where

More information

Social Media Mining. Graph Essentials

Social Media Mining. Graph Essentials Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

More information

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005 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

More information

The Classes P and NP. mohamed@elwakil.net

The Classes P and NP. mohamed@elwakil.net Intractable Problems The Classes P and NP Mohamed M. El Wakil mohamed@elwakil.net 1 Agenda 1. What is a problem? 2. Decidable or not? 3. The P class 4. The NP Class 5. TheNP Complete class 2 What is a

More information

GRAPH THEORY and APPLICATIONS. Trees

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.

More information

Keywords: Travelling Salesman Problem, Map Reduce, Genetic Algorithm. I. INTRODUCTION

Keywords: Travelling Salesman Problem, Map Reduce, Genetic Algorithm. I. INTRODUCTION ISSN: 2321-7782 (Online) Impact Factor: 6.047 Volume 4, Issue 6, June 2016 International Journal of Advance Research in Computer Science and Management Studies Research Article / Survey Paper / Case Study

More information

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

More information

Using the Simplex Method in Mixed Integer Linear Programming

Using the Simplex Method in Mixed Integer Linear Programming Integer Using the Simplex Method in Mixed Integer UTFSM Nancy, 17 december 2015 Using the Simplex Method in Mixed Integer Outline Mathematical Programming Integer 1 Mathematical Programming Optimisation

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spanning Trees Algorithms and 18.304 Presentation Outline 1 Graph Terminology Minimum Spanning Trees 2 3 Outline Graph Terminology Minimum Spanning Trees 1 Graph Terminology Minimum Spanning Trees

More information

5.1 Bipartite Matching

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

More information

Where the Really Hard Problems Are

Where the Really Hard Problems Are Where the Really Hard Problems Are Peter Cheeseman Bob Kanefsky William M. Taylor RIACS* Sterling Software Sterling Software Artificial Intelligence Research Branch NASA Ames Research Center, Mail Stop

More information

P versus NP, and More

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

More information

Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

More information

Planarity Planarity

Planarity Planarity Planarity 8.1 71 Planarity Up until now, graphs have been completely abstract. In Topological Graph Theory, it matters how the graphs are drawn. Do the edges cross? Are there knots in the graph structure?

More information

Social Media Mining. Network Measures

Social Media Mining. Network Measures Klout Measures and Metrics 22 Why Do We Need Measures? Who are the central figures (influential individuals) in the network? What interaction patterns are common in friends? Who are the like-minded users

More information

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

! 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

More information

Dynamic Programming. Applies when the following Principle of Optimality

Dynamic Programming. Applies when the following Principle of Optimality Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.

More information

Chapter 8 Independence

Chapter 8 Independence Chapter 8 Independence Section 8.1 Vertex Independence and Coverings Next, we consider a problem that strikes close to home for us all, final exams. At the end of each term, students are required to take

More information

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

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

More information

An Introduction to APGL

An Introduction to APGL An Introduction to APGL Charanpal Dhanjal February 2012 Abstract Another Python Graph Library (APGL) is a graph library written using pure Python, NumPy and SciPy. Users new to the library can gain an

More information

IMO Training 2010 Russian-style Problems Alexander Remorov

IMO Training 2010 Russian-style Problems Alexander Remorov Solutions: Combinatorial Geometry 1. No. Call a lattice point even if the sum of its coordinates is even, and call it odd otherwise. Call one of the legs first, and other one second. Then every time a

More information

Applied Algorithm Design Lecture 5

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

More information

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as: Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

More information

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

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

More information

Chapter 6: Graph Theory

Chapter 6: Graph Theory Chapter 6: Graph Theory Graph theory deals with routing and network problems and if it is possible to find a best route, whether that means the least expensive, least amount of time or the least distance.

More information

Introduction to computer science

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.

More information

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES 136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics

More information

(Vertex) Colorings. We can properly color W 6 with. colors and no fewer. Of interest: What is the fewest colors necessary to properly color G?

(Vertex) Colorings. We can properly color W 6 with. colors and no fewer. Of interest: What is the fewest colors necessary to properly color G? Vertex Coloring 2.1 33 (Vertex) Colorings Definition: A coloring of a graph G is a labeling of the vertices of G with colors. [Technically, it is a function f : V (G) {1, 2,...,l}.] Definition: A proper

More information

Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

More information

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

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,

More information

CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

More information

Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS

Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS 1.1.25 Prove that the Petersen graph has no cycle of length 7. Solution: There are 10 vertices in the Petersen graph G. Assume there is a cycle C

More information

Figure 4.0 CPMS Architecture

Figure 4.0 CPMS Architecture CHAPTER-4 SYSTEM DESIGN System architecture of our project can be explained by using following diagram. Figure 4.0 CPMS Architecture Basically our system is divided in to two parts 1]. Web Role 2]. Worker

More information

Algorithm Design and Analysis

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;

More information

COT5405 Analysis of Algorithms Homework 3 Solutions

COT5405 Analysis of Algorithms Homework 3 Solutions COT0 Analysis of Algorithms Homework 3 Solutions. Prove or give a counter example: (a) In the textbook, we have two routines for graph traversal - DFS(G) and BFS(G,s) - where G is a graph and s is any

More information

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling 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

More information

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7 (67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition

More information

Near Optimal Solutions

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.

More information

Connections between decomposition trees of 3-connected plane triangulations and hamiltonian properties

Connections between decomposition trees of 3-connected plane triangulations and hamiltonian properties Introduction Hamiltonicity Other hamiltonian properties Connections between decomposition trees of 3-connected plane triangulations and hamiltonian properties Gunnar Brinkmann Jasper Souffriau Nico Van

More information

Trees and Fundamental Circuits

Trees and Fundamental Circuits Trees and Fundamental Circuits Tree A connected graph without any circuits. o must have at least one vertex. o definition implies that it must be a simple graph. o only finite trees are being considered

More information

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis Graph Theory and Complex Networks: An Introduction Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.0, steen@cs.vu.nl Chapter 06: Network analysis Version: April 8, 04 / 3 Contents Chapter

More information

Generalized Induced Factor Problems

Generalized Induced Factor Problems Egerváry Research Group on Combinatorial Optimization Technical reports TR-2002-07. Published by the Egrerváry Research Group, Pázmány P. sétány 1/C, H 1117, Budapest, Hungary. Web site: www.cs.elte.hu/egres.

More information

1. Relevant standard graph theory

1. Relevant standard graph theory Color identical pairs in 4-chromatic graphs Asbjørn Brændeland I argue that, given a 4-chromatic graph G and a pair of vertices {u, v} in G, if the color of u equals the color of v in every 4-coloring

More information

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

More information

Some Minesweeper Configurations

Some Minesweeper Configurations Some Minesweeper Configurations Richard Kaye School of Mathematics The University of Birmingham Birmingham B15 2TT RWKaye@bhamacuk http://webmatbhamacuk/rwkaye/ 31st May 2007 Contents 1 Introduction 2

More information

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

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,

More information

Principle of (Weak) Mathematical Induction. P(1) ( n 1)(P(n) P(n + 1)) ( n 1)(P(n))

Principle of (Weak) Mathematical Induction. P(1) ( n 1)(P(n) P(n + 1)) ( n 1)(P(n)) Outline We will cover (over the next few weeks) Mathematical Induction (or Weak Induction) Strong (Mathematical) Induction Constructive Induction Structural Induction Principle of (Weak) Mathematical Induction

More information

Transportation Polytopes: a Twenty year Update

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,

More information