Course Outline Mathematical Preliminaries Turing Machines

Slides:



Advertisements
Similar presentations
Formal Languages: main findings so far
Advertisements

Formal Languages: main findings so far A problem can be formalised as a formal language A formal language can be defined in various ways, e.g.: the language.
Complexity Classes: P and NP
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
8/25/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 1 Theory of Computation Course information Overview of the area Finite Automata Sofya.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
Programming Languages Wrap-up. Your Toolkit Object-oriented Imperative Functional Logic.
Recap CS605: The Mathematics and Theory of Computer Science.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Markov Algorithms An Alternative Model of Computation.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Lecture 5 Turing Machines
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
Linear Bounded Automata LBAs
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Fall 2006Costas Busch - RPI1 The Chomsky Hierarchy.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Remaining Topics Decidability Concept 4.1 The Halting Problem 4.2
Week 14 - Friday.  What did we talk about last time?  Exam 3 post mortem  Finite state automata  Equivalence with regular expressions.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
1 Theory of Computation 計算理論 2 Instructor: 顏嗣鈞 Web: Time: 9:10-12:10 PM, Monday Place: BL 103.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
Review Byron Gao. Overview Theory of computation: central areas: Automata, Computability, Complexity Computability: Is the problem solvable? –solvable.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Computation Theory 主講人:虞台文. Content Overview The Limitation of Computing Complexities Textbooks & Grading.
1 Theory of Computation 計算理論 2 Instructor: 顏嗣鈞 Web: Time: 9:10-12:10 PM, Monday Place: BL.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
9.7: Chomsky Hierarchy.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
Lecture 21 Reducibility. Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Course Overview Why this course “formal languages and automata theory?” What do computers really do? What are the practical benefits/application of formal.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
CS 154 Formal Languages and Computability May 12 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.
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:
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
1. What is Totality problem? 2. What is ji(x)?
Computability. Turing Machines Read input letter & tape letter, write tape letter, move left or right.
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
Theory of Computation. Introduction to The Course Lectures: Room ( Sun. & Tue.: 8 am – 9:30 am) Instructor: Dr. Ayman Srour (Ph.D. in Computer Science).
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Review : Theory of Computation. Regular Language and Finite Automata Context-free Language and Pushdown Automata Turing Machine and Recursive Enumerable.
Linear Bounded Automata LBAs
Other Models of Computation
Summary.
CSE322 The Chomsky Hierarchy
CS21 Decidability and Tractability
Presentation transcript:

::ICS 804:: Theory of Computation - Ibrahim Otieno - iotieno@uonbi.ac.ke +254-0722-429297 SCI/ICT Building Rm. G15

Course Outline Mathematical Preliminaries Turing Machines Recursion Theory Markov Algorithms Register Machines Regular Languages and finite-state automata Aspects of Computability

Last week: Regular Languages and FSA Regular Expressions and regular languages Deterministic FSA Non-deterministic FSA Finite-state automata with epsilon moves Generative grammars Context-free, Context-sensitive languages Chomsky Hierarchy

Course Outline Mathematical Preliminaries Turing Machines Additional Varieties of Turing Machines Recursion Theory Markov Algorithms Register Machines Regular Languages and finite-state automata Aspects of Computability

Aspects of Computability Church-Turing Thesis Rice’s Theorem Wrap-Up

The Church-Turing Thesis

Church-Turing Effectively calculable function: cultural notion; part of mathematician’s informal sense of what mathematics is about Turing-computable function: not cultural or informal at all Church-Turing Thesis tries to combine these two notions (focus on number- theoretic functions)

Church-Turing Turing (1936): a number-theoretic function f is effectively calculable if and only if f is Turing-computable Not possible to formally prove it. Why not? Try to justify it Two parts: f is effectively calculable so f is Turing-computable f is Turing-computable so f is effectively calculable Obvious: there exists some algorithm, so it is calculable

