Turing Machine UNIT V. Prepared by Prof. T.H.Gurav,SKNCOE, Pune

Size: px
Start display at page:

Download "Turing Machine UNIT V. Prepared by Prof. T.H.Gurav,SKNCOE, Pune"

Transcription

1 Turing Machine UNIT V

2 Devices of Increasing Computational Power So far: Finite Automata good for devices with small amounts of memory, relatively simple control Pushdown Automata stack-based automata Limitations: 1. Amount of Memory(Limited) 2. The way of accessing the memory (PDA can access only top of the stack ) 3. Input Tape (Finite) 4. Tape head is read only.

3 Who was Alan Turing? Founder of computer science, mathematician, philosopher, code breaker. Introduced TM in 1936!

4 Turing machine! - models a human computer (human writes/rewrites symbols on a sheet of paper, the human s state of mind changes based on what s/he has seen) - The Turing machine is a mathematical model not of computers, but of computation. His computer model the Turing Machine was inspiration of the electronic computer that came two decades later

5 Turing Machines TM s described in 1936 by Alen Turing Abstract model for today s computers Components of TM : Finite Control : A TM consists of a finite control (i.e. a finite state automaton). Infinite tape : FC is connected to an infinite tape.the tape consists of cells where each cell holds a symbol from the tape alphabet. Initially each cell has blanks. Tape Head : Reads one cell at a time and moves to L/ R / N States : Initial State, Final State

6 TM

7 States & Transitions Read Write Move Left q q2 1 a / b / L Move Right q q2 1 a / b / R

8 Turing Machine Details In one move the TM will: 1. Change state, which may be the same as the current state 2. Write a tape symbol in the current cell, which may be the same as the current symbol 3. Move the tape head left or right one cell 4. The special states for rejecting and accepting take effect immediately

9 Formal definition of TM Formally, the TM is denoted by the 7-tuple: M = (Q,, Γ, δ, q 0, B, q a ) Q = finite states of the control = finite set of input symbols, which is a subset of Γ below Γ = finite set of tape symbols δ = transition function. δ(q,x)=(p,y,d) p,q ϵ Q and X,Y ϵ Γ and D =,L/R/N q 0 = start state for finite control B = blank symbol. This symbol is in Γ but not in. q accept = set of final or accepting states of Q.

10 Turing Machine: States Input alphabet Tape alphabet M ( Q,,,, q0, B, F) Transition function Final states Initial state blank

11 Transition function q X/Y/D p

12 Instantaneous description processing of a string by TM can be shown using the instantaneous description. The ID of TM includes : 1. All non-blank cells in the tape 2. Position of head. 3. Current state of machine

13 Instantaneous Description (ID)

14 Turing Machines are deterministic Allowed Not Allowed a b, R q 2 a b, R q 2 q 1 q 1 b d, L q 3 a d, L q 3 No empty move is allowed

15 Halting and Acceptance The machine halts if there are no possible transitions to follow. A i/p string is accepted by TM if scanning of the string is completed from left to right and machine is in the final State.

16 Transition Table State I/P a B q0 (q0,a,r) (q1,b,n) q1 - -

17 Handrun Let us trace aa 1. a a B q0 2. a a B 3. a a B q0 q1 Accept

18 TM for calculations TMs can also be used for calculating values Like arithmetic computations Eg., addition, subtraction, multiplication, etc.

19 Equivalence of TM s and Computers In one sense, a real computer has a finite amount of memory, and thus is weaker than a TM. But, we can postulate an infinite supply of tapes, disks, or some peripheral storage device to simulate an infinite TM tape. Additionally, we can assume there is a human operator to mount disks, keep them stacked neatly on the sides of the computer, etc. Need to show both directions, a TM can simulate a computer and that a computer can simulate a TM

20 Computer Simulate a TM This direction is fairly easy - Given a computer with a modern programming language, certainly, we can write a computer program that emulates the finite control of the TM. The only issue remains the infinite tape. Our program must map cells in the tape to storage locations in a disk. When the disk becomes full, we must be able to map to a different disk in the stack of disks mounted by the human operator.

21 TM Simulate a Computer In this exercise the simulation is performed at the level of stored instructions and accessing words of main memory. TM has one tape that holds all the used memory locations and their contents. Other TM tapes hold the instruction counter, memory address, computer input file, and scratch data. The computer s instruction cycle is simulated by: 1. Find the word indicated by the instruction counter on the memory tape. 2. Examine the instruction code (a finite set of options), and get the contents of any memory words mentioned in the instruction, using the scratch tape. 3. Perform the instruction, changing any words' values as needed, and adding new address-value pairs to the memory tape, if needed.

