CS 154 Formal Languages and Computability April 5 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.

Slides:



Advertisements
Similar presentations
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Advertisements

THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
Alan Turing Enigma Chris Jager. Contents Introduction Introduction Childhood & Youth Childhood & Youth The Turing Machine The Turing Machine Second World.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
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 ? ?
Lecture 5 Turing Machines
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines CS 105: Introduction to Computer Science.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.
Alan Turing Presented By: Tyler Romero CSCE Spring 2014.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2011.
The Turing machine Olena Lastivka. Definition Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a table.
1 Language Recognition (11.4) and Turing Machines (11.5) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
1.History of a remarkable Man Call “Alan Turing”. 2.Study Life. 3.Work life during the world war 2 period. 4.His achievement after the world war. 5.His.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Alan M. Turing ( ) A Natalie Cluck Presentation.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Turing Machines (13.5) Based on slides by Costas Busch from the course
COMM 3353: Communication Web Technologies I M,W,F 1:00PM to 2:00PM 239 COM Shawn W. McCombs M,W,F 1:00PM to 2:00PM 239 COM Shawn W. McCombs
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
CS 3240: Languages and Computation
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
CS 154 Formal Languages and Computability February 4 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability March 17 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability April 19 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.
CS 154 Formal Languages and Computability May 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability April 28 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
CS 154 Formal Languages and Computability April 7 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability March 22 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Turing Machines Finite State Machines.
Busch Complexity Lectures: Turing Machines
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Turing Machines (At last!).
Modeling Computation:
Jaya Krishna, M.Tech, Assistant Professor
Turing Machines (11.5) Based on slides by Costas Busch from the course
Theory of Computation Turing Machines.
COSC 3340: Introduction to Theory of Computation
The Church-Turing Thesis and Turing-completeness
Presentation transcript:

CS 154 Formal Languages and Computability April 5 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Context-Free Decidable Properties  There is an algorithm to decide whether or not a given string w can be derived from a context- free grammar G. Membership Is w in L(G) ?  There is an algorithm to decide whether or not L(G) is empty for a context-free grammar G.  There is an algorithm to decide whether or not L(G) is infinite for a context-free grammar G. 2 YES

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak More Context-Free Decision Problems  There is an algorithm to decide whether or not a given context-free grammar G is ambiguous.  There is an algorithm to decide whether or not two given context-free languages L 1 and L 2 share a common word.  There is an algorithm to decide whether or not two given context-free grammars G 1 and G 2 generate the same language. 3 NO

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Theory of Undecidable Problems  Problems that cannot be solved by computer.  In the early to mid 1930’s several prominent mathematicians were defining the notion of an “effective procedure” (i.e., algorithm) to solve problems. Kurt Gödel Alonzo Church Emil Post Alan Turing 4

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing  British mathematician,  Contributed three principal ideas for problem-solving: Logical instructions to define a methodical process (i.e., an algorithm). State transitions of a human mind while performing a methodical process. A mechanical machine that can perform the process (the Turing machine). 5

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing, cont’d  In 1935, Turing wrote his famous paper, “On Computable Numbers with an Application to the Entscheidungsproblem” Entscheidungsproblem = decision problem  In his paper, Turing proved that There cannot exist any universal algorithmic method of determining truth in mathematics. Mathematics will always contain undecidable propositions.  His paper also introduced the Turing machine. 6

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing, cont’d  After receiving his Ph.D. from Princeton University in 1938, he returned to Cambridge.  Took a part-time position with the Government Code and Cypher School. A British code-breaking organization.  A leading participant at Bletchley Park during World War II to break German ciphers. Helped design an electromechanical device to decipher messages encrypted by the German Enigma machine. 7

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing, cont’d  Turing’s work enabled the Allies to defeat the Nazis in many crucial engagements, including the Battle of the Atlantic.  His work may have shortened the war in Europe by two to four years. 8

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing, cont’d  In 1950, wrote “Computing Machinery and Intelligence” in which he introduced what is known today as the Turing Test. If you cannot tell that you are having a conversation with a computer, then the computer is exhibiting intelligent behavior.  His paper asked the question, “Can machines think?” Can a computer convincingly imitate a human? “Are there imaginable digital computers which would do well in the imitation game?” 9

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Alan Turing, cont’d  Prosecuted for homosexuality in  Died in 1954 of cyanide poisoning. Controversy: Was it suicide or an accident?  Recognized today as the father of theoretical computer science and artificial intelligence. 10

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Models of Computation 11 MachineMemoryLanguageApplications Finite automatonMachine states onlyRegularText searching, text editors Pushdown automatonStates + stackContext-freeProgramming language compilers Turing machineStates + infinite tapeType 0Computers

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine  A Turing Machine (TM) is a model of a real-world computer.  A TM has the same abilities and the same inabilities of any computer.  Turing Thesis: Any computational process, such as those carried out by present-day computers, can be done on a Turing machine. AKA Church-Turing Thesis Church’s lambda notation and Turing’s machines are equivalent. 12

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine, cont’d  Each tape cell holds one input symbol. Blanks precede and follow the input string.  On each step: The read/write head can overwrite the current symbol. Then the read/write head can move one cell left or right, or stay ourses/2002/fall/cs30/Lectures/we ek08/Computation.html

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine Definition  Turing Machine where: Q is the set of internal states Σ is the input alphabet Γ is the tape alphabet δ is the transition function is the special blank symbol is the initial state is the set of final states 14 I use Δ for the blank symbol instead of the book’s square for ease of typing.

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine Transition Function  The transition function has two arguments: the current state the current tape symbol being read  Results: a new state a new tape symbol that replaces the current one a head move to the left ( L ), right ( R ), or stay ( S ). 15

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine Example #1  A TM that accepts the language L = {a n b n : n ≥ 1}  Pseudocode: 1. If the current input symbol (CIS) = a then write Δ, else REJECT. 2. Move head right until CIS = Δ. 3. Move head left. 4. If CIS = b then write Δ, else REJECT. 5. Move head left until CIS = Δ. 6. Move head right. 7. If CIS = Δ then ACCEPT, else go to step 1. 16

Computer Science Dept. Spring 2016: April 5 CS 154: Formal Languages and Computability © R. Mak Turing Machine Example #1, cont’d 17 q 0 : Replace the leftmost a with a blank q 1 : Skip right to a blank q 2 : Replace the rightmost b with a blank q 3 : Skip left to a blank q 4 : ACCEPT 1.If CIS = a then write Δ, else REJECT. 2.Move head right until CIS = Δ. 3.Move head left. 4.If CIS = b then write Δ, else REJECT. 5.Move head left until CIS = Δ. 6.Move head right. 7.If CIS = Δ then ACCEPT, else go to step 1. Demo G11.2