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.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Complexity Classes: P and NP
NP-Hard Nattee Niparnan.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Lecture 24 MAS 714 Hartmut Klauck
Programming Languages Wrap-up. Your Toolkit Object-oriented Imperative Functional Logic.
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 
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
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.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Chapter 11: Limitations of Algorithmic Power
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Turing Machines CS 105: Introduction to Computer Science.
1 CSCI 2400 section 3 Models of Computation Instructor: Costas Busch.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
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 Computing Lecture 15 MAS 714 Hartmut Klauck.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
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.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
P Vs NP Turing Machine. Definitions - Turing Machine Turing Machine M has a tape of squares Each Square is capable of storing a symbol from set Γ (including.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
CS 203: Introduction to Formal Languages and Automata
LIMITATIONS OF ALGORITHM POWER
NP-Completness Turing Machine. Hard problems There are many many important problems for which no polynomial algorithms is known. We show that a polynomial-time.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 0 Introduction Some slides are in courtesy of Prof.
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.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
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.
Computability. Turing Machines Read input letter & tape letter, write tape letter, move left or right.
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Chapter 10 NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
Part VI NP-Hardness.
Jaya Krishna, M.Tech, Assistant Professor
Turing Machines Acceptors; Enumerators
ICS 353: Design and Analysis of Algorithms
Decidable Languages Costas Busch - LSU.
Presentation transcript:

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 is synonymous with string s = AATGCA Length, |s| = 6, s[1] = A Empty string

Strings Substring t is a string from consecutive characters of the parent s sSuperstring s is parents string of substring t s[i,j] indicates characters from string s between indices i and j. Concatenation of two strings is st prefix and suffix

Graphs A graph consists of two sets V: the set of nodes or vertices E: the set of edges (pair of vertices) G=(V,E) Simple graph: No loops Directed Graphs: Directed Edges valence (in and out degree of vertex) Weighted Graphs

Connectedness Cycles: No edge repeated and return to start Acyclic: no cycles Complete: Every possible edge Bipartite: Separated into two disjoint subsets Tree: acyclic and connected graph (root, leaves) Interval Graphs: Collection of intervals of real line with edge if intersection nonempty

Graph Problems Hamiltonian: Cycle with every vertex on it Eulerian: Every edge in cycle but only once Coloring: Minimum number of colors so that no two adjacent vertices have same color Matching: Subset of edges such that no two edges in M share an endpoint Adjacency Matrix

Finite Automata A Finite Collection of States Q A finite alphabet E of input signals A function d which for every possible combination of current state and input determines a new state. Two special states, Initial and Final or Accepting state.

The FA accepts any sequence of symbols that puts it in an accepting state The set of all such sequences is the language of the automaton Input Reset Accept

State Transition Diagram ??? ? ? ?

Regular Expressions 01(001)*01 Language accepted by a FA Pumping Lemma: If L is a regular language, then there is a constant n such that for each word W in L with length >= n, there are words X, Y, Z such that W=XYZ, length of XY =1, and XY k Z is in L for k integer.

Used to tell when a language is not in a particular class Let L be language of all palindromes over [a,b]. Abbababba (symmetric about midpoint) Is L regular? W = a n ba n (definition of palindrome) W=XYZ, XY = a n, Z=ba n W=XY 2 Z=a m ba n in L by pumping lemma, m>n W not in L, not a palindrome, L not regular

Chomsky Hierarchy

Turing Machine StartReset Read/Write

Turing machine M x is a string over M’s alphabet E R/W head over leftmost symbol in x, M in start state R/W communicates symbol on tape to control mechnisim in box M can read symbol, replace symbol, move tape to right or left one cell at a time If M halts (final state), string y on the tape is M’s output corresponding to input x Doesn’t necessarily halt for every x Computes partial function f: E*---->E* M is same thing as its program, which is a set of quintuples (q, s, q’, s’, d) where q is current state, s is current symbol, q’ is next state, s’ is symbol to be written, and d is direction to move M’s compute a particular class of functions over intergers called partial recursive functions

Church-Turing Thesis All notions of effective computability are equivalent. Therefore, all computers are created equal. Other schemes: Lambda calculus, General Recursive Functions, etc...

Universal Turing Machine Fixed Program in Finite Control Program reads description of Turing Machine from one tape and simulates its behavior on another tape (two tapes) Universal Machine U, Machine to be simulate T

Fixed program for U is like an interpreter Tape 1 contains quintuples defining T Tape 2 intially blank. Same output as T here Given T’s current state and input symbol, find the quintuple (q, s, q’, s’, d) in the description of T that applies Record the new state q’, write the new symbol s’ on tape 2, move in direction d, read new symbol on tape 2, and record it beside q’

Halting Problem What is not effectively computable? It the a TM, M, that does the following: Given an arbitrary TM, T, as input, and an equally arbitrary tape, t, decide whether T halts on t Equivalent to does T accept t Undecidable

Diagonalization

Diagonal Set: _ X X _ X _ Its Complement: X _ _ X _ X The complement of the diagonal is different for every row. Can be extended to infinite sets. Used to show that there are languages that are not acceptable by TM. Therefore, there can be no TM that decides that decides whether arbitrary strings are accepted by arbitrary Turing Machines. Since we can represent TM by strings, after some work, it follows that there can be no TM that decides halting problems. Therefore, there are problems that admit no algorithmic solution.

Complexity Classes P: efficient algorithms NP: no efficient algorithms found Check solution in polynomial time Transform any NP (P is subset) to NP- complete in polynomial time P = NP ???

Satisfiability (SAT) Boolean Expression: (x 1 +~x 3 +x 4 )(~x 1 +~x 2 +~x 4 )(~x 2 +x 3 )(~x 1 +x 2 +x 4 ) What combination of variable values (0,1) makes statement true or false (1,0) 2 n combinations Decision problem: Is formula satisfiable?

NP-complete NP: Nondeterministic Polynomial Time 1970, Cook found way to transform every problem in NP to a single, complete problem (satisfiability). Transform in polynomial time Instance of one problem has solution if and only if instance of other problem does Solve any instance of any problem equivalent to solving some instance of SAT

NP-Complete P and NP are decision problems (answer yes or no) Optimization problems (minimize or maximize an objective function) NP-hard As least as hard as NP-complete decision problem

What to do? Solve efficiently or prove NP-complete –X In NP? Check solution in polynomial time –Known NP-complete Y to X: Solve X in P then solve Y in P Solve on specific, easier instances Exhaustive search Approximate in polynomial time Heuristics Quantum Computer