22 Turing Machine Variants There are many variations we can make to the basic TM Extensions can make it useful to prove a theorem or perform some task However, these extensions do not add anything extra the basic TM.

23 TM variants 1. Multitape TM 2. Multitrack TM 3. Non deterministic TM

24 Multitape Turing Machines A multitape Turing machine has several tapes instead of one tape and each tape with a separate head. Each head can move independently of the others The transition function is changed to allow for reading, writing, and moving the heads on all the tapes simultaneously. This means we could read on multiples tape and move in different directions on each tape as well as write a different symbol on each tape, all in one move.

25 Continue..

26 Multitape Machine B M a a a B b a B Equivalent Single Tape Machine:

27 How a multitape TM operates? Initially: A move: The input is in tape #1 surrounded by blanks All other tapes contain only blanks The tape head for tape #1 points to the 1 st symbol of the input The heads for all other tapes point at an arbitrary cell (doesn t matter because they are all blanks anyway) Is a function (current state, the symbols pointed by all the heads) After each move, each tape head can move independently (left or right) of one another

28 Multitrack TM

29 continue

30 Deterministic and Nondeterministic TM Deterministic : when the transition rules are represented as five-tuples (s, x, s, x, d), where s, x are the current state and tape symbol, s, x are the next state and tape symbol, and d is the move direction, then no two transition rules begin with the same pair (s, x), i.e., the mapping (s,x) (s, x, d) is a function.

31 NTM In a nondeterministic Turing machine there maybe more that one transition rule beginning with the same pair eg (q, X). A non-deterministic Turing Machine allows more than one possible action per given state-tape symbol pair. A string w is accepted by TM if after being put on the tape and letting TM run, TM eventually enters q acc on some computation branch.

32 A Universal Turing Machine Prepared by Prof. T.H.Gurav

33 A limitation of Turing Machines: Turing Machines are hardwired they execute only one program Real Computers are re-programmable Prepared by Prof. T.H.Gurav

34 Solution: Universal Turing Machine A Universal Turing Machine is a TM that can simulate the behavior of any other Turing Machine Prepared by Prof. T.H.Gurav

35 Continue A universal Turing machine, a machine that can do any computation if the appropriate program is provided, was the first description of a modern computer. It can be proved that a very powerful computer and a universal Turing machine can compute the same thing. We need only provide the data and the program the description of how to do the computation to either machine. In fact, a universal Turing machine is capable of computing anything that is computable. Prepared by Prof. T.H.Gurav

36 Input string of M Prepared by Prof. T.H.Gurav Universal Turing Machine simulates any Turing Machine M Input of Universal Turing Machine: Description of transitions of M

37 Three tapes Tape 1 Description of M Universal Turing Machine Tape 2 Tape Contents of M Tape 3 Prepared by Prof. T.H.Gurav State of M

38 Tape 1 Description of M We describe Turing machine as a string of symbols: M We encode M as a string of symbols Prepared by Prof. T.H.Gurav

39 Alphabet Encoding Symbols: a b c d Encoding: Prepared by Prof. T.H.Gurav

40 Encoding: 1 11 Prepared by Prof. T.H.Gurav State Encoding States: q 1 q2 q3 q4 Encoding: Head Move Encoding Move: L R

41 Transition Encoding Transition: ( q1, a) ( q2, b, L) Encoding: separator Prepared by Prof. T.H.Gurav

42 separator Prepared by Prof. T.H.Gurav Turing Machine Encoding Transitions: ( q1, a) ( q2, b, L) ( q2, b) ( q3, c, R) Encoding:

43 Tape 1 contents of Universal Turing Machine: binary encoding of the simulated machine M Tape Prepared by Prof. T.H.Gurav

44 A Turing Machine is described with a binary string of 0 s and 1 s Therefore: The set of Turing machines forms a language: each string of this language is the binary encoding of a Turing Machine Prepared by Prof. T.H.Gurav

45 Language of Turing Machines L = { , , , (Turing Machine 1) (Turing Machine 2) } Prepared by Prof. T.H.Gurav

46 Halting Problem Given a program and an input to the program, determine if the program will eventually stop when it is given that input. Prepared by Prof. T.H.Gurav

47 proof that the Halting Problem is unsolvable This proof was devised by Alan Turing, Suppose you have a solution to the halting problem called H. H takes two inputs: 1. a program P and 2. an input I for the program P. H generates an output "halt" if H determines that P stops on input I or it outputs "loop" otherwise. Prepared by Prof. T.H.Gurav

