Complexity: Some examples
|
|
- Merry Whitehead
- 5 years ago
- Views:
Transcription
1 Algorithms and Architectures III: Distributed Systems H-P Schwefel, Jens M. Pedersen Mm6 Distributed storage and access (jmp) Mm7 Introduction to security aspects (hps) Mm8 Parallel complexity (hps) Mm9 Load Balancing (JMP) Mm10 tbd Page 1 Complexity: Some examples Graph Theory Finding shortest paths between all node pairs in a graph: Floyd Algorithm, time O(N^3), space O(N^2), N= Number of Nodes Find shortest paths from specific node to all destinations: Dijkstra Algorithm, time O(N^2) Search & Optimization Problems: Binary search in ordered set: O(log(N)) Ordering set of N elements: O(N log (N)) Traveling Salesman problem (shortest tour between N cities): Exhaustive Search, time O(N!) Finding an allocation of the N boolean variables x 1,...,x N such that the boolean function f(x 1,...,X N )=true: exhaustive search, time O(2^N) Finding the prime-factors of a large composite n=p*q with p,q=prime Interesting Questions: Can these (and other) problems be solved faster? Are there problems that cannot be computed by an algorithm at all? Is true parallelism in distributed systems helpful? Page 2
2 Content 1. Motivation: Example Algorithms 2. Sequential computation models Register Machines, Turing Machine Church s Thesis Non-determinism 3. Main sequential complexity classes Uncomputable problems P time, NP time, P space, NP space P-time and log-space reductions NP complete problem examples P complete problems examples 4. Parallel Computation Models and Classes PRAM, Circuits, alternating Turing Machine Parallel complexity classes 5. Summary/Exercises Page 3 Computational Models & Computability Finite program (normally represented as string over some alphabet) Finite number of registers Assignments and basic arithmetics: Ri=0, Ri=Rj+Rk, INC/DEC Ri Different types of repetitive instructions Loop Ri While Ri 0 If Ri 0 goto label Recursion Tail recursion/primitive recursion µ-recursion/partial recursion Loop computable functions = Tail-recursive functions While-computable functions = if-goto computable functions = partial recursive functions Page 4
3 Computational Models: Turing Machine Informal Definition Turing Machine = automaton with finite state-set working on an infinite storage organized as read/write tape Operation: read one symbol from the current position on the tape; depending on read symbol and current state determine New state New symbol to be written at the current tape position Movement of current position to right or left For certain states and certain input symbols, the Turing machine may stop operation Turing Machine <Q,Γ,b,X, q 0,F,δ> Finite State-space Q Finite working alphabet Γ Empty symbol b Finite input Alphabet X Γ/{b} Starting state q 0 Q F Q is set of accepting final states Transition function δ: (Q/F) x Γ Γ x {L,R} x Q Page 5 Turing Machines & Computability Turing machines (cntd) Example: Addition of unary numbers Equally power-ful models (with respect to computability) Only one-sided infinite tape Multiple tapes Multiple read/write heads Multiple dimensions Turing computable = if-goto computable (extended on X* = set of sequences over X) Church Thesis: Any algorithmic computable function is Turing computable Page 6
4 Acceptance, decidability; diagonalisation L X* is called Turing acceptable (recursive enumerable), iff there is a TM M that Stops on all inputs v L in an acceptance state q f F For all v L, M may or may not stop, but if it stops, then in a state F L X* is called decidable (recursive), if there is a TM M that Stops on all inputs v X* but only accepts if v L Corollaries: L decidable X*/L decidable L acceptable and X*/L acceptable L decidable Diagonalisation: Let <M> be a binary encoding of the Turing Machine M Hence, all possible TMs can be enumerated w i =<M i > L d := { w i w i L(M i )}, there does not exist any TM that accepts L d Page 7 Non-determinism Non-deterministic Turing Machine M nd =<Q,Γ,b,X, q 0,F,τ> Finite State-space Q Finite working alphabet Γ Empty symbol b Finite input Alphabet X Γ/{b} Starting state q 0 Q F Q is set of accepting final states Transition function τ: (Q/F) x Γ (Γ x {L,R} x Q) Consequence: At each computation step, multiple (but finite) number of choices v X* accepted by M nd iff there exists one computation in the computation tree that accepts v L X* acceptable by a deterministic TM L acceptable by a non-determinstic TM Page 8
5 Content 1. Motivation: Example Algorithms 2. Sequential computation models Register Machines, Turing Machine Church s Thesis Non-determinism 3. Main sequential complexity classes Uncomputable problems P time, NP time, P space, NP space P-time and log-space reductions NP complete problem examples P complete problems examples 4. Parallel Computation Models and Classes PRAM, Circuits, alternating Turing Machine Parallel complexity classes 5. Summary/Exercises Page 9 Un-computable Problems Examples: L NE :={ w i L(M i ) } is Turing acceptable (recursive enumerable) L E :={ w i L(M i ) = } is not Turing decidable (recursive), hence also not Turing acceptable L h :={<M,w> M stops on input w}; L nh :=X*/L h ={<M,w> M does not stop on input w} L h is Turing acceptable but not decidable, L nh is not Turing acceptable It is not decidable whether a context-free grammar creates a regular language It is not decidable whether two context-free grammars have a non-empty intersection Page 10
6 Resources: Time and Space complexity Computational Model: Deterministic Turing Machine M with k one-sided infinite tapes Read-only tape that contains input of length n If for all inputs of length n M uses at most S(n) fields on any of the k tapes M has space complexity S(n) M uses at most T(n) steps M has time complexity T(n) Example: L={wbw R w {0,1}*} (Palindromes) Space complexity S(n)=log2(n) (using a binary counter) Time complexity T(n)=n+1 (while using space (n-1)/2) Page 11 Non-deterministic classes and relations L NSpace(S(n)): Iff there exists a non-deterministic TM that decides membership of L with no computation sequence exceeding S(n) fields on any tape L NTime(T(n)): Iff there exists a non-determinstic TM that decides membership of L with no computation requireing more than T(n) steps Similar Complexity classes for deterministic case: Dspace(S(n)), Ntime(T(n)) Relations (by definition): DTime(T(n)) NTime(T(n)) DTime(f(n)) DSpace(f(n)), NTime(f(n)) NSpace(f(n)) DSpace(S(n)) NSpace(S(n)) Reverse Directions: L DSpace(f(n)) and f(n)>log 2 (n) there exists a c>0 with L DTime(c f(n) ) L NTime(T(n)) there exists a c>0 with L DTime(c T(n) ) Page 12
7 Space compression and linear speed-up Due to freedom of choice of state-space and working alphabet (Notation: x=n or x=d, but consistently replaced within one line) Linear factors in complexity classes L xspace(s(n)) L xspace(c*s(n)), for all c>0 L xtime(t(n)), and lim T T(n)/n= L xtime(c*t(n)) for all c>0 L xtime(c*n) L xtime((1+ε)*n) for all ε>0 Reduction from k-tape TM L xspace(s(n)) for k tapes L xspace(s(n)) for TM with one tape L xtime(t(n)) for k>1 tapes L xtime(t 2 (n)) for single tape TM L xtime(t(n)) for k>2 tapes L xtime(t(n) log T(n)) for TM with 2 tapes Page 13 Polynomial time and space: P, NP, PSpace Time Efficient Problems: Polynomial Time P P := PTime := ² i 1 DTime(n i ) Non-deterministic polynomial Time: NP NP := NPtime := ² i 1 NTime(n i ) Polynomial Space: Pspace PSpace := ² i 1 DSpace(n i ) Relation: DSpace(log n) P NP PSpace And it is known: DSpace(log n) PSpace, hence at least one of the relations is a true subset in the chain above, but it is not known which one(s) Page 14
8 Reductions, hard and complete problems Definition: L < g L, L is reducible to L via the function g iff x L g(x) L For complexity investigations: resource limited reductions Polynomial time reductions < p : g(x) computable in deterministic polynomial time Log-Space reductions < l : g(x) computable using deterministic logarithmic space L is called NP-hard, iff for all L NP, L < p L L is called NP-complete, iff L NP-hard and L NP Examples of NP complete problems: SAT: Do the variables X 1,...,X n in a boolean expression have an allocation such that the expression=true? (Directed) Hamilton Circles: Is there a path in the (directed) graph G that visits each node exactly once before returning to its start? Integer Linear Programming: Is there an integer vector x such that Ax>b? Page 15 Other complete problems L is called PSpace-hard (complete), iff for all L NP, L < p L (and L PSpace) Examples of PSpace complete problems: context-sensitive recognition (csr): Is a certain string w recognized by a context-sensitive grammar G? Csr is in NSpace(n) and DSpace(n 2 ) L is called P-hard (complete), iff for all L NP, L < l L (and L P) Examples of P-complete problems: Emptyness of context-free grammars: Is the language defined by a context-free Grammar G empty? Circuit Value Problem CVP: Is a certain out y {0,1} m the correct result of a Boolean circuit with binary encoding α for binary input x 1,...,x n Examples of Nspace(log n) complete problems [using log-space reductions] Reachability in graphs: Is there a path from node x to y in a directed graph? Page 16
9 Content 1. Motivation: Example Algorithms 2. Sequential computation models Register Machines, Turing Machine Church s Thesis Non-determinism 3. Main sequential complexity classes Uncomputable problems P time, NP time, P space, NP space P-time and log-space reductions NP complete problem examples P complete problems examples 4. Parallel Computation Models and Classes PRAM, Circuits, [alternating Turing Machine] Parallel complexity classes 5. Summary/Exercises Page 17 Parallel Computation the big picture Fundamental Limitation for execution on P processors parallel time best sequential time / number of processors Roughly speaking, we will see in the following: Parallel Time sequential Space Sequential Time parallel Hardware Page 18
10 Parallel Computation Models I: Circuits Uniform Boolean Circuit families Boolean Circuit α = directed acyclic graph, labeled vertices express boolean functions Calculate functions f: {0,1} n {0,1} m Size(α) = number of vertices, Depth(α)=length of longest path Binary encoding of α as string α of length O(size(α) log(size(α)) ) Logarithmic space uniform circuit families α n can be computed from input 1 n by a deterministic TM in space O(log(size(α n ))) Uniform circuit families with binary output define accepted language L: w L f α w (w) = 1 Page 19 Parallel Computation Models II: PRAMs Parallel Random Access Machine (PRAM) Random Access Machine (RAM) Computation Unit with fixed user-defined program Read-only input tape, write-only output tape Unbounded number of memory cells Basic instructions: arithmetic, assignments, control operations (if-goto) Time=number of instructions executed, Space=number of memory cells used PRAM Extensions Unbounded collection of numbered RAM processors: P1,P2,... Each with local memory, synchronized execution of instructions Unbounded collection of shared memory cells (containing input and output): C1,C2,... Instructions for direct and indirect read/write access to shared memory Concurrent Read and concurrent write: CRCW PRAM Concurrent read and exclusive write: CREW PRAM Exclusive read and exclusive write: EREW PRAM Etc. Commands for activating certain number of processors by P0 f:{0,1}* {0,1}* computable in parallel time t(n) and processors p(n), iff there exists PRAM M that on input x outputs f(x) in time t(n) and using p(n) processors Page 20
11 Computation Models: Equivalences f: {0,1}* {0,1}* computable by logarithmic space uniform Boolean circuit family (α n ) with depth log(n) k and polynomial size f can be computed by CREW PRAM M in time log(n) j on polynomial number of processors NC k :=set of all languages L recognized by uniform Boolean circuit family with Polynomial size and depth=o(log(n) k ) NC := ² k 1 NC k Theorem: If any P-complete problem is in NC, then NC=P. However there is strong belief that NC P. If this is true, then P-complete problems are not efficiently parallelizable! s(n) log(n) DSpace(s(n)) CRCW-Time-Proc(s(n), 2 O(s(n)) ) Page 21 Summary 1. Motivation: Example Algorithms 2. Sequential computation models Register Machines, Turing Machine Church s Thesis Non-determinism 3. Main sequential complexity classes Uncomputable problems P time, NP time, P space, NP space P-time and log-space reductions NP complete problem examples P complete problems examples 4. Parallel Computation Models and Classes PRAM, Circuits, [alternating Turing Machine] Parallel complexity classes 5. Summary Page 22
12 References/Acknowledgments Lecture notes: Computability and decidability, WS93/94, Prof. K-J Lange, TU Munich J. Hopcroft, J. Ullman: Introduction to automata theory, languages, and computation. Addison Wesley, Chapters 12 & 13 (Sects , , ) R. Greenlaw, H. J. Hoover, W. Ruzzo: Limits to Parallel Computation P- Completeness Theory. Oxford University Press, Chapters 1-4 Page 23
Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP)
Algorithms and Architectures II H-P Schwefel, Jens M. Pedersen Mm6 Advanced Graph Algorithms (hps) Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9
More informationAdvanced Topics in Theoretical Computer Science
Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica Sofronie-Stokkermans Universität Koblenz-Landau e-mail: sofronie@uni-koblenz.de 1 Contents Recall: Turing
More informationChapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE
Chapter 1 - Time and Space Complexity deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE 1 / 41 Deterministic Turing machines Definition 1.1 A (deterministic
More informationThe space complexity of a standard Turing machine. The space complexity of a nondeterministic Turing machine
298 8. Space Complexity The space complexity of a standard Turing machine M = (Q,,,, q 0, accept, reject) on input w is space M (w) = max{ uav : q 0 w M u q av, q Q, u, a, v * } The space complexity of
More informationParallelism and Machine Models
Parallelism and Machine Models Andrew D Smith University of New Brunswick, Fredericton Faculty of Computer Science Overview Part 1: The Parallel Computation Thesis Part 2: Parallelism of Arithmetic RAMs
More informationCS601 DTIME and DSPACE Lecture 5. Time and Space functions: t,s : N N +
CS61 DTIME and DSPACE Lecture 5 Time and Space functions: t,s : N N + Definition 5.1 A set A U is in DTIME[t(n)] iff there exists a deterministic, multi-tape TM, M, and a constantc, such that, 1. A = L(M)
More informationP vs. NP Classes. Prof. (Dr.) K.R. Chowdhary.
P vs. NP Classes Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Monday 10 th April, 2017 kr chowdhary
More informationTime Complexity. Definition. Let t : n n be a function. NTIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM}
Time Complexity Definition Let t : n n be a function. TIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM} NTIME(t(n)) = {L L is a language decidable by a O(t(n)) non-deterministic
More informationDefinition: Alternating time and space Game Semantics: State of machine determines who
CMPSCI 601: Recall From Last Time Lecture Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins
More informationCSCI 1590 Intro to Computational Complexity
CSCI 59 Intro to Computational Complexity Overview of the Course John E. Savage Brown University January 2, 29 John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29
More informationUndecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65
Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving
More informationCS151 Complexity Theory. Lecture 1 April 3, 2017
CS151 Complexity Theory Lecture 1 April 3, 2017 Complexity Theory Classify problems according to the computational resources required running time storage space parallelism randomness rounds of interaction,
More informationTime Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)
Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it
More informationDefinition: Alternating time and space Game Semantics: State of machine determines who
CMPSCI 601: Recall From Last Time Lecture 3 Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins
More informationLecture 6: Oracle TMs, Diagonalization Limits, Space Complexity
CSE 531: Computational Complexity I Winter 2016 Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity January 22, 2016 Lecturer: Paul Beame Scribe: Paul Beame Diagonalization enabled us to separate
More informationPart I: Definitions and Properties
Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States
More informationComputability and Complexity Theory
Discrete Math for Bioinformatics WS 09/10:, by A Bockmayr/K Reinert, January 27, 2010, 18:39 9001 Computability and Complexity Theory Computability and complexity Computability theory What problems can
More informationIntroduction to Computational Complexity
Introduction to Computational Complexity A 10-lectures Graduate Course Martin Stigge, martin.stigge@it.uu.se Uppsala University, Sweden 13.7. - 17.7.2009 Martin Stigge (Uppsala University, SE) Computational
More informationLecture 25: Cook s Theorem (1997) Steven Skiena. skiena
Lecture 25: Cook s Theorem (1997) Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Prove that Hamiltonian Path is NP
More informationComplexity Theory of Polynomial-Time Problems
Complexity Theory of Polynomial-Time Problems Lecture 1: Introduction, Easy Examples Karl Bringmann and Sebastian Krinninger Audience no formal requirements, but: NP-hardness, satisfiability problem, how
More informationCS20a: Turing Machines (Oct 29, 2002)
CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Handicapped machines DFA limitations Tape head moves only one direction 2-way DFA
More informationSpace Complexity. Master Informatique. Université Paris 5 René Descartes. Master Info. Complexity Space 1/26
Space Complexity Master Informatique Université Paris 5 René Descartes 2016 Master Info. Complexity Space 1/26 Outline Basics on Space Complexity Main Space Complexity Classes Deterministic and Non-Deterministic
More informationResource-Bounded Computation
Resource-Bounded Computation Previously: can something be done? Now: how efficiently can it be done? Goal: conserve computational resources: Time, space, other resources? Def: L is decidable within time
More informationLecture 21: Space Complexity (The Final Exam Frontier?)
6.045 Lecture 21: Space Complexity (The Final Exam Frontier?) 1 conp NP MIN-FORMULA conp P NP FIRST-SAT TAUT P FACTORING SAT NP NP NP 2 VOTE VOTE VOTE For your favorite course on automata and complexity
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8 Definition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a
More informationTheory of Computation Lecture Notes. Problems and Algorithms. Class Information
Theory of Computation Lecture Notes Prof. Yuh-Dauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. Yuh-Dauh
More informationCould we potentially place A in a smaller complexity class if we consider other computational models?
Introduction to Complexity Theory Big O Notation Review Linear function: r(n) =O(n). Polynomial function: r(n) =2 O(1) Exponential function: r(n) =2 no(1) Logarithmic function: r(n) = O(log n) Poly-log
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda P and NP (7.2, 7.3) Next class: Review Reminders and announcements: CAPE & TA evals are open: Please
More informationMTAT Complexity Theory October 13th-14th, Lecture 6
MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when
More informationCSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits
CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits Chris Calabro January 13, 2016 1 RAM model There are many possible, roughly equivalent RAM models. Below we will define one in the fashion
More informationComplexity Theory 112. Space Complexity
Complexity Theory 112 Space Complexity We ve already seen the definition SPACE(f(n)): the languages accepted by a machine which uses O(f(n)) tape cells on inputs of length n. Counting only work space NSPACE(f(n))
More informationSpace Complexity. The space complexity of a program is how much memory it uses.
Space Complexity The space complexity of a program is how much memory it uses. Measuring Space When we compute the space used by a TM, we do not count the input (think of input as readonly). We say that
More informationCP405 Theory of Computation
CP405 Theory of Computation BB(3) q 0 q 1 q 2 0 q 1 1R q 2 0R q 2 1L 1 H1R q 1 1R q 0 1L Growing Fast BB(3) = 6 BB(4) = 13 BB(5) = 4098 BB(6) = 3.515 x 10 18267 (known) (known) (possible) (possible) Language:
More informationOutline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018
Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 3. Logarithmic Space Reinhard Pichler Institute of Logic and Computation DBAI Group TU Wien 3. Logarithmic Space 3.1 Computational
More informationECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017
ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness Prof. Peter Bermel January 11, 2017 Outline Overview Definitions Computing Machines Church-Turing Thesis Polynomial Time (Class P)
More informationComputability and Complexity
Computability and Complexity Lecture 10 More examples of problems in P Closure properties of the class P The class NP given by Jiri Srba Lecture 10 Computability and Complexity 1/12 Example: Relatively
More informationTheory of Computation
Theory of Computation Unit 4-6: Turing Machines and Computability Decidability and Encoding Turing Machines Complexity and NP Completeness Syedur Rahman syedurrahman@gmail.com Turing Machines Q The set
More informationPeter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages
and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability
More informationComplexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes
Complexity Theory 1 Complexity Theory 2 Complexity Theory Lecture 3 Complexity For any function f : IN IN, we say that a language L is in TIME(f(n)) if there is a machine M = (Q, Σ, s, δ), such that: L
More informationFinish K-Complexity, Start Time Complexity
6.045 Finish K-Complexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts
More informationFinal exam study sheet for CS3719 Turing machines and decidability.
Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,
More informationPolynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates.
1 2 Topics in Logic and Complexity Handout 2 Anuj Dawar MPhil Advanced Computer Science, Lent 2010 Polynomial Time Computation P = TIME(n k ) k=1 The class of languages decidable in polynomial time. The
More informationTheory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death
Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Robbie Hott www.cs.virginia.edu/~jh2jf Department of Computer Science University of Virginia
More informationIntroduction to Complexity Theory
Introduction to Complexity Theory Read K & S Chapter 6. Most computational problems you will face your life are solvable (decidable). We have yet to address whether a problem is easy or hard. Complexity
More informationCS154, Lecture 17: conp, Oracles again, Space Complexity
CS154, Lecture 17: conp, Oracles again, Space Complexity Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string
More informationCS154, Lecture 13: P vs NP
CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of
More information13.1 Nondeterministic Polynomial Time
CS125 Lecture 13 Fall 2016 13.1 Nondeterministic Polynomial Time Now we turn to incorporating nondeterminism in universal models of computation, namely Turing Machines and Word-RAMs. For Nondeterministic
More informationLecture 3: Nondeterminism, NP, and NP-completeness
CSE 531: Computational Complexity I Winter 2016 Lecture 3: Nondeterminism, NP, and NP-completeness January 13, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 Nondeterminism and NP Recall the definition
More informationComputability and Complexity CISC462, Fall 2018, Space complexity 1
Computability and Complexity CISC462, Fall 2018, Space complexity 1 SPACE COMPLEXITY This material is covered in Chapter 8 of the textbook. For simplicity, we define the space used by a Turing machine
More informationReview of Basic Computational Complexity
Lecture 1 Review of Basic Computational Complexity March 30, 2004 Lecturer: Paul Beame Notes: Daniel Lowd 1.1 Preliminaries 1.1.1 Texts There is no one textbook that covers everything in this course. Some
More informationTime Complexity. CS60001: Foundations of Computing Science
Time Complexity CS60001: Foundations of Computing Science Professor, Dept. of Computer Sc. & Engg., Measuring Complexity Definition Let M be a deterministic Turing machine that halts on all inputs. The
More informationComputability THEORY OF COMPUTATION
11/27/14 9-1 Computability 1 Computability THEORY OF COMPUTATION Formal Languages, Automata, and Complexity J. Glenn Brokshear The Benjamin/Cummings Pub. Comp., Inc. 1989 1.1 Foundation of Recursive Function
More informationHarvard CS 121 and CSCI E-121 Lecture 20: Polynomial Time
Harvard CS 121 and CSCI E-121 Lecture 20: Polynomial Time Harry Lewis November 12, 20123 Review of Asymptotic Notation For f, g : N R + f = O(g): c > 0 s.t. f(n) c g(n) for all sufficiently large n. f
More informationThe Cook-Levin Theorem
An Exposition Sandip Sinha Anamay Chaturvedi Indian Institute of Science, Bangalore 14th November 14 Introduction Deciding a Language Let L {0, 1} be a language, and let M be a Turing machine. We say M
More information1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions
CS 6743 Lecture 15 1 Fall 2007 1 Circuit Complexity 1.1 Definitions A Boolean circuit C on n inputs x 1,..., x n is a directed acyclic graph (DAG) with n nodes of in-degree 0 (the inputs x 1,..., x n ),
More informationArtificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK
Artificial Intelligence 3 Problem Complexity Prof. Dr. Jana Koehler Fall 2016 Agenda Computability and Turing Machines Tractable and Intractable Problems P vs. NP Decision Problems Optimization problems
More informationNP-completeness. Chapter 34. Sergey Bereg
NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems
More informationCS154, Lecture 13: P vs NP
CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of
More informationLecture 1: Course Overview and Turing machine complexity
CSE 531: Computational Complexity I Winter 2016 Lecture 1: Course Overview and Turing machine complexity January 6, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 Course Outline 1. Basic properties of
More informationComputability and Complexity
Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition
More informationQ = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar
IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write
More informationComparison of several polynomial and exponential time complexity functions. Size n
Comparison of several polynomial and exponential time complexity functions Time complexity function n n 2 n 3 n 5 2 n 3 n Size n 10 20 30 40 50 60.00001.00002.00003.00004.00005.00006 second second second
More informationLecture 16: Time Complexity and P vs NP
6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language
More informationChapter 7: Time Complexity
Chapter 7: Time Complexity 1 Time complexity Let M be a deterministic Turing machine that halts on all inputs. The running time or time complexity of M is the function f: N N, where f(n) is the maximum
More informationCOMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages
COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed
More informationLecture 9: PSPACE. PSPACE = DSPACE[n O(1) ] = NSPACE[n O(1) ] = ATIME[n O(1) ]
Lecture 9: PSPACE PSPACE = DSPACE[n O(1) ] = NSPACE[n O(1) ] = ATIME[n O(1) ] PSPACE consists of what we could compute with a feasible amount of hardware, but with no time limit. PSPACE is a large and
More informationAn example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM
Turing Machines Review An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Varieties of TMs Multi-Tape TMs Nondeterministic TMs String Enumerators
More informationMore Complexity. Klaus Sutner Carnegie Mellon University. Fall 2017
More Complexity Klaus Sutner Carnegie Mellon University Fall 2017 1 Below NP Parallelism Above NP Where Are We? 3 We have a somewhat elaborate zoo of low complexity classes. For the flagship P and NP,
More informationChap. 4 Computability
THEORY OF COMPUTATION Formal Languages, Automata, and Complexity Chap. 4 Computability J. Glenn Brokshear The Benjamin/Cummings Pub. Comp., Inc. 1989 1 4.1 Foundation of Recursive Function Theory computation
More informationModels of Computation
Models of Computation Analysis of Algorithms Week 1, Lecture 2 Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Models of Computation (RAM) a) Random Access Machines
More informationR ij = 2. Using all of these facts together, you can solve problem number 9.
Help for Homework Problem #9 Let G(V,E) be any undirected graph We want to calculate the travel time across the graph. Think of each edge as one resistor of 1 Ohm. Say we have two nodes: i and j Let the
More informationThe Polynomial Hierarchy
The Polynomial Hierarchy Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Motivation..synthesizing circuits is exceedingly difficulty. It is even
More informationTuring Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA
Turing Machines A Turing machine is similar to a finite automaton with supply of unlimited memory. A Turing machine can do everything that any computing device can do. There exist problems that even a
More informationSpace Complexity. then the space required by M on input x is. w i u i. F ) on. September 27, i=1
Space Complexity Consider a k-string TM M with input x. Assume non- is never written over by. a The purpose is not to artificially reduce the space needs (see below). If M halts in configuration (H, w
More informationSYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES
Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,
More informationRecap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.
Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite
More informationTuring Machine Recap
Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every
More informationUnit 1A: Computational Complexity
Unit 1A: Computational Complexity Course contents: Computational complexity NP-completeness Algorithmic Paradigms Readings Chapters 3, 4, and 5 Unit 1A 1 O: Upper Bounding Function Def: f(n)= O(g(n)) if
More informationsatisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs
Any Expression φ Can Be Converted into CNFs and DNFs φ = x j : This is trivially true. φ = φ 1 and a CNF is sought: Turn φ 1 into a DNF and apply de Morgan s laws to make a CNF for φ. φ = φ 1 and a DNF
More informationNotes for Lecture 3... x 4
Stanford University CS254: Computational Complexity Notes 3 Luca Trevisan January 14, 2014 Notes for Lecture 3 In this lecture we introduce the computational model of boolean circuits and prove that polynomial
More informationLecture 22: PSPACE
6.045 Lecture 22: PSPACE 1 VOTE VOTE VOTE For your favorite course on automata and complexity Please complete the online subject evaluation for 6.045 2 Final Exam Information Who: You On What: Everything
More informationChapter 2 Algorithms and Computation
Chapter 2 Algorithms and Computation In this chapter, we first discuss the principles of algorithm and computation in general framework, common both in classical and quantum computers, then we go to the
More informationIntroduction: Computer Science is a cluster of related scientific and engineering disciplines concerned with the study and application of computations. These disciplines range from the pure and basic scientific
More informationUmans Complexity Theory Lectures
Complexity Theory Umans Complexity Theory Lectures Lecture 1a: Problems and Languages Classify problems according to the computational resources required running time storage space parallelism randomness
More informationComplete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in
Oracle Turing Machines Nondeterministic OTM defined in the same way (transition relation, rather than function) oracle is like a subroutine, or function in your favorite PL but each call counts as single
More informationComputational Complexity III: Limits of Computation
: Limits of Computation School of Informatics Thessaloniki Seminar on Theoretical Computer Science and Discrete Mathematics Aristotle University of Thessaloniki Context 1 2 3 Computability vs Complexity
More informationAn example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM
Turing Machines Review An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Varieties of TMs Multi-Tape TMs Nondeterministic TMs String Enumerators
More informationExam Computability and Complexity
Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three
More informationINAPPROX APPROX PTAS. FPTAS Knapsack P
CMPSCI 61: Recall From Last Time Lecture 22 Clique TSP INAPPROX exists P approx alg for no ε < 1 VertexCover MAX SAT APPROX TSP some but not all ε< 1 PTAS all ε < 1 ETSP FPTAS Knapsack P poly in n, 1/ε
More informationconp, Oracles, Space Complexity
conp, Oracles, Space Complexity 1 What s next? A few possibilities CS161 Design and Analysis of Algorithms CS254 Complexity Theory (next year) CS354 Topics in Circuit Complexity For your favorite course
More informationIntroduction to Computers & Programming
16.070 Introduction to Computers & Programming Theory of computation: What is a computer? FSM, Automata Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Models of Computation What is a computer? If you
More informationComputational Models Lecture 11, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 11, Spring 2009 Deterministic Time Classes NonDeterministic Time Classes
More informationwhere Q is a finite set of states
Space Complexity So far most of our theoretical investigation on the performances of the various algorithms considered has focused on time. Another important dynamic complexity measure that can be associated
More information1 Showing Recognizability
CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove
More informationComplexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler
Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard
More informationOutline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.
Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität
More informationBBM402-Lecture 11: The Class NP
BBM402-Lecture 11: The Class NP Lecturer: Lale Özkahya Resources for the presentation: http://ocw.mit.edu/courses/electrical-engineering-andcomputer-science/6-045j-automata-computability-andcomplexity-spring-2011/syllabus/
More informationTuring Machines Part III
Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's
More informationTheory of Computation Lecture 1. Dr. Nahla Belal
Theory of Computation Lecture 1 Dr. Nahla Belal Book The primary textbook is: Introduction to the Theory of Computation by Michael Sipser. Grading 10%: Weekly Homework. 30%: Two quizzes and one exam. 20%:
More informationCSE200: Computability and complexity Space Complexity
CSE200: Computability and complexity Space Complexity Shachar Lovett January 29, 2018 1 Space complexity We would like to discuss languages that may be determined in sub-linear space. Lets first recall
More information