Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.

Slides:



Advertisements
Similar presentations
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
Advertisements

1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
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 
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computational problems, algorithms, runtime, hardness
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
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.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
Time Complexity.
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
Chapter 11: Limitations of Algorithmic Power
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
Physical Mapping II + Perl CIS 667 March 2, 2004.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Hardness Results for Problems
1 Physical Mapping --An Algorithm and An Approximation for Hybridization Mapping Shi Chen CSE497 04Mar2004.
1.1 Chapter 1: Introduction What is the course all about? Problems, instances and algorithms Running time v.s. computational complexity General description.
1 1.1 © 2012 Pearson Education, Inc. Linear Equations in Linear Algebra SYSTEMS OF LINEAR EQUATIONS.
Physical Mapping of DNA Shanna Terry March 2, 2004.
MCS312: NP-completeness and Approximation Algorithms
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.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
Physical Mapping of DNA BIO/CS 471 – Algorithms for Bioinformatics.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
CSC 413/513: Intro to Algorithms NP Completeness.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
LIMITATIONS OF ALGORITHM POWER
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
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.
David Luebke 1 2/18/2016 CS 332: Algorithms NP Completeness Continued: Reductions.
CSC 413/513: Intro to Algorithms
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.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
An Algorithm for the Consecutive Ones Property Claudio Eccher.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
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.
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.
Construction We constructed the following graph: This graph has several nice properties: Diameter Two Graph Pebbling Tim Lewis 1, Dan Simpson 1, Sam Taggart.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
P & NP.
NP-Completeness Yin Tat Lee
NP-Complete Problems.
Complexity Theory: Foundations
Presentation transcript:

Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004

Computational Complexity - An Overview We are primarily interested in efficient algorithms  Efficient means that the running time of the algorithm is bounded by some polynomial function p(n)  The size of the problem is measured by n  We use big-oh notation, e.g. O(n 2 ), in which lower order terms are ignored  Thus for small problem sizes, an O(n 2 ) algorithm may run slower than an O(n) one

Computational Complexity - An Overview This means that we are talking about asymptotic behavior An inefficient algorithm is one whose asymptotic efficiency is exponential - e.g. O(2 n ) Problems for which efficient algorithms exist belong to a class P Problems for which no efficient algorithms are known to exist belong to class NP

NP-complete Problems An important subset of these problems is called NP-complete  The solutions to problems in NP, once found, can be checked in polynomial time  NP includes the class P as a subset  Any NP-complete problem can be transformed in polynomial time to an instance of any other NP- complete problem  So all NP-complete problems are equivalent under polynomial transformation

NP-complete Problems So, if a polynomial time algorithm is found for one NP-complete problem, there are polynomial time algorithms for all NP- complete problems  If so, then P=NP  Most researchers believe that P  NP  The model of computation that is used in defining NP-complete problems is the Nondeterministic Turing Machine

NP-hard Problems Classes P and NP include only decision problems - the answer is yes or no An NP-hard problem is one which is at least as hard as NP-complete problems  If an NP-hard problem can be solved in polynomial time, then so can all NP-complete problems  NP-hard problem is not necessarily a decision problem

NP-hard Problems NP-complete  NP-hard Example: does there exist a solution to the Traveling Salesman problem is NP-hard and NP-complete.  Find a solution to the Traveling Salesman is NP-hard, but not NP-complete (not decision form)  But if we have a polynomial solution for the 2nd, we can use it to solve the 1st (and hence all NP-complete problems)

NP-completeness Initially, several hard problems were shown to solvable in polynomial time on a nondeterministic TM  Polynomial time reductions between the problems were also shown  Nowadays, to show a problem is NP-complete  Verify the problem is in NP (solution can be verified in polynomial time)  Show a polynomial time reduction of any NP-complete to your problem

NP-completeness So when faced with an NP-complete or NP-hard problem - what to do?  See if a meaningful restriction of the problem can be solved in polynomial time  See if the size of the problem in practice is always small  Devise a polynomial time approximation algorithm - guaranteed to find a near optimal solution  Devise heuristics

Algorithmic Implications We are trying to solve a real-life problem  The models we use may give us many solutions, but we want to find the one solution which corresponds to the real ordering of the clones in the target DNA  Use the algorithmic results in an iterative fashion with the experimental biologist

Algorithmic Implications A mapping algorithm should  Work better with more data, assuming a constant error rate  Give a solution which makes it clear how it was obtained and tell which parts of the solution are good and which bad  Give all candidate solutions

An algorithm for C1P This algorithm determines whether an n  m matrix has the C1P for rows  Assume  All rows different  No row is all zero  Let S i be the set of columns of row i with value 1 then i and j we can have  S i  S j = .  S i  S j or S j  S i  S i  S j   and neither of them is a subset of the other

An algorithm for C1P In the first case, we don’t need to consider the two rows together, so we separate them into two components  Deal with them separately For non-empty intersection  Suppose there is a row that is either a subset or has empty intersection with every row in the component - move it out of the component

An algorithm for C1P To see if two rows belong to the same component  Build a graph G c using M  Each vertex of G c will be a row from M There will be an undirected edge from i to j if S i  S j   and neither of them is a subset of the other  So the components we want are the connected components of G c

Basic Algorithm The algorithm will have the following phases  Separate rows into components according to above rules  Permute the columns of each component to achieve C1P for component  Join components together

Example Matrix c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c8c8 c9c9 l1l l2l l3l l4l l5l l6l l7l l8l

Example Graph l1l1 l2l2 l3l3 l5l5 l4l4 l7l7 l6l6 l8l8    

Placing Rows in a Component c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c8c8 l1l l2l l3l How can the first row (by itself) be arranged? (Keep track of all possibilities) l 1  … … {2, 7, 8} {2, 7, 8} {2, 7, 8} Now add the second row - it can go to right or left of first l 1  … … l 2  … … {5} {2, 7} {2, 7} {8}

Placing Rows in a Component How do we place the third row?  In the graph, there are edges for both rows already placed. Let’s place the third with respect to the second  Does it go to the right or to the left?  If |l 1  l 3 |<min(|l 1  l 2 |, |l 2  l 3 |) - same direction second w.r.t. first, else opposite direction  In our case, we have to place in the opposite (right direction) as shown on the next slide

Placing Rows in a Component l 1  … … l 2  … … {5} {2} {7} {8} {1, 4} {1, 4} l 3  … …

Placing Rows in a Component All of the other rows in the component are placed in the same way, using two previously place rows:  One which has an edge to the row to be placed in the graph  Second has an edge to the previous row in the graph

Joining Components Together For the next part of the solution, we use a graph G M which tells us how the components fit together  Each component of the original matrix will be a vertex in G M  A directed edge is added between  and  if the sets S i for all i in  are contained in at least one set S j of component 

Example Graph    

Joining Components Together We process components not contained in any other component first  So process the components in the topological order of the graph We may come up with multiple solutions if one or more columns is not constrained to one value The algorithm is polynomial