48 Continue.. So now H can be revised to take P as both inputs (the program and its input) and H should be able to determine if P will halt on P as its input. Let us construct a new, simple algorithm K that takes H's output as its input and does the following : 1. if H outputs "loop" then K halts, 2. otherwise H's output of "halt" causes K to loop forever. That is, K will do the opposite of H's output. Prepared by Prof. T.H.Gurav

49 Continue.. function K() { if (H()=="loop"){ return; } else { while(true); //loop forever } } Since K is a program, let us use K as the input to H. Prepared by Prof. T.H.Gurav

50 Continue.. If H says that K halts then K itself would loop (that's how we constructed it). If H says that K loops then K will halt. In either case H gives the wrong answer for K. Thus H cannot work in all cases. We've shown that it is possible to construct an input that causes any solution H to fail. Prepared by Prof. T.H.Gurav

51 Turing Languages Three classes of languages: Turing-decidable or recursive: TM can accept the strings in the language and tell if a string is not in the language. Sometimes these are called decidable problems. Turing-recognizable or recursively enumerable : TM can accept the strings in the language but cannot tell for certain that a string is not in the language. Sometimes these are called partially-decidable. Undecidable : no TM can even recognize ALL members of the language.

52 Recursively Enumerable Languages A TM accepts a string w if the TM halts in a final state. A TM rejects a string w if the TM halts in a non final state or the TM never halts. A language L is recursively enumerable if some TM accepts it. Hence they are also called as Turing Acceptable L. Recursively Enumerable Languages are also called Recognizable

53 Recursive Language Recursive Language : A language L is recursive if some TM accepts it and halts on every input. Recursive languages are also called Decidable Languages because a Turing Machine can decide membership in those languages (it can either accept or reject a string).

54 Undecidable Languages undecidable language = not decidable language If there is no Turing Machine which accepts the language and makes a decision (halts) for every input string. Note : (machine may make decision for some input strings) For an undecidable language, the corresponding problem is undecidable (unsolvable):

55 Comparison with Previous Models Device Separate Input? Read/Write Data Structure Deterministic by default? FA Yes None Yes PDA Yes LIFO Stack No TM No 1-way infinite tape. 1 cell access per step. Yes (but will also allow crashes)

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Turing Machines: An Introduction

Turing Machines: An Introduction CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,

More information

3515ICT Theory of Computation Turing Machines

3515ICT Theory of Computation Turing Machines Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

More information

24 Uses of Turing Machines

24 Uses of Turing Machines Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss

More information

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move. CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write

More information

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

More information

The Halting Problem is Undecidable

The Halting Problem is Undecidable 185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

More information

CAs and Turing Machines. The Basis for Universal Computation

CAs and Turing Machines. The Basis for Universal Computation CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.

More information

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation

More information

Turing Machines, Part I

Turing Machines, Part I Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

Introduction to Turing Machines

Introduction to Turing Machines Automata Theory, Languages and Computation - Mírian Halfeld-Ferrari p. 1/2 Introduction to Turing Machines SITE : http://www.sir.blois.univ-tours.fr/ mirian/ Automata Theory, Languages and Computation

More information

Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

More information

Computability Theory

Computability Theory CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Computational Models Lecture 8, Spring 2009

Computational Models Lecture 8, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance

More information

Automata and Computability. Solutions to Exercises

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

More information

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Chapter 7 Uncomputability

Chapter 7 Uncomputability Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

More information

Universal Turing Machine: A Model for all Computational Problems

Universal Turing Machine: A Model for all Computational Problems Universal Turing Machine: A Model for all Computational Problems Edward E. Ogheneovo Lecturer I, Dept of Computer Science, University of Port Harcourt, Port Harcourt Nigeria. ABSTRACT: Turing machines

More information

Properties of Stabilizing Computations

Properties of Stabilizing Computations Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA

More information

How To Compare A Markov Algorithm To A Turing Machine

How To Compare A Markov Algorithm To A Turing Machine Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also

More information

Regular Languages and Finite State Machines

Regular Languages and Finite State Machines Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

Automata and Formal Languages

Automata and Formal Languages Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

Lecture 2: Universality

Lecture 2: Universality CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

More information

CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions

CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions CSC45 AUTOMATA 2. Finite Automata: Examples and Definitions Finite Automata: Examples and Definitions A finite automaton is a simple type of computer. Itsoutputislimitedto yes to or no. It has very primitive

More information

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

More information

Introduction to Theory of Computation

Introduction to Theory of Computation Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th

More information

CS 301 Course Information

CS 301 Course Information CS 301: Languages and Automata January 9, 2009 CS 301 Course Information Prof. Robert H. Sloan Handout 1 Lecture: Tuesday Thursday, 2:00 3:15, LC A5 Weekly Problem Session: Wednesday, 4:00 4:50 p.m., LC

More information

Super Turing-Machines

Super Turing-Machines 1 This preprint differs from the published version. Do not quote or photocopy. Super Turing-Machines B. Jack Copeland 2 1. Universal Turing Machines A universal Turing machine is an idealised computing

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Turing Machines, Busy Beavers, and Big Questions about Computing

Turing Machines, Busy Beavers, and Big Questions about Computing Turing Machines, usy eavers, and ig Questions about Computing My Research Group Computer Security: computing in the presence of adversaries Last summer student projects: Privacy in Social Networks (drienne

More information

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the

More information

Deterministic Finite Automata

Deterministic Finite Automata 1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function

More information

How To Understand The Theory Of Computer Science

How To Understand The Theory Of Computer Science Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked

More information

The Classes P and NP

The Classes P and NP The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

Composability of Infinite-State Activity Automata*

Composability of Infinite-State Activity Automata* Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara Presented by Prof. Hsu-Chun

More information

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

Increasing Interaction and Support in the Formal Languages and Automata Theory Course Increasing Interaction and Support in the Formal Languages and Automata Theory Course [Extended Abstract] Susan H. Rodger rodger@cs.duke.edu Jinghui Lim Stephen Reading ABSTRACT The introduction of educational

More information

Overview of E0222: Automata and Computability

Overview of E0222: Automata and Computability Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study

More information

Models of Sequential Computation

Models of Sequential Computation Models of Sequential Computation 13 C H A P T E R Programming is often considered as an art, but it raises mostly practical questions like which language should I choose, which algorithm is adequate, and

More information

Finite Automata. Reading: Chapter 2

Finite Automata. Reading: Chapter 2 Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream

More information

Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy

Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy Turlough Neary 1, Damien Woods 2, Niall Murphy 3, and Rainer Glaschick 5 arxiv:1304.0053v2 [cs.cc]

More information

Algebraic Computation Models. Algebraic Computation Models

Algebraic Computation Models. Algebraic Computation Models Algebraic Computation Models Ζυγομήτρος Ευάγγελος ΜΠΛΑ 201118 Φεβρουάριος, 2013 Reasons for using algebraic models of computation The Turing machine model captures computations on bits. Many algorithms

More information

4.6 The Primitive Recursive Functions

4.6 The Primitive Recursive Functions 4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1

More information

NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

More information

Complexity Classes P and NP

Complexity Classes P and NP Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

More information

Lecture 36: Turing Machines [Fa 14]

Lecture 36: Turing Machines [Fa 14] 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. Think globally,

More information

Complexity of Algorithms

Complexity of Algorithms 1 Complexity of Algorithms Lecture Notes, Spring 1999 Peter Gács Boston University and László Lovász Yale University 2 Contents 1 Introduction and Preliminaries 1 1.1 The subject of complexity theory.........................

More information

Informatique Fondamentale IMA S8

Informatique Fondamentale IMA S8 Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université Lille 1 - Polytech Lille

More information

Chapter 1. Computation theory

Chapter 1. Computation theory Chapter 1. Computation theory In this chapter we will describe computation logic for the machines. This topic is a wide interdisciplinary field, so that the students can work in an interdisciplinary context.

More information

T-79.186 Reactive Systems: Introduction and Finite State Automata

T-79.186 Reactive Systems: Introduction and Finite State Automata T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software

More information

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

More information

Finite Automata and Regular Languages

Finite Automata and Regular Languages CHAPTER 3 Finite Automata and Regular Languages 3. Introduction 3.. States and Automata A finite-state machine or finite automaton (the noun comes from the Greek; the singular is automaton, the Greek-derived

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

Oracle Turing machines faced with the verification problem

Oracle Turing machines faced with the verification problem Oracle Turing machines faced with the verification problem 1 Introduction Alan Turing is widely known in logic and computer science to have devised the computing model today named Turing machine. In computer

More information

C H A P T E R Regular Expressions regular expression

C H A P T E R Regular Expressions regular expression 7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun

More information

Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

More information

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES ANDREW E.M. LEWIS 1. Introduction This will be a course on the Turing degrees. We shall assume very little background knowledge: familiarity with

More information

FINITE STATE AND TURING MACHINES

FINITE STATE AND TURING MACHINES FINITE STATE AND TURING MACHINES FSM With Output Without Output (also called Finite State Automata) Mealy Machine Moore Machine FINITE STATE MACHINES... 2 INTRODUCTION TO FSM S... 2 STATE TRANSITION DIAGRAMS

More information

Computer Architecture Syllabus of Qualifying Examination

Computer Architecture Syllabus of Qualifying Examination Computer Architecture Syllabus of Qualifying Examination PhD in Engineering with a focus in Computer Science Reference course: CS 5200 Computer Architecture, College of EAS, UCCS Created by Prof. Xiaobo

More information

Two-dimensional Languages

Two-dimensional Languages Charles University Faculty of Mathematics and Physics Mgr. Daniel Průša Two-dimensional Languages Doctoral Thesis Supervisor: Martin Plátek, CSc. Prague, 2004 Acknowledgements The results presented in

More information

Universality in the theory of algorithms and computer science

Universality in the theory of algorithms and computer science Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)

More information

SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN

SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Code : CS0355 SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Title : THEORY OF COMPUTATION Semester : VI Course : June

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html

More information

Remarks on the computational complexity of small universal Turing machines

Remarks on the computational complexity of small universal Turing machines Remarks on the computational complexity of small universal Turing machines Damien Woods School of Mathematics Boole Centre for Research in Informatics, University College Cork, Ireland http://www.bcri.ucc.ie/

More information

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages

More information

Computationally Complete Spiking Neural P Systems Without Delay: Two Types of Neurons Are Enough

Computationally Complete Spiking Neural P Systems Without Delay: Two Types of Neurons Are Enough Computationally Complete Spiking Neural P Systems Without Delay: Two Types of Neurons Are Enough Rudolf Freund 1 and Marian Kogler 1,2 1 Faculty of Informatics, Vienna University of Technology Favoritenstr.

More information

Enforcing Security Policies. Rahul Gera

Enforcing Security Policies. Rahul Gera Enforcing Security Policies Rahul Gera Brief overview Security policies and Execution Monitoring. Policies that can be enforced using EM. An automata based formalism for specifying those security policies.

More information

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

More information

Turing Machines and Understanding Computational Complexity

Turing Machines and Understanding Computational Complexity Turing Machines and Understanding Computational Complexity Paul M.B.Vitányi CWI, Science Park 123, 1098XG Amsterdam The Netherlands 1. Introduction A Turing machine refers to a hypothetical machine proposed

More information

How To Understand The Relation Between Simplicity And Probability In Computer Science

How To Understand The Relation Between Simplicity And Probability In Computer Science Chapter 6 Computation 6.1 Introduction In the last two chapters we saw that both the logical and the cognitive models of scientific discovery include a condition to prefer simple or minimal explanations.

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

CS5236 Advanced Automata Theory

CS5236 Advanced Automata Theory CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then

More information

Computability Classes for Enforcement Mechanisms*

Computability Classes for Enforcement Mechanisms* Computability Classes for Enforcement Mechanisms* KEVIN W. HAMLEN Cornell University GREG MORRISETT Harvard University and FRED B. SCHNEIDER Cornell University A precise characterization of those security

More information

Model 2.4 Faculty member + student

Model 2.4 Faculty member + student Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

Automata on Infinite Words and Trees

Automata on Infinite Words and Trees Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:

More information

Course Manual Automata & Complexity 2015

Course Manual Automata & Complexity 2015 Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:

More information

An example of a computable

An example of a computable An example of a computable absolutely normal number Verónica Becher Santiago Figueira Abstract The first example of an absolutely normal number was given by Sierpinski in 96, twenty years before the concept

More information

Arithmetic Coding: Introduction

Arithmetic Coding: Introduction Data Compression Arithmetic coding Arithmetic Coding: Introduction Allows using fractional parts of bits!! Used in PPM, JPEG/MPEG (as option), Bzip More time costly than Huffman, but integer implementation

More information

INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

More information

SECTION 10-2 Mathematical Induction

SECTION 10-2 Mathematical Induction 73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

More information

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Pushdown Automata transparencies made for a course at the International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Hendrik Jan Hoogeboom, Leiden http://www.liacs.nl/

More information

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

More information

Grade 7/8 Math Circles Sequences and Series

Grade 7/8 Math Circles Sequences and Series Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Sequences and Series November 30, 2012 What are sequences? A sequence is an ordered

More information

The P versus NP Solution

The P versus NP Solution The P versus NP Solution Frank Vega To cite this version: Frank Vega. The P versus NP Solution. 2015. HAL Id: hal-01143424 https://hal.archives-ouvertes.fr/hal-01143424 Submitted on 17 Apr

More information

About the inverse football pool problem for 9 games 1

About the inverse football pool problem for 9 games 1 Seventh International Workshop on Optimal Codes and Related Topics September 6-1, 013, Albena, Bulgaria pp. 15-133 About the inverse football pool problem for 9 games 1 Emil Kolev Tsonka Baicheva Institute

More information