CAPES MI. Turing Machines and decidable problems. Laure Gonnord

Similar documents
Computability and Complexity

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Chapter 3: The Church-Turing Thesis

Introduction to Turing Machines

CS21 Decidability and Tractability

Fundamentals of Computer Science

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

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

CSE 105 THEORY OF COMPUTATION

Theory of Computer Science

Computability Theory. CS215, Lecture 6,

CS4026 Formal Models of Computation

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

The Church-Turing Thesis

Part I: Definitions and Properties

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Lecture 12: Mapping Reductions

Turing Machines Part II

Chapter 7 Turing Machines

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

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

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

(a) Definition of TMs. First Problem of URMs

Computation Histories

Automata Theory CS S-12 Turing Machine Modifications

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

CS20a: Turing Machines (Oct 29, 2002)

TURING MAHINES

Turing Machines. Our most powerful model of a computer is the Turing Machine. This is an FA with an infinite tape for storage.

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

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

CSCC63 Worksheet Turing Machines

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Turing Machines. Wolfgang Schreiner

Turing Machines Decidability

Variants of Turing Machine (intro)

Decidability: Church-Turing Thesis

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

CS151 Complexity Theory. Lecture 1 April 3, 2017

CSCE 551: Chin-Tser Huang. University of South Carolina

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

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

Theory of Computation

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Turing Machines, diagonalization, the halting problem, reducibility

Introduction to Turing Machines. Reading: Chapters 8 & 9

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Before We Start. Turing Machines. Languages. Now our picture looks like. Theory Hall of Fame. The Turing Machine. Any questions? The $64,000 Question

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

ECS 120 Lesson 15 Turing Machines, Pt. 1

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

Most General computer?

A Note on Turing Machine Design

7.1 The Origin of Computer Science

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Equivalent Variations of Turing Machines

CS 525 Proof of Theorems 3.13 and 3.15

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Turing Machine Variants

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

Turing Machine Recap

Polycopié d'informatique Fondamentale IMA4-SC

Introduction to Computational Complexity

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Turing Machines Part III

CSCE 551 Final Exam, Spring 2004 Answer Key

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

Exam Computability and Complexity

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

Chapter 6: Turing Machines

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Non-emptiness Testing for TMs

CSCI3390-Assignment 2 Solutions

Theory of Computation - Module 4

1 Showing Recognizability

Turing machine. Turing Machine Model. Turing Machines. 1. Turing Machines. Wolfgang Schreiner 2. Recognizing Languages

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

X-machines - a computational model framework.

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

2.6 Variations on Turing Machines

Variations of the Turing Machine

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Turing machines and linear bounded automata

Section 14.1 Computability then else

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation Turing Machine and Pushdown Automata

Turing s Thesis. Fall Costas Busch - RPI!1

Transcription:

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 3 Decidability - Complexity Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 2 / 25

Motivation Un peu en vrac Informatique fondamentale Formalisation de ce qu est un calcul (mais avant les ordinateurs) Notion d impossibilité, de problème difficile Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 3 / 25

Motivation Notion de Modèle de calcul Les classes UML - les BD Les Graphcet Les automates Les machines de Turing Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 4 / 25

1 Motivation 2 Turing Machines 3 Decidability - Complexity Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 5 / 25

Turing Machine, def - 1 Turing Machine, Turing, 1935 A tape (infinite in both sides) : the memory. (it has a working alphabet which contains a blank symbol). A head : read/write symbols on the tape. A finite transition table (or function) image credits : Wikipedia.org Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 6 / 25

Turing Machine, def - 2 Turing Machine elements States (Q), initial state (q 0 ), final (accepting) states (F). One alphabet Γ for the tape. B Γ the blank letter. Transitions are finitely many : read the letter under the head, and then : Erase a symbol or write one under the head Move the head (Left, Right, or Stay) The state can be modified. The transition function is : Q Γ Q Γ {L, R, S} Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 7 / 25

An Example TM that decides if x is odd (impair) : (final State : q 4 ) State/char 0 1 B q 1 (q 1,0,R) (q 1,1,R) (q 2,B,L) q 2 (q 3,0,L) (q 4,1,L) Play on BBBBBBB11BBBBB and BBBBBBB10BBBBB A configuration is a tuple (word on the tape, position of the head, state). Adapted from : http://www.madchat.fr/coding/algo/algo_epfl.pdf slide 4 Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 8 / 25

Another Example Demo : https://turingmachinesimulator.com/ Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 9 / 25

General results 1 There exists Turing machines for the following languages : palindromes a n b n c n (non algebraic language) a i with i prime (non algebraic) a n2, with n 0 Turing machines are more powerful than all other models (we have seen yet) Decidable Languages A language that is recognised by a Turing Machine is said to be decidable. Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 10 / 25

Accepting or computing A TM can also compute functions TM that writes 1 if x is odd, 0 else (q 6 is final state) : State/char 0 1 B q 1 (q 1,0,R) (q 1,1,R) (q 2,B,L) q 2 (q 3,B,L) (q 4,B,L) q 3 (q 3,B,L) (q 3,B,L) (q 5,1,R) q 4 (q 4,B,L) (q 4,B,L) (q 5,0,R) q 5 (q 6,B,R) Play on BBBBBBB11BBBBB and BBBBBBB10BBBBB Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 11 / 25

Another Example Demo of a TM computing the addition. Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 12 / 25

General results 2 - extensions infinite tape in both directions more than one tape many heads per tape bidimensional tape non determinism random access All these extensions can be simulated by a standard machine. Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 13 / 25

Example : Infinite tape (copyright S.Brandel) Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 14 / 25

Example : Infinite tape Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 15 / 25

Example : Infinite tape Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 16 / 25

Example : Infinite tape Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 17 / 25

General results 3 There exists Turing machines for the computation of : x x + 1 (x, y) x + y x x 2 all the functions you are able to write on computers Computable functions A function (defined for all its input) that is computable by a Turing Machine is said to be TM computable A Model of what can be computed with machines. (Church Thesis - see later) Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 18 / 25

Important result 1 - Universal MT Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 19 / 25

Church Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 20 / 25

Decidability - Complexity 1 Motivation 2 Turing Machines 3 Decidability - Complexity Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 21 / 25

Decidability - Complexity Decidable - Semi-decidable languages If L is a language, L is decidable if there exists a Turing Machine (or an algorithm) that outputs for all w : 1 if w L else 0. Semi-decidable : 1 if w L else does not terminate equivalent definition for problems. Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 22 / 25

Decidability - Complexity Complexity Link with computational complexity : The number of steps in the execution of a TM gives the complexity in time, The number of seen squares in the execution of a TM gives the complexity in space. Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 23 / 25

Decidability - Complexity Examples of undecidable problems The halting problem for TM or counter automata (for more that 2 counters) Given a program, does it loops? Is a given algebraic expression (with log, *, exp, sin, abs) equal to 0? (Richardson, 1968) The 10 th Hilbert Problem (Diophantine equations) - 1900 (23 non solved pbs 2017). Garbage Collecting Absence of bugs Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 24 / 25

Conclusion Summary Turing Machines : A model closed to programming languages. Non deterministic. Acceptors for decidable languages. But some languages are not decidable! (equivalently) Computes solutions to problems. But... Important fact Some common problems are undecidable! Laure Gonnord (UCB Lyon1) CAPES - MI 2017 - MEEF 25 / 25