# CSCI3390-Assignment 2 Solutions

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 CSCI3390-Assignment 2 Solutions due February 3, TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems. Options (b) and (c) are meant to be challenging and will get you extra-credit points. Part (a) can be approached very similarly to the way we handled the design of Turing machines that reversed the input, or determined if the number of as and bs was the same. (a) {w#w : w {a, b} }. That is, the input alphabet is {a, b, #}, and the machine will accept a string if and only if it contains exactly one # and the portion before the # matches the portion after. Thus the machine should accept ab#ab but reject both ab#a and ab##ab#. (b) {ww : w {a, b} }. So the machine determines if the first half of the string matches the second half. This is harder, because you don t have a convenient marker to tell you where the middle is. (c) If v {0, 1}, then we denote by (v) 2 the integer represented by v in binary. So for example, (110) 2 and (0110) 2 are both equal to the integer 6. The language is {u#v : (u) 2 < (v) 2 }. In other words, the machine takes as input two integers encoded in binary and determines is the first is less than the second. Thus it should accept 0110#1000 but reject both 111#0110 and #1#0. Solution. I only did the first one (I look forward to seeing the solutions of those who rose to the challenge of (b) or (c)). The strategy is pretty simple, and should 1

2 Figure 1: Turing machine deciding the language in Problem 1(a) be reminiscent of our reversal machine: Start in the left half, cross off the first symbol that is either a or b, and remember it in the state. Move right past the #, then continue right to the first a or b. If it matches the remembered character, cross it off, go back to the start, and repeat. If it doesn t match, reject. If no a or b is found in the right half when the machine is searching for it, reject. If no a or b is found in the left half, and and a or b is found in the right half, reject. The remaining alternative is a scan that finds no occurrence of a or b in the left or right half, in which case the machine accepts. The specification file is posted on the website. The state-transition diagram is pictured in Figure 1. 2 The move-over machine The first step in simulating a two-tape machine by a one-tape machine is spreading out the original input string so that every second cell contains a blank. Here you are asked to show how this is done. Part (a) is a warmup, and if you solve both parts, you only need to submit your answer for (b). (a) Design a Turing machine that puts a blank between its first input symbol and 2

3 second input symbol. That is, if the machine is started with abba on its tape, it will halt with on the tape. a bba (b) Design a Turing machine that puts a blank between every pair of consecutive input symbols. So if it starts with abba on its tape, it will halt with on the tape. a b b a Solution. For (a), move right to the second input symbol. Halt if it s blank; if not, write a blank, remembering the erased input symbol in the state, and move right. Then repeatedly write the remembered symbol, and remember the overwritten symbol in the state, until you overwrite a blank. It s ok to halt here, but to get ready for the next part, go left to the blank, move right and halt. For (b), instead of halting in the last step, return to the initial state. We only have to change one symbol in the specification file from (a) to do this! The specifications are posted. The state diagrams are shown below. 3 One-way infinite tapes Many texts give a different definition of the basic Turing machine: Instead of having the tape extend infinitely in both directions, it is only infinite toward the right. Thus there is a leftmost cell. We need to specify what happens if a transition tells the reading head to move left if it is positioned on the leftmost cell. Crash the program? Stay where it is? We will adopt the second of these rules: the machine will continue to run, but the reading head will not change its position. The simulator program includes the option to run in one-way mode. The way you do this (with, say, the reverse.tm specification) is by typing 3

4 Figure 2: Turing machine deciding the language in Problem 2(a) 4

5 Figure 3: Turing machine deciding the language in Problem 2(b). Observe that it is identical to the preceding machine, apart from the loop back to the initial state. 5

6 Figure 4: Turing machine for reversal with a one-way infinite tape. runtm( reverse, 110,bidirectional=False) Try this out and make sure you understand the behavior you observe. Then modify the specification file reverse.tm (give it a new name) so that it reverses its input when run with these new rules. (HINT: You will have to somehow mark the leftmost cell of the tape.) Solution. The two-way version of this problem halts when, while it searches for letters a, b to copy, encounters the blank cell to the left of the start of the original input. We cannot do this with the one-way tape, so instead we use special symbols for the leftmost cell of the tape, writing a in place of a, b in place of 0, and Y in place of X when writing to this cell. Thus the machine stops when it reaches the initial Y during a leftward scan. The state-transition diagram is shown in Figure 4, and the specification file is posted on the website. An alternative solution is to shift the entire input rightward one cell, using the strategy from Problem 2(a), and then use the original version of the reversal machine. 6

7 4 *More on one-way infinite tapes Prove that every Turing-recognizable language is recognized by a TM with a oneway infinite tape. You will have to describe a simulation, much in the higherlevel spirit of our proof that a two-tape machine can be simulated by a one-tape machine. (However, the simulation is easier, and the time penalty is much less.) Solution. The problem is to show how to simulate a normal TM M by a one-way TM M. I saw four different methods (well, three-and-a-half, since the first two are very similar) for doing this described in your homework submissions. All of them are correct, although some of your descriptions lacked correct or sufficient detail. I ll describe the first method in some detail, along with pictures, and the others more briefly. This resembles the simulation method we used to simulate two-tape machines by 1-tape machines. We first alter the initial configuration of the tape with the move-over method (see Problem 2). As the simulation progresses, the symbols to the left of the initial head position are recorded in reversed order on alternate cells of the tape. Note that that leftmost cell of the right half, and the rightmost cell of the left half are marked. We have to alter the states somewhat essentially, each state of the original machine splits into two copies, one for when it is scanning a cell on the left half of the tape, one for the right half. (This can also be accomplished with additional markings on the tape symbols.) A transition of the form δ(p, β) = (q, γ, R) of the original machine gives rise to several transitions of the new machine: If we are dealing with the right copy of the state p, the machine will write γ, transition to the right copy of q, and move two cells to the right. For the left copy of p, the rightward transition induces motion two cells to the left. Something special has to happen when the reading head in the original machine moves from the left half to the right half, or vice-versa. In this case, a rightward transition of the original machine δ(p, β) = (q, γ, R) also gives rise to a transition using the marked symbols δ(p left, β ) = (q right, γ, L). 7

8 Figure 5: Simulation of a Turing machine with a two-way infinite tape by a machine with a one-way tape. The top diagram shows the initial preparation: the initial position and all the cells to the right are copied to alternating cells of the one-way tape, and the two leftmost cells are marked. The bottom figure shows a snapshot during the simulation. Cells to the left of the initial position of the twoway machine appear in reversed order in alternate cells of the one-way machine. If the two-way machine is about to move one cell to the right from the illustrated configuration, the one-way machine will move two cells to the left. 8

9 A variant of this interleaving method is to use a larger tape alphabet in which each tape cell of the one-tape machine contains a pair of symbols from the original machine. A very similar strategy is to split the two halves again and use a one-way two-tape machine.. A rightward transition of the original machine induces a rightward transition on the first tape, and a leftward transition on the second. We can then simulate the one-way two-tape machine by a one-way onetape machine, just as we did in class with two bidirectional tapes. So the simulation here is a two-step process. (This also incurs a large time penalty in the second simulation of the two-tape machine by a one-tape machine.) The final method is to mark the left end of the tape, as usual. Whenever the original machine calls for a leftward transition off the leftmost cell, the new machine first shifts its entire tape contents one cell to the right, and then executes the transition. In so doing, we need to be sure that the symbol in the leftmost cell is always marked, and the in the other cells unmarked. We saw in 2(a) how to do the rightward shift. This method also incurs a large time penalty. 5 Hilbert s Tenth Problem When we started the class, I mentioned the decision problem Hilbert s Tenth Problem: Given a multivariable polynomial with integer coefficients, something like x 2 y 13x 3 y , determine whether there are integer values of x and y that make the polynomial evaluate to 0. The solution to Hilbert s problem is that this problem is undecidable. In terms of our formal definition, we can obviously encode polynomials as strings the one above might be encoded as x x y x x x y y y y The question then becomes whether the set of encodings of polynomials that have integer roots is a decidable language. The answer is no. (This is a very difficult problem that took mathematicians many years to solve.) Prove that it is a Turing-recognizable language. You should give a very highlevel argument so you don t need to talk about Turing machines at all. Just 9

10 describe a procedure that will correctly answer yes for exactly the polynomials that have integer roots. (This is actually an easy problem with practically no technical detail, intended to make sure that you understand the underlying concept of the difference between decidable and Turing-recognizable.) Solution. If the polynomial has m variables, we substitute each m-tuple of integers (i 1, i 2,..., i m ) for the variables in the polynomial. If the result is zero, the algorithm says Yes. This solution requires that we have some algorithm for generating the sequence of all m-tupes. Here is one such method: For each i = 0, 1, 2,..., list all triples (there are only finitely many) such that the sum of the absolute values of the components is equal to i. With m = 3 this gives: i = 0 : (0, 0, 0). i = 1 : (±1, 0, 0), (0, ±1, 0), (0, 0, ±1). i = 2 : (±2, 0, 0), (±1, ±1, 0), (±1, 0, ±1), (0, ±2, 0), (0, ±1, ±1, ), (0, 0, ±2), etc. Thus if the polynomial has a root, this algorithm will find it and answer yes. If the polynomial has no root, the algorithm runs forever. Note that it is crucial to be able to enumerate the triples in such a manner that we will never skip one. It is incorrect to say that you are testing the possible solutions in the order (0, 0, 0), (1, 0, 0), (2, 0, 0), and so on, because you will never reach (0, 1, 0) this way. It is not quite enough to say test all possible triples of integers, or even the set of triples of integers is countable, so they can be enumerated. That s on the right track, but there has to be an algorithm that will systematically produce such a list of triples. 10

### Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols

Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols The purpose of this document is to illustrate what a completed project should look like. I have chosen a problem that

### CSCE 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

### Introduction 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

### Lecture 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

### Decision 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

### Computability Theory. CS215, Lecture 6,

Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

### CpSc 421 Homework 9 Solution

CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade

### The Turing machine model of computation

The Turing machine model of computation For most of the remainder of the course we will study the Turing machine model of computation, named after Alan Turing (1912 1954) who proposed the model in 1936.

### Lecture 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

### Boolean circuits. Lecture Definitions

Lecture 20 Boolean circuits In this lecture we will discuss the Boolean circuit model of computation and its connection to the Turing machine model. Although the Boolean circuit model is fundamentally

### Variants of Turing Machine (intro)

CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples, Turing-recognizable and Turing-decidable languages Variants of Turing Machine Multi-tape Turing machines, non-deterministic

### More About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties

More About Turing Machines Programming Tricks Restrictions Extensions Closure Properties 1 Overview At first, the TM doesn t look very powerful. Can it really do anything a computer can? We ll discuss

### Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Turing Machines a n b n c The anguage Hierarchy n? ww? Context-Free anguages a n b n egular anguages a * a *b* ww Courtesy Costas Busch - PI a n b n c n Turing Machines anguages accepted by Turing Machines

### CS 21 Decidability and Tractability Winter Solution Set 3

CS 21 Decidability and Tractability Winter 2018 Posted: January 31 Solution Set 3 If you have not yet turned in the Problem Set, you should not consult these solutions. 1. (a) A 2-NPDA is a 7-tuple (Q,,

### CS 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

### Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

Busch Complexity Lectures: Turing s Thesis Costas Busch - LSU 1 Turing s thesis (1930): Any computation carried out by mechanical means can be performed by a Turing Machine Costas Busch - LSU 2 Algorithm:

### Decidability 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

### Homework 8. a b b a b a b. two-way, read/write

Homework 8 309 Homework 8 1. Describe a TM that accepts the set {a n n is a power of 2}. Your description should be at the level of the descriptions in Lecture 29 of the TM that accepts {ww w Σ } and the

### 1 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).

### Variations of the Turing Machine

Variations of the Turing Machine 1 The Standard Model Infinite Tape a a b a b b c a c a Read-Write Head (Left or Right) Control Unit Deterministic 2 Variations of the Standard Model Turing machines with:

### Automata Theory CS S-12 Turing Machine Modifications

Automata Theory CS411-2015S-12 Turing Machine Modifications David Galles Department of Computer Science University of San Francisco 12-0: Extending Turing Machines When we added a stack to NFA to get a

### CS154, 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

### The tape of M. Figure 3: Simulation of a Turing machine with doubly infinite tape

UG3 Computability and Intractability (2009-2010): Note 4 4. Bells and whistles. In defining a formal model of computation we inevitably make a number of essentially arbitrary design decisions. These decisions

### Turing 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

### Further discussion of Turing machines

Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

### Computational Models - Lecture 6

Computational Models - Lecture 6 Turing Machines Alternative Models of Computers Multitape TMs, RAMs, Non Deterministic TMs The Church-Turing Thesis The language classes R = RE core David Hilbert s Tenth

### Theory of Computation

Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

### Lecture 14: Recursive Languages

Lecture 14: Recursive Languages Instructor: Ketan Mulmuley Scriber: Yuan Li February 24, 2015 1 Recursive Languages Definition 1.1. A language L Σ is called recursively enumerable (r. e.) or computably

### cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 13 CHAPTER 4 TURING MACHINES 1. The definition of Turing machine 2. Computing with Turing machines 3. Extensions of Turing

### Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

COMS11700 Turing machines Department of Computer Science, University of Bristol Bristol, UK 21 March 2014 COMS11700: Turing machines Slide 1/15 Introduction We have seen two models of computation: finite

### Q = 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

### Automata and Computability. Solutions to Exercises

Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

### Undecidable Problems and Reducibility

University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

### Verifying whether One-Tape Turing Machines Run in Linear Time

Electronic Colloquium on Computational Complexity, Report No. 36 (2015) Verifying whether One-Tape Turing Machines Run in Linear Time David Gajser IMFM, Jadranska 19, 1000 Ljubljana, Slovenija david.gajser@fmf.uni-lj.si

### Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

UVa - cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,

### Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1

Busch Complexity ectures: Turing Machines Prof. Busch - SU 1 The anguage Hierarchy a n b n c n? ww? Context-Free anguages n b n a ww egular anguages a* a *b* Prof. Busch - SU 2 a n b anguages accepted

### ECS 120 Lesson 15 Turing Machines, Pt. 1

ECS 120 Lesson 15 Turing Machines, Pt. 1 Oliver Kreylos Wednesday, May 2nd, 2001 Before we can start investigating the really interesting problems in theoretical computer science, we have to introduce

### On Rice s theorem. Hans Hüttel. October 2001

On Rice s theorem Hans Hüttel October 2001 We have seen that there exist languages that are Turing-acceptable but not Turing-decidable. An important example of such a language was the language of the Halting

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

### An 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

### MTAT 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

### Lecture 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

### 7.1 The Origin of Computer Science

CS125 Lecture 7 Fall 2016 7.1 The Origin of Computer Science Alan Mathison Turing (1912 1954) turing.jpg 170!201 pixels On Computable Numbers, with an Application to the Entscheidungsproblem 1936 1936:

### Theory 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

### 7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

CSC4510/6510 AUTOMATA 7.1 A General Model of Computation 7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions A General Model of Computation Both FA and PDA are

### CISC4090: Theory of Computation

CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

### Turing Machines (TM) The Turing machine is the ultimate model of computation.

TURING MACHINES Turing Machines (TM) The Turing machine is the ultimate model of computation. Alan Turing (92 954), British mathematician/engineer and one of the most influential scientists of the last

### 1 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

### Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is

### Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

### Turing 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

### Turing 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

### Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

Turing Machines 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 machine

### CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use

### Space 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

### Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 1. Find a Greibach normal form for the following given grammar. (10 points) S bab A BAa a B bb Ʌ Solution: (1) Since S does not

### Chapter 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

### Decidability. William Chan

Decidability William Chan Preface : In 1928, David Hilbert gave a challenge known as the Entscheidungsproblem, which is German for Decision Problem. Hilbert s problem asked for some purely mechanical procedure

### (a) Definition of TMs. First Problem of URMs

Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing

### Automata and Computability

Automata and Computability Fall 207 Alexis Maciel Department of Computer Science Clarkson University Copyright c 207 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata 5 2. Turing Machines...............................

### The Quantum and Classical Complexity of Translationally Invariant Tiling and Hamiltonian Problems

The Quantum and Classical Complexity of Translationally Invariant Tiling and Hamiltonian Problems Daniel Gottesman Perimeter Institute for Theoretical Physics Waterloo, Ontario, Canada dgottesman@perimeterinstitute.ca

### PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

### DRAFT. Algebraic computation models. Chapter 14

Chapter 14 Algebraic computation models Somewhat rough We think of numerical algorithms root-finding, gaussian elimination etc. as operating over R or C, even though the underlying representation of the

### Formal Definition of Computation. August 28, 2013

August 28, 2013 Computation model The model of computation considered so far is the work performed by a finite automaton Finite automata were described informally, using state diagrams, and formally, as

### 1 Two-Way Deterministic Finite Automata

1 Two-Way Deterministic Finite Automata 1.1 Introduction Hing Leung 1 In 1943, McCulloch and Pitts [4] published a pioneering work on a model for studying the behavior of the nervous systems. Following

### Nondeterministic Finite Automata

Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

### Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

### Turing machines and linear bounded automata

and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November, 2011 1 / 13 1 The Chomsky hierarchy: summary 2 3 4 2 / 13

### Lecture 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:

### 1 Deterministic Turing Machines

Time and Space Classes Exposition by William Gasarch 1 Deterministic Turing Machines Turing machines are a model of computation. It is believed that anything that can be computed can be computed by a Turing

### Theory of Computation

Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs

### HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

IDT Open Seminar AAN TUING AND HIS EGACY 00 Years Turing celebration http://www.mrtc.mdh.se/~gdc/work/turingcentenary.pdf http://www.mrtc.mdh.se/ mdh se/~gdc/work/turingmachine.pdf Gordana Dodig Crnkovic,

### Turing machines and computable functions

Turing machines and computable functions In this chapter we address the question: how can we define the class of discrete functions that are computable? Probably, most of you are familiar with a few programming

### THEORY OF COMPUTATION

SHARIF UNIVERSITY OF TECHNOLOGY THEORY OF COMPUTATION FIRST WEEK February 13, 2016 1 COURSE DESCRIPTION Session 1 1 Course Description Welcome to "Theory of Computation" course. In this course we will

### ENEE 459E/CMSC 498R In-class exercise February 10, 2015

ENEE 459E/CMSC 498R In-class exercise February 10, 2015 In this in-class exercise, we will explore what it means for a problem to be intractable (i.e. it cannot be solved by an efficient algorithm). There

### 3 Probabilistic Turing Machines

CS 252 - Probabilistic Turing Machines (Algorithms) Additional Reading 3 and Homework problems 3 Probabilistic Turing Machines When we talked about computability, we found that nondeterminism was sometimes

### Computability 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

CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

### Computer 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

### Computability Theory

Computability Theory Cristian S. Calude and Nicholas J. Hay May June 2009 Computability Theory 1 / 155 1 Register machines 2 Church-Turing thesis 3 Decidability 4 Reducibility 5 A definition of information

### 9 Nondeterministic Turing Machines

Caveat lector: This is the zeroth (draft) edition of this lecture note. In particular, some topics still need to be written. Please send bug reports and suggestions to jeffe@illinois.edu. If first you

### UNIT-VI PUSHDOWN AUTOMATA

Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

### Notes on State Minimization

U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of

### 198:538 Lecture Given on February 23rd, 1998

198:538 Lecture Given on February 23rd, 1998 Lecturer: Professor Eric Allender Scribe: Sunny Daniels November 25, 1998 1 A Result From theorem 5 of the lecture on 16th February 1998, together with the

### Complexity and NP-completeness

Lecture 17 Complexity and NP-completeness Supplemental reading in CLRS: Chapter 34 As an engineer or computer scientist, it is important not only to be able to solve problems, but also to know which problems

### CAPES MI. Turing Machines and decidable problems. Laure Gonnord

CAPES MI Turing Machines and decidable problems Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@univ-lyon1.fr Université Claude Bernard Lyon1 2017 Motivation 1 Motivation 2 Turing Machines

### CSE 105 Theory of Computation

CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A Non-TR Language Reminders and announcements: HW 7 (Last!!)

### 6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

### Finish 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

### 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch Today Final topic in computability theory: Self-Reference and the Recursion

### Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack

A pushdown automata (PDA) is essentially: An NFA with a stack A move of a PDA will depend upon Current state of the machine Current symbol being read in Current symbol popped off the top of the stack With

### TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP THURSDAY Mar 20 COMPLEXITY THEORY Studies what can and can t be computed under limited resources such as time, space, etc Today:

### Computability Theory

Computability Theory Cristian S. Calude May 2012 Computability Theory 1 / 1 Bibliography M. Sipser. Introduction to the Theory of Computation, PWS 1997. (textbook) Computability Theory 2 / 1 Supplementary

### Introduction to Computability

Chapter 2 Introduction to Computability This subject is primarily concerned with the limitations of computing. As one of the highlights of this study, we will learn several specific problems that computers

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

### Chapter 6: Turing Machines

Chapter 6: Turing Machines 6.1 The Turing Machine Definition A deterministic Turing machine (DTM) M is specified by a sextuple (Q, Σ, Γ, δ, s, f), where Q is a finite set of states; Σ is an alphabet of

### CS243, Logic and Computation Nondeterministic finite automata

CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

### CFGs and PDAs are Equivalent. We provide algorithms to convert a CFG to a PDA and vice versa.

CFGs and PDAs are Equivalent We provide algorithms to convert a CFG to a PDA and vice versa. CFGs and PDAs are Equivalent We now prove that a language is generated by some CFG if and only if it is accepted