Church-Turing f is effectively calculable so f is Turing- computable: not trivial Does there exist a function that is effectively calculable but not Turing- computable? Many (very different) models of computation, all related (cf. equivalence results) Turing computable functions, Markov-computable functions, … Partial Recursive Functions!

Feasibility (recap) Cobham–Edmonds thesis regarding computational feasibility: the problem of determining whether a given string is a member of a given language L is feasible if and only if L is in P Complexity class P: class of all languages accepted in polynomial time by some (single-tape) Turing Machine

Problems with the Thesis Computable by what? Focus on single-tape Turing machine Which model of computation is the favored one? Does it make a difference?

Problems with the Thesis e.g. L = {w*|na(w) = nb(w)} Register machine: O(n) steps Single Tape Turing Machine: O(n2) steps Multi-Tape Turing Machine: O(n) steps Markov Machine: O(n2) steps

Polynomial Relatedness Suppose that multitape MTM accepts language L in O(n) steps. Then there exists MRM that accepts L in time O([timeTM(n)]2) under the uniform cost assumption. Suppose that MRM accepts language L in O(n) steps under the assumption of uniform cost. Then there exists multitape MTM that accepts L in time O([timeTM(n)]3).

Complexity (recap: MA) Given Turing machine M accepting L, there exists a Markov algorithm AS that accepts L in O(timeM(n)) steps Given Markov algorithm AS accepting L, there exists a Turing machine M that accepts L in O([timeAS(n)]4) steps

Time and Space (recap: TM) Corollary Suppose that language L is accepted by k-tape Turing machine M. Then L is accepted by a single-tape Turing machine M1 such that timeM1(n) is O([timeM(n)]2) Corollary Suppose that language L is accepted by k-tape Turing machine M. Then L is accepted by a single-tape Turing machine M´ such that spaceM´(n) is O(spaceM(n)).

Results Regarding Polynomial Relatedness of Models Markov Algorithm Model O(timeM(n)) O([timeAS(n)]4) Multitape Turing Machine model O([timeTM(n)]3) O(timeM(n)) O([timeM(n)]2) Register Machine Model Single-tape Turing Machine model O([timeTM(n)]2)

Reformulation In invoking the Cobham-Edmonds thesis, it seems to make no difference which model we take Reformulation: A language-acceptance problem is feasible provided that the language in question is accepted in polynomially bounded time

More generally Invariance principle for models of sequential Computation Let Model be some machine model of sequential computation. Then Model will be said to be a reasonable model of sequential computation if it is polynomially related to the multitape Turing machine model

Church-Turing Over 7 decades, many different models of computation, but all can be related to the Turing-machine model All seem to encompass the same class of functions: partial recursive functions Hypothesis: this must be a “natural” class Mathematical properties of its members make it the natural outcome of diverse approaches This class must be the class of effectively calculable functions If one of the other models could compute some function that is not Turing-computable, then the class would not seem to be so properly defined

Church-Turing So: no formal proof, but vast amount of empirical evidence Thesis: If function f is effectively calculable, then f is Turing computable. Equivalently, if a function f is not Turing computable, then f is not effectively calculable But limits of human cognition?

Rice’s Theorem

Rice’s Theorem Preliminaries: Every natural number is the encoding or gödel number of a unique single-tape deterministic Turing machine Every Turing machine with input alphabet ={1} computes a unary partial recursive function The class of Turing machines with input alphabet ={1} can be effectively enumerated

Recursive Set (recap) A set S of natural numbers is recursive if its characteristic function S is (partial) recursive with S(n) = 1 if n  S 0 if n  S

Rice’s Theorem Theorem: Let  be a set of unary partial recursive functions that is nontrivial (i.e. not empty or the entire class). Then let  be the set of all gödel numbers of the members of . Then  is not a recursive set of natural numbers

Rice’s Theorem Important ramifications for pragmatic computer science: e.g. teacher trying to grade C programs for some assignment Approach 1: check input/output Approach 2: grading program that runs on source code to check whether it effectively computes some function Following Rice’s Theorem (and Church-Turing) there cannot be such a grading program

