Questions? You are given the complete graph of Facebook. What questions would you ask? (What questions could we hope to answer?)

Similar documents
P vs. NP. Simpsons: Treehouse of Horror VI

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

CSE 417 Branch & Bound (pt 4) Branch & Bound

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

Greedy algorithms Or Do the right thing

IE 102 Spring Routing Through Networks - 1

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Chapter 10 Part 1: Reduction

Algorithm Design and Analysis

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Chapter 14 Section 3 - Slide 1

Chapter 8. NP-complete problems

Approximation Algorithms

val(y, I) α (9.0.2) α (9.0.3)

Institute of Operating Systems and Computer Networks Algorithms Group. Network Algorithms. Tutorial 4: Matching and other stuff

Notes for Recitation 9

APPROXIMATION ALGORITHMS FOR GEOMETRIC PROBLEMS

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Optimal tour along pubs in the UK

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

2 Approximation Algorithms for Metric TSP

NP-complete Reductions

Theorem 2.9: nearest addition algorithm

Traveling Salesperson Problem (TSP)

Notes for Lecture 24

EECS 203 Lecture 20. More Graphs

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

Prove, where is known to be NP-complete. The following problems are NP-Complete:

Lecture 8: The Traveling Salesman Problem

Hardness of Approximation for the TSP. Michael Lampis LAMSADE Université Paris Dauphine

Approximation Algorithms

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

6.2. Paths and Cycles

More NP-complete Problems. CS255 Chris Pollett May 3, 2006.

Chapter 9 Graph Algorithms

Lecture 14: Linear Programming II

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

NP-Hard (A) (B) (C) (D) 3 n 2 n TSP-Min any Instance V, E Question: Hamiltonian Cycle TSP V, n 22 n E u, v V H

Chapter 3: Paths and Cycles

8.1 Polynomial-Time Reductions

Partha Sarathi Mandal

Travelling Salesman Problem. Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

Graph Theory. Connectivity, Coloring, Matching. Arjun Suresh 1. 1 GATE Overflow

Ma/CS 6a Class 8: Eulerian Cycles

P and NP (Millenium problem)

Chapter 9 Graph Algorithms

Questions... How does one show the first problem is NP-complete? What goes on in a reduction? How hard are NP-complete problems?

Chapter 9 Graph Algorithms

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

CS 580: Algorithm Design and Analysis

3/7/2018. CS 580: Algorithm Design and Analysis. 8.1 Polynomial-Time Reductions. Chapter 8. NP and Computational Intractability

Approximation Algorithms

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Decision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not.

Chapter 8. NP-complete problems. Search problems. cient algorithms. Exponential search space

1 The Traveling Salesperson Problem (TSP)

Math 443/543 Graph Theory Notes 2: Transportation problems

Introduction to Graph Theory

Traveling Salesman Problem. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

CS 125 Section #10 Midterm 2 Review 11/5/14

8.1 Polynomial-Time Reductions

Module 6 NP-Complete Problems and Heuristics

Polynomial time approximation algorithms

CMPSCI611: The SUBSET-SUM Problem Lecture 18

3 Euler Tours, Hamilton Cycles, and Their Applications

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

Exact Algorithms for NP-hard problems

Outline. Graphs. Divide and Conquer.

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

6.889 Lecture 15: Traveling Salesman (TSP)

CSCE 350: Chin-Tser Huang. University of South Carolina

PATH FINDING AND GRAPH TRAVERSAL

Number Theory and Graph Theory

Chapter 8. NP-complete problems

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

11. APPROXIMATION ALGORITHMS

Graph Traversals. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari 1

Complexity Classes and Polynomial-time Reductions

Major Themes. 14: Graph Traversals. The Bridges of Königsberg Puzzle. Dr Papalaskari 1. Graph traversals: Euler circuit/trail.

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Module 6 P, NP, NP-Complete Problems and Approximation Algorithms

Lecture 13. Reading: Weiss, Ch. 9, Ch 8 CSE 100, UCSD: LEC 13. Page 1 of 29

CSE 100: B+ TREE, 2-3 TREE, NP- COMPLETNESS

Fundamental Properties of Graphs

Improved Approximations for Graph-TSP in Regular Graphs

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

Coping with NP-Completeness

Graph (1A) Young Won Lim 4/19/18

Final. Name: TA: Section Time: Course Login: Person on Left: Person on Right: U.C. Berkeley CS170 : Algorithms, Fall 2013

Basic Approximation algorithms

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

