Turing & the Uncomputable; Intro to Time Complexity
|
|
- Dayna Short
- 5 years ago
- Views:
Transcription
1 5-25: Great Ideas in Theoretical Computer Science Spring 209 Lecture 6 February 5, 209 Turing & the Uncomputable; Intro to Time Complexity Uncountable to uncomputable The real number /7 is computable. You could write a (non-halting) program (in your favorite language) which printed out all its digits: The same is true of 2, π, e, the first prime larger than 2 43,2,609, etc.; indeed, any real number you can think of. 2 Uncountable to uncomputable However, the set of all programs (in your favorite language) is just Σ *, for some finite alphabet Σ. Hence the set of all programs is countable. Computable Boolean functions An equivalence between languages and (Boolean-valued) functions: function f : {0,} * {0,} subset L {0,} * L = {x {0,} * : f(x) = } Hence the set of all computable reals is countable. But R is uncountable. Therefore there exist uncomputable reals. If L is decidable we call f computable, and vice versa. 3 4
2 Definition: Decidable languages A language L Σ * is decidable if there is a Turing Machine M which:. Halts on every input x Σ *. 2. Accepts inputs x L and rejects inputs x L. Such a Turing Machine is called a decider. It decides the language L. All languages? Decidable languages Regular languages EvenLength.. Factoring 0 n n Primality.. We like deciders. We don t like TM s that sometimes loop. 5 6 Encoding different objects with strings Fix some alphabet Σ. We use the notation to denote the encoding of an object as a string in Σ Examples: M Σ is the encoding a TM M D Σ is the encoding a DFA D M, M 2 Σ is the encoding of a pair of TMs M, M 2 M, x Σ is the encoding a pair M, x, where M is a TM, and x Σ is an input to M Question: Is every language in {0,} * decidable? Is every function f : {0,} * {0,} computable? Answer: No! Via a simple counting argument. Every TM is encodable by a finite string. Therefore the set of all TM s is countable. So the subset of all decider TM s is countable. Thus the set of all decidable languages is countable. But the set of all languages is uncountable. ( P({0,} * ) > {0,} * ) 7 8 2
3 Question: Is it just weirdo languages that no one would care about which are undecidable? Is it just weirdo languages that no one would care about which are undecidable? Answer (due to Turing, 936): Sadly, no. There are some very reasonable languages we d like to compute which are undecidable. 9 0 We need to write an autograder for isprime Kosbie s version Student submission returns True on exactly same inputs? True or False student submission isprime the correct program isprime Does such a program exist? i.e., can we solve/decide the following? Do they return True on exactly the same inputs? EQ = { M, M 2 M and M 2 are TMs s.t. L M = L(M 2 )} 2 3
4 Some undecidable languages Given two TM descriptions, M and M 2, do they act the same (accept/reject/loop) on all inputs? Given the description of an algorithm, M, does it print out HELLO WORLD? main(t,_,a ) char * a; { return! 0<t? t<3? main(-79,-3,a+ main(-87,-_, main(-86, 0, a+ ) +a)):, t<_? main( t+, _, a ) :3, main ( -94, -27+t, a ) &&t == 2?_ <3? main ( 2, _+, "%s %d %d\n" ) :9:6: t<0? t<-72? main( _, t, "@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+k w'k:'+}e#';dq#'l q#'+d'k#!/+k#;q#'r}ekk#}w'r}ekk{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'k {rw' ik{;[{nl]'/w#q#n'wk nw' iwk{kk{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/") : t<-50? _==*a? putchar(3[a]): main(-65,_,a+) : main((*a == '/') + t, _, a + ) : 0<t? main ( 2, 2, "%s") :*a=='/' main(0, main(-6,*a, "!ek;dc i@bk'(q)- [w]*%n+r3#l,{}:\nuwloca-o;m.vpbks,fxntdceghiry"),a+);} This C program prints out all the lyrics of The Twelve Days Of Christmas. 3 4 Does the following program (written in Maple) print out HELLO WORLD? numbertotest := 2; flag := ; while flag = do flag := 0; numbertotest := numbertotest + 2; for p from 2 to numbertotest do if IsPrime(p) and IsPrime(numberToTest p) then flag := ; break; #exits the for loop end if end for end do print( HELLO WORLD ) It does so if and only if Goldbach s Conjecture is false. Some undecidable languages Given two TM descriptions, M and M 2, do they act the same (accept/reject/loop) on all inputs? Given the description of an algorithm, M, does it print out HELLO WORLD? Given a TM description M and an input x, does M halt on input x? Given a TM description M, does M halt when the input is a blank tape? 5 6 4
5 Some uncomputable functions This one is called The Halting Problem. Given a TM description M and an input x, does M halt on input x? Turing s Theorem: The Halting Problem is undecidable. Theorem: Proof: The Halting Problem is Undecidable Let HALTS Σ * be the language { M,x : M is a TM which halts on input x }. Then HALTS is undecidable. Assume for the sake of contradiction that M HALTS is a decider TM which decides HALTS. 7 8 The Halting Problem is Undecidable Here is the (high level) description of another TM called D, which uses M HALTS as a subroutine: D: Given as input M, the encoding of a TM M: D executes M HALTS ( M, M ). If this call accepts, D enters an infinite loop. If this call rejects, D halts (say, it accepts). The Halting Problem is Undecidable Assume M HALTS is a decider TM which decides HALTS. We can use it to construct a machine D such that D( M ) loops if M( M ) halts, halts if M( M ) loops. Time for the contradiction: Does D( D ) loop or halt? In other words D( M ) loops if M( M ) halts, halts if M( M ) loops. By definition, if it loops it halts and if it halts it loops. Contradiction
6 BTW: last part of proof basically the same as Cantor s Diagonal Argument. D( M ) loops if M( M ) halts, halts if M( M ) loops The set of all TM s is countable, so list them all: M M 2 M 3 M 4 M 5 BTW: last part of proof basically the same as Cantor s Diagonal Argument. D( M ) loops if M( M ) halts, halts if M( M ) loops The set of all TM s is countable, so list them all: M M 2 M 3 M 4 M 5 M halts halts loops halts loops M halts halts loops halts loops M 2 loops loops loops loops loops M 2 loops loops loops loops loops M 3 halts loops halts halts halts M 3 halts loops halts halts halts M 4 halts halts halts halts loops M 4 halts halts halts halts loops M 5 halts loops loops halts loops 2 22 M 5 halts loops loops halts loops D loops halts loops halts halts Given some code, determine if it terminates. It s not: we don t know how to solve it efficiently. It s not: we don t know if it s a solvable problem. In our proof that HALTS is undecidable, we used a hypothetical TM deciding HALTS to derive a contradiction Having established the undecidability of HALTS, we can show further problems to be undecidable using the powerful tool of REDUCTIONS We know that it is unsolvable by any algorithm
7 Reductions Using one problem as a subroutine to solve another problem. Informally, a reduction from A to B gives a way to solve problem A using a subroutine that can solve B Calculating the area of a rectangle reduces to calculating its length and height. Solving a linear system Ax = b reduces to computing the matrix inverse A Reductions Language A reduces to language B means (informally): there is a method that could be used to solve A if it has available to it a subroutine for solving B. The reduction gives such a method. Formally a (Turing) reduction from A to B is an oracle Turing machine that decides A when run with an oracle for B. Notation for A reduces to B: A T B (T stands for Turing). Think, A is no harder than B A is at least as easy as B Reducing language A to B Reductions Fact: Suppose A T B; i.e., A reduces to B. Input x y B? Yes/ No Decider TM with Oracle access to O Oracle O for B y N B? Yes/No Accept if x A Reject if x A If B is decidable, then A is also decidable. (can replace the assumed oracle for B with a decider for B, and the reduction can run this decider whenever it needs to ascertain membership of some string in B) Contrapositive: if A is undecidable then so is B. Think: B is at least as hard as A Reductions are the main technique for showing undecidability
8 Reductions examples Theorem: ACCEPTS = { M, x : M is a TM which accepts x} is undecidable. Proof: We ll prove HALTS reduces to ACCEPTS. Suppose O ACCEPTS is an oracle for language ACCEPTS. Then here s a description of an oracle TM deciding HALTS: Given M, x, run O ACCEPTS ( M, x ). If it accepts, then accept. Reverse the accept & reject states in M, forming M /. Run O ACCEPTS ( M /, x ). If it accepts (i.e., M rejects x), then accept. Else reject. Interesting observation To prove a negative result about computation (that a certain language is undecidable), you actual construct an algorithm namely, the reduction Theorem: Proof: Reductions another example EMPTY = { M : M accepts no strings} is undecidable. Let s prove ACCEPTS T EMPTY. This suffices, since we just showed ACCEPTS is undecidable. So suppose O EMPTY is an oracle for language EMPTY. Here s an oracle TM with oracle access to O EMPTY deciding ACCEPTS: Given M, x Write down the description N x of a TM N x which does the following: On input y, check if y=x. If not, reject. If so, simulate M on y. Then call upon the oracle O EMPTY on input N x and do the opposite. Correctness of reduction Code for N x : On input y, check if y=x. If not, reject. If so, simulate M on y. L(N x ) is either {x} or And L(N x ) = {x} precisely when M accepts x, i.e., M, x ACCEPTS Important: Reduction never runs N x ; it simply writes down the description N x of N x and probes the oracle whether N x EMPTY
9 Schematic of the reduction ACCEPTS T EMPTY Input M, x N x EMPTY? Yes/No Oracle TM deciding ACCEPTS Oracle O EMPTY. Write down description N x 2. Query oracle 3. Accept if O EMPTY answers No, and reject if it answers Yes Another example: ACCEPTS T INFINITE = Input M, x I x INFINITE? Oracle TM deciding ACCEPTS Oracle O INFINITE Yes/No. Write down description I x 2. Query oracle on I x 3. Accept if O INFINITE answers Yes, and reject if it answers No Note: Reduction is particularly simple: a single oracle query, and we just pass on answer to that query. Called mapping reduction Code I x : On input y: ignore y Run M on x & accept if it does. Remember: we don t run I x, we only write down it s code Undecidability galore Similar reductions can show undecidability of telling if, given an input TM M, L(M) is: Finite Regular Contains 25 in binary Decidable Contains a string of length more than 25 Contains only palindromes Etc etc Question: Is everything about TMs undecidable? Answer: No! Some problems about TMs behavior are decidable (as on your HW) Essentially any non-trivial property of languages
10 Question: Do all undecidable problems involve TM s? Post s Correspondence Problem Input: A finite collection of dominoes, having strings written on each half. Answer: No! Some very different problems are undecidable! E.g.: a ab a cabc bcc c Definition: A match is a sequence of dominoes, repetitions allowed, such that top string = bottom string Post s Correspondence Problem Input: A finite collection of dominoes, having strings written on each half. Post s Correspondence Problem Input: A finite collection of dominoes, having strings written on each half. E.g.: a ab a cabc bcc c Task: Output YES if and only if there is a match. Theorem (Post, 946): Undecidable. There is no algorithm solving this problem. Match: a ab bcc c a cabc bcc c = abccabcc = abccabcc (More formally, PCP = { Domino Set : there s a match} is an undecidable language.)
11 Post s Correspondence Problem Input: A finite collection of dominoes, having strings written on each half. Wang Tiles Input: Finite collection of Wang Tiles (squares) with colors on the edges. E.g., Task: Output YES if and only if there is a match. Theorem (Post, 946): Undecidable. There is no algorithm solving this problem. Two-second proof sketch: Given a TM M, you can make a domino set such that the only matches are execution traces of M which end in the accepting state. Hence ACCEPTS T PCP. Task: Output YES if and only if it s possible to make an infinite grid from copies of them, where touching sides must color-match. Theorem (Berger, 966): Undecidable Mortal Matrices Input: Two 5 5 matrices of integers, A & B. Question: Is it possible to multiply A and B together (multiple times in any order) to get the 0 matrix? Hilbert s 0 th problem Input: Multivariate polynomial w/ integer coeffs. Question: Does it have an integer root? Theorem (970): Undecidable. Theorem (Cassaigne, Halava, Harju, Nicolas, 204): Undecidable. Matiyasevich Robinson Davis Putnam 44 45
12 Hilbert s 0 th problem Input: Multivariate polynomial w/ integer coeffs. Question: Does it have an integer root? Undecidable. Entscheidungsproblem Input: A sentence in first-order logic. n, x, y, z N: n 3 (x n + y n = z n ) Question: Is it provable? Question: Does it have a real root? Decidable. Tarski, 95. This is undecidable. We ll come back to this in the lecture on Gödel s Incompleteness Theorem Question: Does it have a rational root? Not known if it s decidable or not Introduction to Time Complexity What have we done so far? What will we do next?
13 What have we done so far? > Introduction to the course Computer science is no more about computers than astronomy is about telescopes. > Strings and Encodings What have we done so far? > The study of computation Computability/Decidability - Most problems are undecidable. - Some very interesting problems are undecidable. > Formalization of computation/algorithm Deterministic Finite Automata Turing Machines But many interesting problems are decidable! 50 5 What is next? > The study of computation Computability/Decidability Computational Complexity (Practical Computability) - How do we define computational complexity? - What is the right level of abstraction to use? - How do we analyze complexity? - What are some interesting problems to study? - What can we do to better understand the complexity of problems? Why is computational complexity important? complexity ~ practical computability Simulations (e.g. of physical or biological systems) - tremendous applications in science, engineering, medicine, Optimization problems - arise in essentially every industry Social good - finding efficient ways of helping others Artificial intelligence list goes on Security, privacy, cryptography.. - applications of computationally hard problems
14 Why is computational complexity important? Goals for next 2 lectures. What is the right way to study complexity? million dollar question (or maybe 6 million dollar question) - using the right language and level of abstraction - upper bounds vs lower bounds - polynomial time vs exponential time 2. Appreciating the power of algorithms. - analyzing some cool (recursive) algorithms Guiding principles What is the right language and level of abstraction for studying computational complexity? Size matters Value matters What is the meaning of: The (asymptotic) complexity of algorithm A is O n 2. Model matters
15 Size matters sorting bazillion numbers > sorting 2 numbers. GREAT IDEA # Running time of an algorithm depends on input length. n = input length/size Running time of an algorithm is a function of n. n is usually: sometimes: # bits in a binary encoding of input. explicitly defined to be something else. (But what is n going to be mapped to?) We have to be careful Value matters Not all inputs are created equal! Size matters Value matters Among all inputs of length n: - some might take 2 steps - some might take bazillion steps. Model matters
16 Why worst-case? GREAT IDEA # 2 Running time of an algorithm is a worst-case function of n. n # steps taken by the worst input of length n We are not dogmatic about it. Can study average-case (random inputs) Can try to look at typical instances. Can do smoothed analysis. BUT worst-case analysis has its advantages: - An ironclad guarantee. - Hard to define typical instances. - Random instances are often not representative. - Often much easier to analyze We have to be careful Model matters PAL = { x 0, x = x R } Size matters Value matters Model matters How many steps required to decide PAL? Facts: O n 2 is the best for -tape TMs. O(n) is the best for 2-tape TMs. Alert: Just because the obvious/standard way to solve it on single-tape TMs takes O n 2 time does NOT mean there isn t a better way Algorithms can be clever and unexpected. Lower bounds are a difficult enterprise
17 Model matters Model matters How many steps required to decide L? Facts: is the best for -tape TMs. is the best for 2-tape TMs. A function in Python: def twofingers(s): lo = 0 hi = len(s)- while (lo < hi): if (s[lo]!= 0 or s[hi]!= ): return False lo += hi -= return True # of steps 3? 4? 5? Seems like Model matters Model matters hi -= Initially hi = n- How many bits to store hi? If n- is a power of 2: hi = hi = 0 steps A function in Python: def twofingers(s): lo = 0 hi = len(s)- while (lo < hi): if (s[lo]!= 0 or s[hi]!= ): return False lo += hi -= return True # of steps 3? 4? 5? log n??
18 Model matters Model matters Initially lo = 0, hi = n- if (s[lo]!= 0 or s[hi]!= ): Does it take n steps to go from s[0] to s[n-]? A function in Python: def twofingers(s): lo = 0 hi = len(s)- while (lo < hi): if (s[lo]!= 0 or s[hi]!= ): return False lo += hi -= return True # of steps n?? log n?? Choice of computational model GREAT IDEA # 3 Computational model does matter for running time. Which model is the best model? No such thing. Any reasonable model should be able to simulate another reasonable model with only a polynomial increase in running time. - For example, -tape TM can simulate 2-tape TM with quadratic slowdown
19 Which model does this correspond to? GREAT IDEA # 4 All reasonable deterministic models are polynomially equivalent. def twofingers(s): lo = 0 hi = len(s)- while (lo < hi): if (s[lo]!= 0 or s[hi]!= ): return False lo += hi -= return True 3? 4? 5? 80 8 The Random-Access Machine (RAM) model Good combination of reality/simplicity. +, -, /, *, <, >, etc. e.g. 245*2894 takes step memory access Actually: e.g. A[94] Assume arithmetic operations take step IF numbers are bounded by poly(n). takes step Putting great ideas #, # 2 and # 3 together Unless specified otherwise, we use this model. (more on this next lecture)
20 Defining running time With a specific computational model in mind: Definition: The running time of an algorithm A is a function defined by worst-case Need one more level of abstraction There is a TM that decides PALINDROME in time Analogous to too many significant digits. Wow, TMI Write when A is clear from context Need one more level of abstraction There is a TM that decides PALINDROME in time Palindrome TM has running time T n = 2 n n + We want to use the right level of abstraction! Analogous to too many significant digits. For algorithms at a higher level (like, in C, or pseudocode), it s not exactly clear what counts as time step Even for slightly more complicated algorithms, it s nearly impossible to calculate so precisely The key takeaway of this T(n): it s quadratic ; that is, proportional to n 2. This leads us to
21 Great Idea #5: Big-O notation The CS way to compare functions: Big O Our notation for when comparing functions. The right level of abstraction! Sweet spot - coarse enough to suppress details like programming language, compiler, architecture, - sharp enough to make comparisons between different algorithmic approaches Big O Big O Informal: An upper bound that ignores constant factors and ignores small n. For roughly means up to a constant factor and ignoring small n
22 Big O Big O For roughly means up to a constant factor and ignoring small n. Formal Definition: For, we say if there exist constants, such that for all, we have. ( and cannot depend on. ) Formal Definition: For, we say if there exist constants, such that for all, we have. ( and cannot depend on. ) Big O
23 Poll Same example: Take. When Select all that apply. is: Beats me Big O practice Run time scaling Running-time: double the input Ratio: constant double the input double the input Note on notation: People usually write Another valid notation: 0 02 double the input double the input (constant) 23
24 Big O Big O Common Big O classes and their names Constant: Logarithmic: Square-root: Linear: Quasi-linear: Quadratic: Polynomial: Exponential: (for some constant k > 0) (for some constant k > 0) n vs 2 n 2 n n ,048,576 20,073,74,824 30,52,92,504,606,846, Exponential running time If your algorithm has exponential running time e.g. Then it is (usually) not practical
25 Exponential running time: Example Given a list of integers, determine if there is a subset of the integers that sum to Exhaustive Search (Brute Force Search): Try every possible subset and see if it sums to 0. Number of subsets is 2 n So running time is at least 2 n 07 25
15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable
15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, 2016 Turing & the Uncomputable Comparing the cardinality of sets A B if there is an injection (one-to-one map) from
More informationUndecidability. Almost all Languages are undecidable. Question: Is it just weird languages that no one would care about which are undecidable?
15-251: Great Theoretical Ideas in Computer Science Lecture 7 Undecidability Almost all Languages are undecidable Set of all languages: Set of all dec. lang.: Most languages do not have a TM deciding them
More informationTuring s Legacy Continues
15-251: Great Theoretical Ideas in Computer Science Lecture 6 Turing s Legacy Continues Solvable with Python = Solvable with C = Solvable with Java = Solvable with SML = Decidable Languages (decidable
More informationGreat Theoretical Ideas in Computer Science. Lecture 9: Introduction to Computational Complexity
15-251 Great Theoretical Ideas in Computer Science Lecture 9: Introduction to Computational Complexity February 14th, 2017 Poll What is the running time of this algorithm? Choose the tightest bound. def
More informationGreat Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity
15-251 Great Theoretical Ideas in Computer Science Lecture 7: Introduction to Computational Complexity September 20th, 2016 What have we done so far? What will we do next? What have we done so far? > Introduction
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 information15-251: Great Theoretical Ideas in Computer Science Lecture 7. Turing s Legacy Continues
15-251: Great Theoretical Ideas in Computer Science Lecture 7 Turing s Legacy Continues Solvable with Python = Solvable with C = Solvable with Java = Solvable with SML = Decidable Languages (decidable
More informationTuring Machines. Lecture 8
Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output
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 10: Rice s Theorem, Oracle Machines
CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable
More informationDecidability: Church-Turing Thesis
Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there
More informationUndecidability. Andreas Klappenecker. [based on slides by Prof. Welch]
Undecidability Andreas Klappenecker [based on slides by Prof. Welch] 1 Sources Theory of Computing, A Gentle Introduction, by E. Kinber and C. Smith, Prentice-Hall, 2001 Automata Theory, Languages and
More informationLecture Notes: The Halting Problem; Reductions
Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings
More informationLecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009
CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as
More informationNotes for Lecture Notes 2
Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation
More informationUndecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015
Undecidability and Rice s Theorem Lecture 26, December 3 CS 374, Fall 2015 UNDECIDABLE EXP NP P R E RECURSIVE Recap: Universal TM U We saw a TM U such that L(U) = { (z,w) M z accepts w} Thus, U is a stored-program
More information1 Computational Problems
Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation
More informationDecidability and Undecidability
Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More information1 Reals are Uncountable
CS 30: Discrete Math in CS (Winter 2019): Lecture 6 Date: 11th January, 2019 (Friday) Topic: Uncountability and Undecidability Disclaimer: These notes have not gone through scrutiny and in all probability
More informationTuring Machines, diagonalization, the halting problem, reducibility
Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have
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 informationUNIT-VIII COMPUTABILITY THEORY
CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the
More informationDecision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012
Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM
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 informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationCSCI3390-Lecture 6: An Undecidable Problem
CSCI3390-Lecture 6: An Undecidable Problem September 21, 2018 1 Summary The language L T M recognized by the universal Turing machine is not decidable. Thus there is no algorithm that determines, yes or
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 informationCSCE 551: Chin-Tser Huang. University of South Carolina
CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan
More informationUndecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK
COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines
More informationCS3719 Theory of Computation and Algorithms
CS3719 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - analysis
More informationCS6901: review of Theory of Computation and Algorithms
CS6901: review of Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational
More informationCSCI3390-Lecture 14: The class NP
CSCI3390-Lecture 14: The class NP 1 Problems and Witnesses All of the decision problems described below have the form: Is there a solution to X? where X is the given problem instance. If the instance is
More informationCSE 311: Foundations of Computing. Lecture 27: Undecidability
CSE 311: Foundations of Computing Lecture 27: Undecidability Last time: Countable sets A set is countable iff we can order the elements of as = {,,, Countable sets: N-the natural numbers Z - the integers
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 informationComputer Sciences Department
Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y
More informationDecidable Languages - relationship with other classes.
CSE2001, Fall 2006 1 Last time we saw some examples of decidable languages (or, solvable problems). Today we will start by looking at the relationship between the decidable languages, and the regular and
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described
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 informationLecture 3: Reductions and Completeness
CS 710: Complexity Theory 9/13/2011 Lecture 3: Reductions and Completeness Instructor: Dieter van Melkebeek Scribe: Brian Nixon Last lecture we introduced the notion of a universal Turing machine for deterministic
More informationLecture 12: Mapping Reductions
Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The
More informationFriday Four Square! Today at 4:15PM, Outside Gates
P and NP Friday Four Square! Today at 4:15PM, Outside Gates Recap from Last Time Regular Languages DCFLs CFLs Efficiently Decidable Languages R Undecidable Languages Time Complexity A step of a Turing
More informationComplexity Theory Part I
Complexity Theory Part I Problem Problem Set Set 77 due due right right now now using using a late late period period The Limits of Computability EQ TM EQ TM co-re R RE L D ADD L D HALT A TM HALT A TM
More informationCS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018
CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts
More informationCS 7220 Computational Complexity and Algorithm Analysis
CS 7220 Computational Complexity and Algorithm Analysis Spring 2016 Section 7: Computability Part IV Undecidability Pascal Hitzler Data Semantics Laboratory Wright State University, Dayton, OH http://www.pascal-hitzler.de
More information17.1 The Halting Problem
CS125 Lecture 17 Fall 2016 17.1 The Halting Problem Consider the HALTING PROBLEM (HALT TM ): Given a TM M and w, does M halt on input w? Theorem 17.1 HALT TM is undecidable. Suppose HALT TM = { M,w : M
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 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 information1 Acceptance, Rejection, and I/O for Turing Machines
1 Acceptance, Rejection, and I/O for Turing Machines Definition 1.1 (Initial Configuration) If M = (K,Σ,δ,s,H) is a Turing machine and w (Σ {, }) then the initial configuration of M on input w is (s, w).
More informationECS 120 Lesson 18 Decidable Problems, the Halting Problem
ECS 120 Lesson 18 Decidable Problems, the Halting Problem Oliver Kreylos Friday, May 11th, 2001 In the last lecture, we had a look at a problem that we claimed was not solvable by an algorithm the problem
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 4.1, 5.1 Define reductions from one problem to another. Use reductions to prove
More informationCSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality
CSE 311: Foundations of Computing Lecture 26: More on Limits of FSMs, Cardinality Last time: Languages and Representations All Context-Free??? Prove there is Regular a context-free DFA language 0* NFA
More informationLecture 20: conp and Friends, Oracles in Complexity Theory
6.045 Lecture 20: conp and Friends, Oracles in Complexity Theory 1 Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode:
More informationThere are two main techniques for showing that problems are undecidable: diagonalization and reduction
Reducibility 1 There are two main techniques for showing that problems are undecidable: diagonalization and reduction 2 We say that a problem A is reduced to a problem B if the decidability of A follows
More informationA non-turing-recognizable language
CS 360: Introduction to the Theory of Computing John Watrous, University of Waterloo A non-turing-recognizable language 1 OVERVIEW Thus far in the course we have seen many examples of decidable languages
More informationCS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)
CS5371 Theory of Computation Lecture 14: Computability V (Prove by Reduction) Objectives This lecture shows more undecidable languages Our proof is not based on diagonalization Instead, we reduce the problem
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 information1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2017 April 10 24, 2017 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
More informationDefinition: conp = { L L NP } What does a conp computation look like?
Space Complexity 28 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 y of x k length and the machine accepts
More informationComputability, Undeciability and the Halting Problem
Computability, Undeciability and the Halting Problem 12/01/16 http://www.michael-hogg.co.uk/game_of_life.php Discrete Structures (CS 173) Lecture B Gul Agha 1 Based on slides by Derek Hoiem, University
More informationWeek 2: Defining Computation
Computational Complexity Theory Summer HSSP 2018 Week 2: Defining Computation Dylan Hendrickson MIT Educational Studies Program 2.1 Turing Machines Turing machines provide a simple, clearly defined way
More informationMost General computer?
Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall
More informationA Note on Turing Machine Design
CS103 Handout 17 Fall 2013 November 11, 2013 Problem Set 7 This problem explores Turing machines, nondeterministic computation, properties of the RE and R languages, and the limits of RE and R languages.
More informationIntroduction to Turing Machines. Reading: Chapters 8 & 9
Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages
More informationCS 125 Section #10 (Un)decidability and Probability November 1, 2016
CS 125 Section #10 (Un)decidability and Probability November 1, 2016 1 Countability Recall that a set S is countable (either finite or countably infinite) if and only if there exists a surjective mapping
More information6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About
More informationComputational Models Lecture 9, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 9, Spring 2009 Reducibility among languages Mapping reductions More undecidable
More informationACS2: Decidability Decidability
Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem
More informationReductions in Computability Theory
Reductions in Computability Theory Prakash Panangaden 9 th November 2015 The concept of reduction is central to computability and complexity theory. The phrase P reduces to Q is often used in a confusing
More informationCSE 105 THEORY OF COMPUTATION. Spring 2018 review class
CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus
More informationCS 361 Meeting 26 11/10/17
CS 361 Meeting 26 11/10/17 1. Homework 8 due Announcements A Recognizable, but Undecidable Language 1. Last class, I presented a brief, somewhat inscrutable proof that the language A BT M = { M w M is
More informationHilbert s problems, Gödel, and the limits of computation
Hilbert s problems, Gödel, and the limits of computation Logan Axon Gonzaga University November 14, 2013 Hilbert at the ICM At the 1900 International Congress of Mathematicians in Paris, David Hilbert
More informationPrinciples of Computing, Carnegie Mellon University. The Limits of Computing
The Limits of Computing Intractability Limits of Computing Announcement Final Exam is on Friday 9:00am 10:20am Part 1 4:30pm 6:10pm Part 2 If you did not fill in the course evaluations please do it today.
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including
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 Church s thesis The computable functions are the same as the partial recursive
More informationIntroduction to Languages and Computation
Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014
More informationAdvanced topic: Space complexity
Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to
More informationCPSC 421: Tutorial #1
CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only
More informationIntroduction to Turing Machines
Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability
More information16.1 Countability. CS125 Lecture 16 Fall 2014
CS125 Lecture 16 Fall 2014 16.1 Countability Proving the non-existence of algorithms for computational problems can be very difficult. Indeed, we do not know how to prove P NP. So a natural question is
More informationLecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem
Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Valentine Kabanets October 27, 2016 1 Gödel s Second Incompleteness Theorem 1.1 Consistency We say that a proof system P is consistent
More informationThe Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability
The Turing Machine Computability Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical provides a
More informationTuring Machines Part II
Turing Machines Part II Problem Set Set Five Five due due in in the the box box up up front front using using a late late day. day. Hello Hello Condensed Slide Slide Readers! Readers! This This lecture
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A
More informationON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936
ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM Turing 1936 Where are We? Ignoramus et ignorabimus Wir mussen wissen Wir werden wissen We do not know We shall not know We must know
More informationTuring machine recap. Universal Turing Machines and Undecidability. Alphabet size doesn t matter. Robustness of TM
Turing machine recap A Turing machine TM is a tuple M = (Γ, Q, δ) where Γ: set of symbols that TM s tapes can contain. Q: possible states TM can be in. qstart: the TM starts in this state qhalt: the TM
More informationTuring Machines Part II
Turing Machines Part II Hello Hello Condensed Slide Slide Readers! Readers! This This lecture lecture is is almost almost entirely entirely animations that that show show how how each each Turing Turing
More informationNP-Complete and Non-Computable Problems. COMP385 Dr. Ken Williams
NP-Complete and Non-Computable Problems COMP385 Dr. Ken Williams Start by doing what s necessary; then do what s possible; and suddenly you are doing the impossible. Francis of Assisi Our Goal Define classes
More informationCSE 4111/5111/6111 Computability Jeff Edmonds Assignment 3: Diagonalization & Halting Problem Due: One week after shown in slides
CSE 4111/5111/6111 Computability Jeff Edmonds Assignment 3: Diagonalization & Halting Problem Due: One week after shown in slides First Person: Second Person: Family Name: Family Name: Given Name: Given
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger
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 informationLimits of Computability
Limits of Computability Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner
More informationUnderstanding Computation
Understanding Computation 1 Mathematics & Computation -Mathematics has been around for a long time as a method of computing. -Efforts to find canonical way of computations. - Machines have helped with
More informationTime-bounded computations
Lecture 18 Time-bounded computations We now begin the final part of the course, which is on complexity theory. We ll have time to only scratch the surface complexity theory is a rich subject, and many
More informationComputability and Complexity
Computability and Complexity Decidability, Undecidability and Reducibility; Codes, Algorithms and Languages CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario,
More informationCSCI3390-Assignment 2 Solutions
CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.
More informationDecidability (What, stuff is unsolvable?)
University of Georgia Fall 2014 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization
More information