Wrap-up

Paradigms Three computational paradigms: Function computation Language recognition Transduction paradigm Various ways of modeling these paradigms: Turing machines, Markov algorithms, register machines

Turing Starting point: single-tape Turing machines Variations: one-way-infinite tape, halting state, multi-tape Inconsequential from theoretical point of view Variants: extensionally equivalent

Markov Algorithms Labeled and unlabeled Like Turing machines, universal model of computation Universal: Not: can do everything But: any function that is computable in any sense is computed by some Markov algorithm Church-Turing: functions that are not Markov- computable are not computable in any intuitive sense either

Computability-in-principle Computation without limitations in terms of time and resources Some functions are computable in principle, but may take ages to finish e.g. Busy Beaver is not Turing-computable

Busy Beaver The Turing Machine in TMn that writes the maximum number of 1s for a number of states Very hard to find for anything but the smallest of n’s For any n: large number of possible Turing Machines Some Turing Machines will loop (so (n) = 0) Hard to distinguish between infinitely looping machine and one that is just writing a lot of 1s

Busy Beaver Calculated by brute force

Busy Beaver Very theoretic, toy-like argument to non- computability But: impact on pragmatic computer science as well Rice’s theorem: various decision problems are not solvable by any Turing machine and thus not solvable at all Various algorithms for proving program correctness do not exist: computer scientists with no background in theory can waste a lot of time trying to develop such an algorithm

Theory of Computation Origins in 1920s/1930s by mathematical logicians and philosophers before the advent of the modern digital computer!!! Theoretic computer science has been advancing independently from pragmatic computer science But: theoretic work has influenced pragmatic developments and vice versa e.g. Universal Turing Machine as a precursor to modern-day Computability theory influences design of programming languages and compilers Register machines: reflect modern machine architecture

Theory of Computability A side-branch of mathematics But: mathematicians cannot axiomatically characterize mathematical truth Church-Turing, Cobham-Edmonds, … try to define computability and seem to have largely succeeded Applications in pragmatic computer science have validated these insights But: theory of computation is a science in its own right (e.g. theoretical physics, theoretical linguistics, cognitive science, …) What is computable? What is feasible? Basic philosophical questions!

Feasible Computation More interesting from a practical point of view Complexity theory can aid during program design Cobham-Edmonds Thesis: feasibility is modeled by a deterministic, single-tape Turing machine whose running time is bounded above by some polynomial in the size of the input Complexity class P (and PNP): can be computed in polynomial time Complexity class NP: requires exponential time NP-complete problems not in the class of P are deemed to be computationally unfeasible

Feasible Computation So when working on a problem: if you find the solution to not be solvable in polynomial time, direct your effort to a subset of the problem E.g. traveling salesman problem for Weighted undirected graphs  refocus the problem with some heuristics, e.g. nearest-neighbor traveling salesman problem So complexity theory has had a huge impact outside of theoretical computing

Feasible Computation P-completeness: although computation is feasible, the problem is unlikely to be solvable using a parallel computing approach in other words: a parallel algorithm will not produce any improvement in worst-case execution time over the polynomially bounded non-parallel algorithm that already exists So knowing this: if a problem is in complexity class P and is polynomially bounded in time, don’t waste time trying to parallelize the solution

Part II: The Chomsky Hierarchy Accepted by nondeterministic push-down stack automaton G: Context-Free Grammars Accepted by linear-bounded automaton G: context-sensitive grammars Accepted by deterministic FSA G: Right-linear grammars Context-free languages Recursively enumerable languages Context- sensitive languages Regular languages Accepted by deterministic 1tape Turing Machine

Open questions P = NP ? Can deterministic linear-bounded automaton accept the same language as a nondeterministic one? Nondeterminism, although proven to be inconsequential for Turing Machines and finite- state automata, is still not fully understood for models of computation