CSCI 2670 Introduction to Theory of Computing September 29, 2005.

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

Deterministic Turing Machines
Introduction to Computability Theory
Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Lecture 5 Turing Machines
Computation Theory Introduction to Turing Machine.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Chapter 9 Turing Machine (TMs).
AUTOMATA THEORY VIII.
Turing Machines A more powerful computation model than a PDA ?
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Turing Machines – Decidability Lecture 25 Section 3.1 Fri, Oct 19, 2007.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
The Church-Turing Thesis Chapter 3 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Lecture 9  2010 SDU Lecture9: Turing Machine.  2010 SDU 2 Historical Note Proposed by Alan Turing in 1936 in: On Computable Numbers, with an application.
1 Turing machines Chapter 4, Smith and Kimber. A Turing machine is an abstraction of a human “computer”. Consists of - control, in the form of states -
CS 3240: Languages and Computation
CSCI 2670 Introduction to Theory of Computing October 7, 2004.
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 1. Design a TM which on a input w  {0, 1}*, shifts w over one position to the right. That is: (s, # w [#]) ├ * (h, # # w [#]). 2. Show the computation.
1 Introduction to Turing Machines
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines. The next level of Machine… PDAs improved on FSAs by adding memory. We make the memory more flexible to do more complicated tasks.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Turing Theory. Turing Machine A Turing Machine denoted by TM, is a collection of six things. –An alphabet  of input letters –A TAPE divided into a sequence.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation Automata Theory Dr. Ayman Srour.
CSCI 2670 Introduction to Theory of Computing
Recursively Enumerable Languages
CSCI 2670 Introduction to Theory of Computing
Complexity and Computability Theory I
Busch Complexity Lectures: Turing Machines
Deterministic Turing Machines
COSC 3340: Introduction to Theory of Computation
Turing Machines.
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
CSE 105 theory of computation
CSE 105 theory of computation
CS21 Decidability and Tractability
COSC 3340: Introduction to Theory of Computation
Decidability and Tractability
CSE 105 theory of computation
CSE 105 theory of computation
Computability Catch up last lecture. Turing machines. Variations
Variants of Turing machines
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing September 29, 2005

Agenda Yesterday –Turing machines Today –Continue Turing Machines

September 29, 2005 Announcements Homework due Wednesday –3.2 c & e, 3.6, 3.8 b, 3.12, 3.13 I will accept homeworks until 11:00 Thursday Quiz Tuesday –Turing machine definition, calculation, and design Tests will be returned next Tuesday Ignore comment about tutorials being cancelled

September 29, 2005 Formal definition of a TM Definition: A Turing machine is a 7- tuple (Q, , , ,q 0,q accept,q reject ), where Q, , and  are finite sets and 1.Q is the set of states, 2.  is the input alphabet not containing the special blank symbol ~ 3.  is the tape alphabet, where ~  and , 4.  : Q  Q  {L,R} is the transition function,

September 29, 2005 Formal definition of a TM Definition: A Turing machine is a 7- tuple (Q, , , ,q 0,q accept,q reject ), where Q, , and  are finite sets and 5.q 0  Q is the start state, 6.q accept  Q is the accept state, and 7.q reject  Q is the reject state, where q reject  q accept

September 29, 2005 Computing with a TM M receives input w = w 1 w 2 …w n  * on leftmost n squares of tape –Rest of tape is blank (all ~ symbols) Head position begins at leftmost square of tape Computation follows rules of  Head never moves left of leftmost square of the tape –If  says to move L, head stays put!

September 29, 2005 Completing computation Continue following  transition rules until M reaches q accept or q reject –Halt at these states May never halt if the machine never transitions to one of these states!

September 29, 2005 TM configurations The configuration of a Turing machine is the current setting –Current state –Current tape contents –Current tape location Notation uqv –Current state = q –Current tape contents = uv Only ~ symbols after last symbol of v –Current tape location = first symbol of v

September 29, 2005 Configuration C 1 yields C 2 C 1 yields C 2 if the TM can legally go from C 1 to C 2 in one step –Assume a, b   and u, v   * –uaq i bv yields uq k acv if  (q i,b)=(q k,c,L) –uaq i bv yields uacq k v if  (q i,b)=(q k,c,R)

September 29, 2005 Configuration C 1 yields C 2 Special cases if head is at beginning or end of tape –uaq i bv yields uq j acv if  (q i,b)=(q k,c,L) –uaq i bv yields uacq k v if  (q i,b)=(q k,c,R) –Special cases q i bv~ yields q j ac~ if  (q i,b)=(q k,c,L) and tape head is at beginning of tape uaq i ~ yields uacq k ~ if  (q i,b)=(q k,c,R)

September 29, 2005 Special configurations Start configuration –q0w–q0w Halting configurations –Accepting configuration: uq accept v –Rejecting configuration: uq reject v u, v   *

September 29, 2005 Strings accepted by a TM A Turing machine M accepts input sequence w if a sequence of configurations C 1, C 2, …, C k exist, where 1.C 1 is the start configuration of M on input w 2.each C i yields C i+1 for i = 1, 2, …, k-1 3.C k is an accepting configuration

September 29, 2005 Language of a TM The language of M, denoted L(M), is –L(M) = {w | M accepts w} A language is called Turing- recognizable if some Turing machine recognizes it

September 29, 2005 Deciders A Turing machine is called a decider if every string in  * is either accepted or rejected A language is called Turing-decidable if some Turing machine decides it –These languages are often just called decidable

September 29, 2005 Turing machine notation  (q i,b)=(q k,c,D), where D = L or R, is represented by the following transition qiqi qkqk b  c, D In the special case where  (q i,b)=(q k,b,D), i.e., the tape is unchanged, the right-hand side will just display the direction

September 29, 2005 Example Write a TM that accepts all strings of the form … –Start with a 1 –End with a 1 –Progressively more 0’s between consecutive 1’s

September 29, 2005 Design Check first symbol is a 1 –If not reject Move right and check if second symbol is a 0 –If not reject –If so, replace with X and begin recursion

September 29, 2005 Recursion (high level) Go back and forth on either side of each 1 –Replace 0’s on right side of 1 with an X –Replace X’s on left side of 1 with a Y After all X’s on left side of 1 are replaced with Y’s, there should be exactly one on the right side that has not been X’ed –If not, reject –If so, repeat process (recursion step)

September 29, 2005 Exit condition If you begin to look for the next group of 0’s and reach a ~ then accept

September 29, 2005 Group project 1 Design a Turing machine to accept any string in {a,b} * after making a copy of it on the tape –The tape will start with w –After TM processes the string, the tape should read ww

September 29, 2005 Group project 2 Write a Turing machine that accepts the language {w  {a,b} * | |w| is even}

September 29, 2005 Group project 3 Write a Turing machine that accepts the language {a n b m | n  m and n  m}

September 29, 2005 Group project 4 Write a Turing machine that accepts the language {a n b m a n+m | n  0 and m  1}

September 29, 2005 Group project 5 Write a Turing machine that accepts the language {ww R | w  {a,b} * }

September 29, 2005 Group project 6 Design a Turing machine that accepts the language {w  {a,b} * | w has more a’s than b’s}