CMSC 451: Lecture 22 Approximation Algorithms: Vertex Cover and TSP Tuesday, Dec 5, 2017

Introduction to Algorithms

Approximation Algorithms

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

Classic Graph Theory Problems

The Konigsberg Bridge Problem

Transcription:

P vs. NP What now?

Attribution These slides were prepared for the New Jersey Governor s School course The Math Behind the Machine taught in the summer of 2011 by Grant Schoenebeck Large parts of these slides were copied or modified from the previous years courses given by Troy Lee in 2010 and Ryan and Virginia Williams in 2009.

Questions? You are given the complete graph of Facebook. What questions would you ask? (What questions could we hope to answer?)

So What Now? Relax worst case Use CPLEX/SAT solver Relax time constraints Relax exact optimal

Proving conp statements Resolution x A x B A B Can try to take 3-SAT formula and resolve! Thm: any false statement will resolve to x x Thm: RANDOM 3-Sat will take time 2 n to resolve. Phases of hardness

Approximation Algorithms Cannot solve Vertex Cover, but can we find a good approximation for it? Recall VertexCover: Given (G, k) a graph and integer: Are there k nodes in G that are incident on all edges? Can we approximate it? Wait! That would require us to prove an approximate conp statement: that the VertexCover is not too small.

X Vertex Cover Approximation min v V x v (u, v) E x v + x u 1 v V : x v {0, 1} 0 x v 1 Integrality Gap = IP LP 2 by rounding 2: complete graph IP = n-1 LP = n/2

Greedy Set Cover SetCover: Given list of n items S and subsets of S: S 1, S 2,, S m and integer k: are there k subsets that cover S? Take largest set, then largest set with respect to remaining elements and repeat as necessary. At each step, greedy covers at least a 1-1/OPT fraction of what is left. So takes at most x steps where 1 1 x = n so x = O(log(n)m) OPT

Traveling Salesmen Problem TSP: Given a list of cities and pairwise distances between them, is there a tour which visits each city exactly once and has length at most k? Find Minimum Spanning Tree Find optimal matching on odd degree vertices Now take Eulerian cycle.

P vs. NP Game Show Numbers Graphs Logic Networks 128 128 128 128 256 256 256 256 512 512 512 512

Primality Testing Given a number n, decide if n is prime. Agrawal, Kayal, and Saxena gave an algorithm for testing primality with running time about

Quadratic Equations Given positive integers a,b,c, do there exist positive integers x and y such that NP-Complete!

Factoring Given a number n, and m < n, does n have a factor d satisfying 1 < d < m? Currently the best algorithm for factoring takes time about It is widely believed that factoring is not NP-complete.

Hamiltonian Cycle Given a graph, is there a cycle which visits all vertices exactly once? NP-Complete!

Hamiltonian Puzzle Can a knight visit all squares on a chess board exactly once?

Independent Set Given a graph G and integer k, are there at least k vertices with no edges between them? NP-Complete!

Eulerian Cycle Given a graph G, is there a cycle which traverses each edge exactly once? Thm: A graph has an Eulerian cycle if and only if every vertex has even degree.

Euler s Walk Is it possible to take a walk around Konigsberg crossing each bridge exactly once? Euler showed that you cannot!

Circuits Composed of AND,OR,NOT gates AND OR AND AND Can have fan out > 1 AND 0 1 OR 1 1 NOT 1 0 0 Means you don t have to recompute things. 0

Circuit SAT AND OR AND AND Given a circuit with variable inputs, is there a setting of the variables which evaluates to 1? AND OR 1 NOT 0 NP-Complete!

3-SAT Given a set of clauses, each consisting of the OR of three variables or their negations, does there exist a Boolean assignment satisfying all the clauses? NP-Complete!

2-SAT Given a set of clauses, each consisting of the OR of two variables or their negations, does there exist a Boolean assignment satisfying all the clauses? Solvable in polynomial time.

Cuts A cut is a set of edges whose removal leaves a graph disconnected.

Balanced Cut Given a graph G and integer k, is there a cut of at most k edges that separates the vertices into two unconnected parts S,T satisfying NP-Complete!

Minimum Spanning Tree Challenge Round!

Minimum Spanning Tree A tree is a connected acyclic graph. A minimum spanning tree of a weighted graph G is the smallest weight tree that is a subgraph of G and includes all the vertices of G.

Minimum Spanning Tree

Find MST in this graph...

Traveling Salesman Problem Challenge Round!

Traveling Salesman Problem Given n cities and the pairwise distances between them, find the shortest tour which visits each city exactly once.

Find the shortest tour in this graph...