Themes of Presentations Rule-based systems/expert systems (Catie) Software Engineering (Khansiri) Fuzzy Logic (Mark) Configuration Systems (Sudhan) *

Slides:



Advertisements
Similar presentations
Lecture 21 NP-complete problems
Advertisements

The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
CSCE350 Algorithms and Data Structure
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”
LIMITATIONS OF ALGORITHM POWER
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
P, NP, and NP-Complete Problems Section 10.3 The class P consists of all problems that can be solved in polynomial time, O(N k ), by deterministic computers.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness A problem is NP-complete if: It is in NP
The NP class. NP-completeness
Chapter 10 NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Hard Problems Introduction to NP
ICS 353: Design and Analysis of Algorithms
NP-Completeness Proofs
Computational Complexity
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
CSE 589 Applied Algorithms Spring 1999
RAIK 283 Data Structures & Algorithms
Presentation transcript:

Themes of Presentations Rule-based systems/expert systems (Catie) Software Engineering (Khansiri) Fuzzy Logic (Mark) Configuration Systems (Sudhan) * Tutoring and Help Systems (Nicolas) Design (Liam) * Help-Desk Systems (Denis) * Experience/case Maintenance (Fabiana) Markov Decision Processes (Megan) Reinforcement learning (Megan) e-commerce (Joe) * Recommender systems (Chad) * Conversational case-based reasoning (Shruti) * Semantic web and CBR (Steve)

Computational Complexity CSE 335/435

Why Studying Computational Complexity in IDSS? We will observe that some techniques seem ideal to provide decision support We will formulate those techniques as computational problems Many of these problems will turn out to be intractable (NP-complete or worse) Thus, we will study relaxations that approximate solutions. These relaxations are in P.

A Quick Overview of Computational Complexity What does the notation O(f) indicates When do we say that a program has polynomial complexity What does it mean that a problem is P?, in NP? What does it mean that a problem is NP-complete?

Definition O(g) = { f : lim n   f(n)/g(n) is a real number} For example: what functions are in O(x 3 )?  x 3  x 3 + 2X + 3  x 2 log x  7  6x  … Functions not in O(x 3 )?  x 4  x X + 3  x 3 log x  7 x  …

Complexity: O-notation Search (e: element, A[]: array) i  1 While (A [i]  e and i < N+1) i  i +1 Return i Worst case: k(N+1), where k = time for making the comparison A [i]  e This algorithm’s complexity is lineal (i.e., O(N))

P all the other sorts: Comparison of Problems / Solutions by Their Complexity Simple instruction O(1) Binary search ordered array Search in complete Binary Search Trees O(log N) Search in unordered arrayO(N ) HeapsortQuicksort Shortest pathMST O(N log N ) O(N 2 ) All the other sorts

Deterministic Computation (Informal) Key questions: if a computer is confronted with a certain state of the computation where a choice must be made, 1. are all the alternatives transitions known?, and 2. given some input data, is it known which transition the machine will make? If the answer to both of these questions is “yes”, the computation is said to be deterministic “current state” Input data “transition” “new state”

Nondeterministic Computation If the answer to any of these questions is “no”, the computation is said to be nondeterministic That is, either some transitions are unknown, or given some input data, the machine can make more than one transition

P versus NP P is the class of problems that can be solved in O(N k ), where k is some constant by a deterministic computer NP is the class of problems that can be solved in O(N k ), where k is some constant by a nondeterministic computer DeterministicSearch (e: element, A[]: array) i  1 While (A [i]  e and i < N+1) i  i +1 Return i Non-determinisitcSearch(e: element, A[]: Array) i  Oracle(e, A) return i O(N) O(1)

NP Complexity (I) How to proof that a problem prob is in NP: 1. Show that prob is in P, or 2. Write a program solving prob using the oracle that runs in polynomial time, or 3. Write 2 polynomial programs that: (1) generate a possible solution S and (2) tests if S is a solution to prob Most books Homework: why 1 implies 2 and why 3 implies 2?

NP Complexity (II) The class NP consists of all problems that can be solved in polynomial time by nondeterministic computers NP Include all problems in P The key question is are there problems in NP that are not in P or is P = NP? We don’t know the answer to the previous question But there are a particular kind of problems, the NP-complete problems, for which all known deterministic algorithms have an exponential complexity

NP Some Problems Seem Too Hard (NP-Complete) P TSP Vertex Cover SAT Circuit-SAT

NP-Complete A problem prob is NP-complete if: prob is in NP Every other problem nprob in NP can be reduced in polynomial time into prob. Reduction: prob nprob Polynomial transformation solution

Conjunctive Normal Form A conjunctive normal form (CNF) is a Boolean expression consisting of one or more disjunctive formulas connected by an AND symbol (  ). A disjunctive formula is a collection of one or more (positive and negative) literals connected by an OR symbol (  ). Example: (a)  (¬ a  ¬b  c  d)  (¬c  ¬d)  (¬d) Problem (CNF-problem): Given a CNF form obtain Boolean assignments that make form true Example (above): a  true, b  false, c  true, d  false

Decision problem Cook Theorem (1971):The CNF-SAT is NP-complete `Decision problem: problem with YES/NO answer Decision problems can be easier than the standard variant But for proving NP-completeness they facilitate the proofs Problem (CNF-SAT): Given a CNF form, is there an assignment of the variables that makes the formula true? Problem (CNF-problem): Given a CNF form obtain Boolean assignments that make form true Homework: Proof that CNF-SAT is in NP (use definition 3 of Slide 11)

Illustration of NP-Completeness of CNF-SAT We will show that the problem of determining if an element e is contained in an array A can be reduced to CNF-sat Solution: The following CNF formula is true if and only if e is in A: (A[1] = e  A[2] = e  …  A[n] = e) Traversing A to obtain this formula can be done in O(N)

(Vague) Idea of The Proof (I) Computer Memory Program … …. Program … …. State1: S1State2: S2 S1 S2 A computation: S1, S2, S3, …, Sm

(Vague) Idea of The Proof (II) Computer Memory Program … …. Program … …. State j SjSj SjSj S j can be represented as a logic formula F j The computation can be represented S1, S2, S3, …, Sm as (F1  F2  …  Fm), which is transformed into a CNF

How to proof that A Problem is NP- Complete We want to proof that prob is NP complete. This is done in two steps: 1.Show that prob is in NP 2. Show that a known NP-complete (e.g., CNF-sat) problem can be reduced (polynomial) into prob nprob Polynomial transformation solution CNF- sat prob Polynomial transformation solution

Circuit-sat (I) A Boolean combinatorial circuit consists of one or more Boolean components connected by wires such that there is one connected component (i.e., there are no separate parts) and the circuit has only one output. Boolean components: x y x  y x y x  y x ¬x¬x

Circuit-sat (II) Circuit-problem: Given a Boolean combinatorial circuit, find a Boolean assignment of the circuit’s input such that the output is true x y z Circuit-SAT: Given a Boolean combinatorial circuit, is there a Boolean assignment of the circuit’s input such that the output is true

Homework 1. Obtain an algorithm (pseudo-code) solving the Circuit-SAT 2. Explain why your solution is not polynomial 3. Prove that Circuit-Sat is NP complete: a)Show that Circuit-SAT is in NP b)Prove that CNF-SAT can be reduced into Circuit-SAT: (a)  (¬a  ¬b  c  d)  (¬c  ¬d)  (¬d) Show a circuit representing the above formula Describe an algorithm for this transformation Explain why this algorithm is in P