CSC 373: Algorithm Design and Analysis Lecture 17

Similar documents
Algorithms, Lecture 3 on NP : Nondeterministic Polynomial Time

Part I: Graph Coloring

Lecture 3: Nondeterministic Computation

Business Intelligence & Process Modelling

CSE 101. Algorithm Design and Analysis Miles Jones Office 4208 CSE Building Lecture 9: Greedy

22/9/2013. Acknowledgement. Outline of the Lecture. What is an Agent? EH2750 Computer Applications in Power Systems, Advanced Course. output.

Chapter 12. Synchronous Circuits. Contents

On the Infinity of Primes of the Form 2x 2 1

The PeRIPLO Propositional Interpolator

Label the phrases below S for the same meaning or D for different meaning

Logic Design II (17.342) Spring Lecture Outline

CPS311 Lecture: Sequential Circuits

PROFESSOR: I'd like to welcome you to this course on computer science. Actually, that's a terrible way to start.

1/ 19 2/17 3/23 4/23 5/18 Total/100. Please do not write in the spaces above.

Tape. Tape head. Control Unit. Executes a finite set of instructions

6.034 Notes: Section 4.1

COMP Intro to Logic for Computer Scientists. Lecture 2

Two Enumerative Tidbits

CS61C : Machine Structures

CPSC 121: Models of Computation. Module 1: Propositional Logic

Lecture 7. Scope and Anaphora. October 27, 2008 Hana Filip 1

Post-Routing Layer Assignment for Double Patterning

Beyond Worst Case Analysis in Approxima4on Uriel Feige The Weizmann Ins2tute

A High- Speed LFSR Design by the Application of Sample Period Reduction Technique for BCH Encoder

Language and Mind Prof. Rajesh Kumar Department of Humanities and Social Sciences Indian Institute of Technology, Madras

1 The structure of this exercise

Cryptanalysis of LILI-128

Formalizing Irony with Doxastic Logic

Heuristic Search & Local Search

THE COMMON MINIMAL COMMON NEIGHBORHOOD DOMINATING SIGNED GRAPHS. Communicated by Alireza Abdollahi. 1. Introduction

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Randomness for Ergodic Measures

Project 6: Latches and flip-flops

Dynamic Semantics! (Part 1: Not Actually Dynamic Semantics) Brian Morris, William Rose

Peirce's Remarkable Rules of Inference

Chapter 3. Boolean Algebra and Digital Logic

Mathematics, Proofs and Computation

PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION

MATH 214 (NOTES) Math 214 Al Nosedal. Department of Mathematics Indiana University of Pennsylvania. MATH 214 (NOTES) p. 1/11

Homework 2 Key-finding algorithm

I Don t Want to Think About it Now: Decision Theory With Costly Computation

Non-Classical Logics. Viorica Sofronie-Stokkermans Winter Semester 2012/2013

Comment #147, #169: Problems of high DFE coefficients

MATH 214 (NOTES) Math 214 Al Nosedal. Department of Mathematics Indiana University of Pennsylvania. MATH 214 (NOTES) p. 1/3

2D ELEMENTARY CELLULAR AUTOMATA WITH FOUR NEIGHBORS

Figure 9.1: A clock signal.

ORF 307: Lecture 14. Linear Programming: Chapter 14: Network Flows: Algorithms

8.5 --Intro to RAA Proofs Practice with Proofs. Today s Lecture 4/20/10

5. One s own opinion shall be separated from facts and logical conclusions as well as from the opinions of cited authors.

1 Lesson 11: Antiderivatives of Elementary Functions

EE 200 Problem Set 3 Cover Sheet Fall 2015

Fourier Integral Representations Basic Formulas and facts

Section A Using the n th Term Formula Grade D / C

Check back at the NCTM site for additional notes and tasks next week.

Hardware Implementation of Viterbi Decoder for Wireless Applications

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Recent Advances in Algorithmic Learning Theory of the Kanban Cell Neuron Network

Running head: Collective Representational Content for Shared Extended Mind. Collective Representational Content for Shared Extended Mind.

THE SUBSTITUTIONAL ANALYSIS OF LOGICAL CONSEQUENCE

Communication and Networking Error Control Basics

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

Restricted super line signed graph RL r (S)

Note on Path Signed Graphs

Introduction p. 1 The Elements of an Argument p. 1 Deduction and Induction p. 5 Deductive Argument Forms p. 7 Truth and Validity p. 8 Soundness p.

Aristotle s Metaphysics

Math 8 Assignment Log. Finish Discussion on Course Outline. Activity Section 2.1 Congruent Figures Due Date: In-Class: Directions for Section 2.

Mining Complex Boolean Expressions for Sequential Equivalence Checking

1. Introduction. Abstract. 1.1 Logic Criteria

CSC258: Computer Organization. Combinational Logic

Total Minimal Dominating Signed Graph

Math and Music. Cameron Franc

2550 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 54, NO. 6, JUNE 2008

A Tripartite Plan-Based Model of Narrative for Narrative Discourse Generation

Feb 22,2013. CS402- Theory of Automata Solved MCQS From Final term Papers. FINALTERM EXAMINATION Fall 2012 CS402- Theory of Automata

PLEASE SCROLL DOWN FOR ARTICLE

MITOCW ocw f08-lec19_300k

Artificial Intelligence

Vagueness & Pragmatics

Ling 130: Formal Semantics. Spring Natural Deduction with Propositional Logic. Introducing. Natural Deduction

Math Final Exam Practice Test December 2, 2013

Topics in Linguistic Theory: Propositional Attitudes

CONTINGENCY AND TIME. Gal YEHEZKEL

DIFFERENTIATE SOMETHING AT THE VERY BEGINNING THE COURSE I'LL ADD YOU QUESTIONS USING THEM. BUT PARTICULAR QUESTIONS AS YOU'LL SEE

On the Optimal Compressions in the Compress-and-Forward Relay Schemes

Chapter 5 Synchronous Sequential Logic

Consistency and Completeness of OMEGA, a Logic for Knowledge Representation

Disquotation, Conditionals, and the Liar 1

Formalising arguments

Music Segmentation Using Markov Chain Methods

Informatique Fondamentale IMA S8

A New General Class of Fuzzy Flip-Flop Based on Türkşen s Interval Valued Fuzzy Sets

Auto-Teach. Vision Inspection that Learns What a Good Part Is

ZONE PLATE SIGNALS 525 Lines Standard M/NTSC

Lecture 24: Motivating Modal Logic, Translating into It

Lesson 25: Solving Problems in Two Ways Rates and Algebra

This article was published in Cryptologia Volume XII Number 4 October 1988, pp

Western Statistics Teachers Conference 2000

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

Warm-up: Thinking back to the chart from Friday, explain how you changed a number in scientific notation to standard form.

THE SUBSTITUTIONAL ANALYSIS OF LOGICAL CONSEQUENCE

Transcription:

CSC 373: Algorithm Design and Analysis Lecture 17 Allan Borodin March 4, 2013 Some materials are from Keven Wayne s slides and MIT Open Courseware spring 2011 course at http://tinyurl.com/bjde5o5. 1 / 12

Announcements and Outline Announcements Lecture this Friday. Assignment 2 is due this Friday, March 1. Term test 2 on Monday, March 4. You must keep all graded work until the term is over just in case there is some inconsistency in the grades recorded and what you have. Today s outline Review 3SAT p SubsetSum transformation and consequences. 3SAT p 3-COLOR Cook s proof that SAT is NP complete. Note: I am going to present the Turing machine model on the board and may show a simulation from the web. One such site is http://morphett.info/turing/turing.html 2 / 12

3SAT reduces to Subset Sum Claim 3SAT p Subset Sum Given an instance F of 3SAT, we construct an instance of Subset Sum that has solution iff F is satisfiable. 3 / 12

Some consequences of SubsetSum completeness Recall hint for question 4b of assignment. SubsetSum p Knapsack where Knapsack { = ( s 1, v 1,..., s n, v n ; S, V ) S : i S s i S, } i S v i V SubsetSum p Half-SubsetSum where Half-SubsetSum = {a 1,..., a n S, i S a i = 1 2 n i=1 a i}. The NP completeness of Half-SubsetSum implies the completeness of a decision problem version of the makespan problem. 4 / 12

Reviewing how to show some L is NP complete. We must show L NP. To do so, we provide a polynomial time verification predicate R(x, y) and polynomial length certificate y for every x L; that is, L = {x y, R(x, y) and y q( x )}. We must show that L is NP hard (say with respect to polynomial time transformations); that is, for some known NP complete L, there is a polynomial time transducer function h such that x L iff h(x) L. This then establishes that L p L. Warning: The reduction/transformation L p L must be in the correct direction and h must be defined for every input x; that is, one must also show that if x / L then h(x) / L as well as showing that if x L then h(x) L. 5 / 12

Some transformations are easy, some not Tranformations are (as we have been arguing) algorithms computing a function and hence like any algorithmic problem, sometimes there are easy solutions and sometimes not. In showing NP-completeness it certainly helps to choose the right known NP-complete problem to use for the transformation. In the Karp tree, there are some transformations that are particularly easy such as : IndependentSet p VertexCover VertexCover p SetCover A transforrmation of moderate difficulty is 3SAT p 3-COLOR I am using Kevin Wayne s slides to illustrate the transformation. See slides for Poly-time reductions in http://www.cs.princeton.edu/courses/archive/spring05/cos423/lectures.php 6 / 12

3-Colorability 3CNF p 3-COLOR: Outline of Transformation Claim. 3-SAT! P 3-COLOR. Pf. Given 3-SAT instance ", we construct an instance of 3-COLOR that is 3-colorable iff " is satisfiable. Construction. i. For each literal, create a node. ii. Create 3 new nodes T, F, B; connect them in a triangle, and connect each literal to B. iii. Connect each literal to its negation. iv. For each clause, add gadget of 6 nodes and 13 edges. to be described next If φ is a 3CNF formula in n variables and m clauses, then h(φ) = G φ will have 2n + 6m + 3 nodes and 3n + 13m + 3 edges. 7 / 12

3CNF p 3-COLOR: Consistent 3-Colorability literals Claim. Graph is 3-colorable iff " is satisfiable. Pf. # Suppose graph is 3-colorable.! Consider assignment that sets all T literals to true.! (ii) ensures each literal is T or F.! (iii) ensures a literal and its negation are opposites. true T false F B base x 1 x x 1 2 x 2 x 3 x 3 x n x n 8 / 12 3

3CNF p 3-COLOR: The 3-Colorability clause gadget Claim. Graph is 3-colorable iff " is satisfiable. Pf. # Suppose graph is 3-colorable.! Consider assignment that sets all T literals to true.! (ii) ensures each literal is T or F.! (iii) ensures a literal and its negation are opposites.! (iv) ensures at least one literal in each clause is T. B x 1 x 2 x 3 C i = x 1 V x 2 V x 3 6-node gadget true T F false 31 9 / 12

3-Colorability G φ is 3-colourable φ satisfiable Claim. Graph is 3-colorable iff " is satisfiable. Pf. # Suppose graph is 3-colorable.! Consider assignment that sets all T literals to true.! (ii) ensures each literal is T or F.! (iii) ensures a literal and its negation are opposites.! (iv) ensures at least one literal in each clause is T. B not 3-colorable if all are red x 1 x 2 x 3 C i = x 1 V x 2 V x 3 contradiction true T F false 32 10 / 12

φ satisfiable G φ is 3-colourable 3-Colorability Claim. Graph is 3-colorable iff! is satisfiable. Pf. " Suppose 3-SAT formula! is satisfiable.! Color all true literals T.! Color node below green node F, and node below that B.! Color remaining middle row nodes B.! Color remaining bottom nodes T or F as forced.! B a literal set to true in 3-SAT assignment x 1 x 2 x 3 C i = x 1 V x 2 V x 3 true T F false 33 11 / 12

Brief introduction to Turing machines We are using the classical one tape TM. This is the simplest variant to formalize which will enable the proof for the NP completeness of SAT. In the proof, we are assuming (without loss of generality) that all time bounds T (n) are computable in polynomial time. Claim Any reasonable (classical) computing model algorithm running in time T (n), can be simulated by a TM in time T (n) k for some k. Hence we can use the TM model in the definition of P and NP. Since we are only considering decision problems we will view TMs that are defined for decision problems and hence do not need an output other than a reject and accept state. Following the notation in the MIT lecture notes, formally, a specific TM is a tuple M = (Q, Σ, Γ, δ, q 0, q acc, q rej ) We briefly explain (using the board) the model and notation. Note that Q, Σ, Γ are all finite sets. 12 / 12