Computability and computational complexity
|
|
- Chrystal Dean
- 7 years ago
- Views:
Transcription
1 Computability and computational complexity Lecture 2: Turing machines Ion Petre Computer Science, Åbo Akademi University Fall October 26,
2 Content Algorithms finite vs. infinite Turing machine (TM) basics TM as algorithms TM with multiple tapes Convention: we denote the empty word by 1, the blank space by # October 26,
3 ALGORITHMS: FINITE VS. INFINITE October 26,
4 A model for algorithms To discuss about algorithmic solutions (or lack of them) for a given problem we need a formalization for algorithm Turing machines will be our formal model for algorithms in this course What is an algorithm? A natural list of requirements: i. it consists of a finite number of simple operations ii. the instructions are applied deterministically iii. the instructions are universal they apply to each input instance iv. the instructions are terminating: for each legal input, the result is obtained in a finite number of applications of operations Without loss of generality we can assume that all algorithms have nonnegative integers as input and output any string can be seen as a nonnegative integer the set S* of strings over the finite alphabet S is isomorphic with N, for any S an algorithm A calculates a function f A :N N October 26,
5 Formalizing the notion of algorithm Assume that we have an arbitrary formalization for algorithm, that satisfies conditions i-iv this means to have a precise definition for an algorithm it also means they can be effectively enumerated: A 1, A 2, A 3,, where effective means that for a given i, algorithm A i can be found Consider now the following algorithm D: its input is a nonnegative integer for each input n, define D(n)=f An (n)+1 in other words: for an input n, select algorithm A n, calculate its output on n and give its successor as an output of D Recall our natural requirements of an algorithm: i. it consists of a finite number of simple operations ii. the instructions are applied deterministically iii. the instructions are universal they apply to each input instance iv. the instructions are terminating: for each legal input, the result is obtained in a finite number of applications of operations October 26,
6 The diagonalization argument: defining the output of D(n) D(n) A 1 A 2 A 3 A n 1 f A1 (1)+1 2 f A2 (2)+1 3 f A3 (3)+1 n f An (n)+1 Note: algorithm D is not in our list! if D=A r, for some r, then we should have f D (r)=f Ar (r), but by definition, we have f D (r)=f Ar (r)+1 October 26,
7 Discussion Note: the technique above is called a diagonalization argument Step ii. is natural (because of practical considerations) but nondeterministic algorithms are also useful, at least for theoretical considerations more on this later in connection to NP The escape is in considering also algorithms that do not satisfy step iv. Conclusion: in any formalization of the notion of algorithm, we must allow partial, rather than total functions allow algorithms that do not terminate for all legal inputs whenever they terminate, they give the correct answer indeed, this is what we have in Turing machines Recall our natural requirements of an algorithm: i. it consists of a finite number of simple operations ii. the instructions are applied deterministically iii. the instructions are universal they apply to each input instance iv. the instructions are terminating: for each legal input, the result is obtained in a finite number of applications of operations October 26,
8 TURING MACHINES October 26,
9 Turing machines: basic definition Definition: A Turing machine is a quadruple M=(K,Σ, δ,s) K is a finite set of states s K is the initial state Σ is a finite set of symbols, called the alphabet of M; K Σ= ; there are two special characters in Σ: the blank symbol # and the first symbol > δ : KxΣ (K {h, yes, no }) x Σ x {,,-} is the transition function, where: h is a halting state, yes is an accepting state, no is a rejecting state {,,-} are cursor directions assume that {h, yes, no,,,-} (K Σ) = if δ(q,a)=(q,a,d), then we usually write (q,a) (q,a,d) δ can be thought of as the program of the machine (q,>) (p,>, ) Intuitively: the first symbol is never erased and the cursor move on it is always to the right October 26,
10 Computation of a Turing machine Start in the initial state s Input string is >, followed by a finite sequence x of symbols from Σ-{#} we say that x is the input of the machine the cursor is pointing on > From this initial configuration, the machine takes a step according to the transition function enters a new state, rewrites the current symbol, moves the cursor It can never fall-off the left-end of the tape It can go the right arbitrarily much it will read a blank space and handle it according to δ The machine can only stop if it reaches h, yes, or no we say in this case that the machine has halted if the state is yes we say that the machine accepts its input; output is yes if the state is no we say that the machine rejects its input; output is no if the state is h, then its output is the current string of M if >y### is the current string of M, where last(y) #, then M(x)=y; if the machine does not halt, then we write M(x)= October 26,
11 Discussion Turing machines allow non-terminating computations TM defined with strings as inputs can easily consider a number as input through its n-aric representation (decimal, binary, etc) October 26,
12 Example: right transfer machine Input: aba p K σ Σ δ(p,σ) s > (q,>, ) q a (q a,#, ) q a b (q b,a, ) q a # (h,a,-) 1. s, >aba 2. q, >aba 3. q a, >#ba 4. q b, >#aa 5. q a, >#ab# 6. h, >#aba Output: #aba Useful trick to remember: using the states as a finite memory October 26,
13 Example: binary successor function p K σ Σ δ(p,σ) s > (s,>, ) s 0 (s,0, ) s 1 (s,1, ) s # (q,#, ) q 0 (h,1,-) q 1 (q,0, ) q > (t,>, ) t 0 (t,1, ) t 0 (t,0, ) t # (h,0,-) t # (h,#,-) Input: s, > s, > s, > s, > s, >010 # 6. q, >010 # 7. h, >011# Output: 011 Input: s, >11 2. s, >11 3. s, >11 4. s, >11# 5. q, >11# 6. q, >10# 7. q, >00# 8. t, >00# 9. t, 10# 10. t, 10# 11. h, 100 Output: 100 October 26,
14 Configuration Definition: A configuration is (q,w,u) where: q K, w is the string to the left of the cursor, including the symbol scanned by the cursor, u is the string to the right of the cursor Definition: Configuration (q,w,u) yields configuration (q,w,u ) in one step, denoted (q,w,u) (q,w,u ) if: δ(q,a)=(q,a, ) and w=xa, u=by, w =xa b, u =y δ(q,a)=(q,a, ) and w=xa, u=1, w =xa #, u =1 δ(q,a)=(q,a, ) and w=xba, w =xb, u =a u δ(q,a)=(q,a,-) and w=xa, w =xa, u =u Define yields as a transitive closure of yields in one step : configuration (q,w,u) yields (q,w,u ) if there is n 0 and configurations (q i,w i,u i ), 1 i n such that (q,w,u)=(q 0,w 0,u 0 ), (q,w,u )=(q n,w n,u n ) (q i,w i,u i ) (q i+1,w i+1,u i+1 ), for all 1 i n-1 October 26,
15 Example: palindrome checker A string is a palindrome if it consists of the same sequence of letters left-to-right and right-to-left A Turing machine for deciding whether its input is a palindrome or not: remember the first symbol, transform it into #, travel to the right end and compare it to the last symbol if they do not coincide, halt with answer no if they coincide, change the last symbol into # and travel to the left searching for the first non-blank letter repeat the procedure above until a string of length 0 or 1 is left, in which case halt with answer yes Skip the detailed formulation of the machine October 26,
16 Turing machines as algorithms Let L (Σ-{#})* A Turing machine decides L iff for every x (Σ-{#})*, if x L, then M(x)= yes if x L, then M(x)= no In this case, we say that L is a recursive language A Turing machine accepts L iff for every x (Σ-{#})*, x L iff M(x)= yes if x L, M might not terminate on x we could ask that M(x)= for all x L In this case we say that L is a recursively enumerable language Note: any recursive language is recursively enumerable A Turing machine computes a function f : (Σ-{#})* Σ* iff for every x (Σ-{#})*, M halts on x and M(x)=f(x) In this case we call f a recursive function October 26,
17 Solving problems with Turing machines The instance of the problem (e.g., a graph) is given a string representation An algorithm for a decision problem is a TM that decides the corresponding language accept if the input represents a yes instance of the problem, reject otherwise An algorithm for an optimization problem is a TM that computes the corresponding function from strings to strings the output is similarly represented as a string October 26,
18 Discussion: representations Any finite mathematical object can be represented as a finite string elements of a finite set: integers in binary tuples of elements: integers separated by commas sets: use commas and parenthesis graphs: adjacency matrix, with rows separated by a special character Note: representation of numbers unary representation of a number requires exponential space with respect to the binary representation of the same number we always assume in this course binary representations of numbers We always assume a reasonably succinct representation of input important in judging the complexity of a problem October 26,
19 MULTI-TAPE TURING MACHINES October 26,
20 Turing machines with multiple tapes/strings Definition: A k-tape Turing machine is a quadruple M=(K,Σ, δ,s) K is a finite set of states s K is the initial state Σ is a finite set of symbols, called the alphabet of M; K Σ= ; there are two special characters in Σ: the blank symbol # and the first symbol > δ : KxΣ k (K {h, yes, no }) x (Σ x {,,-}) k is the transition function Intuitively: the machine has now k tapes, with a string and an own cursor on each, the cursors can move independently of each other Similarly as for 1-tape TMs, on each tape the first symbol is > the first symbol on each tape is never erased and the cursor move on it is always to the right October 26,
21 Example: more efficient palindrome check Two-tape TM copy the input to the second tape move the cursor of the second tape on the right-most symbol move the two cursors in opposite directions and check the equality October 26,
22 Configurations, transitions of k-tape TM Configuration: a (2k+1)-tuple (q,w 1,u 1,,w k,u k ), where q is the current state w i u i is the current content of the i-th tape with the last symbol of w i holding the cursor Transition: (q,w 1,u 1,,w k,u k ) (q,w 1,u 1,,w k,u k ) defined as follows: denote a i the last symbol of w i, for all 1 i k assume δ(q,a 1,, a k )=(p,a 1,D 1,,a k,d k ) D i = and w i =x i a i, u i =b i y i, w i =x i a i b i, u =y i D i = and w i =x i a i, u i =1, w i =x i a i *, u i =1 D i = and w i =x i b i a i, w i =x i b i, u i =a i u i D i =- and w i =x i a i, w i =x i a i, u i =u i The yields in n steps, denoted n, and yields, denoted *, defined as before October 26,
23 Computations with k-tape TM Start of the computation: (s,>,x,>,1,,>,1) the first tape holds the input with the symbol > in front of it; all other tapes hold just the first symbol > If (s,>,x,>,1,,>,1) *( yes,w 1,u 1,,w k,u k ), then we say that M(x)= yes If (s,>,x,>,1,,>,1) *( no,w 1,u 1,,w k,u k ), then we say that M(x)= no If (s,>,x,>,1,,>,1) *(h,w 1,u 1,,w k,u k ), then we say that M(x)=y, where y is obtained from w k u k by removing the first symbol >, as well as the largest (infinite) suffix formed just by # With these definitions, acceptance, decision, and computation are defined as before October 26,
24 Time If (s,>,x,>,1,,>,1) n (H,w 1,u 1,,w k,u k ), for some H {h, yes, no }, then the time required by M on input x is n If M(x)=, then the time required by M on x is Time bounds for a machine M Let f:n N. We say that M operates within time f(n) if for any input string x, the time required by M is at most f( x ) If a language L is decided by a multi-tape TM operating in time f(n), then we say that L TIME(f(n)) TIME(f(n)) is called a complexity class It is a set of languages October 26,
25 Example Recall the 1-tape TM for checking whether a string of length n is a palindrome it needs n/2 stages first stage: 2n+1 steps (transitions) to compare the first and the last symbol and come back to the beginning of the string second stage: same thing for a string of length n-2 third stage: same for a string of length n-4, etc. Calculate (2n+1)+(2n-3)+(2n-7)+ =(n+1)(n+2)/2 Conclusion: the language of all palindromes is in TIME((n+1)(n+2)/2) Note: the computation may halt much faster, for example for input 01 n-1 Note: the 2-tape TM for checking palindromes takes time at most f (n)=3n+3 à a quadratic speed-up Question: How much speed-up can be gained through multi-tapes? October 26,
26 Multi-tape vs. single-tape TMs Theorem. For any k-tape Turing machine M operating within time f(n) we can construct a (single-tape) TM M operating within time O(f 2 (n)) such that for any input x, M(x)=M (x) Proof: M=(K,Σ,δ,s). We build M =(K,Σ,δ,s) as follows maintain in the unique string of M the concatenation of the k strings of M, delimited by some markers remember the position of the k cursors of M simulate the functioning of M October 26,
27 Multi-tape vs single-tape TM: proof (continued) Let Σ = Σ Σ {>,>, <}, where Σ is a copy of Σ and >, >, < are new symbols M represents a configuration (q,w 1,u 1,,w k,u k ) of M through a configuration (q,>, w 1 u 1 <w 2 u 2 < w k,u k <<), where w i is obtained from w i by replacing the first symbol > with > and the last symbol a i with a i the last two << encode the end of the simulated string Simulating M through M start the computation by shifting its input one position to the right to make space for the symbol >, then add <(> <) k-1 at the end of the string to encode the empty k-1 tapes of M simulate a move of M through two scans of the current string, left-to-right and back October 26,
28 Multi-tape vs single-tape: proof (continued) First scan: gather information about the k currently scanned symbols in M find the k underlined symbols remember them through new states in this way it will know what transition to trigger Second scan: from left to right, stop at each underlined symbol and do the change dictated by M on that string rewrite the current symbol move the cursor by changing an underlined symbol into a normal one and a normal one into an underlined one one complication possible: if in M the move was to the right beyond the limit of the current string on that tape, M will have to create space for a # symbol: move the rest of the string to the right with one position and come back to the current position October 26,
29 Multi-tape vs. single-tape - proof (continued) Proceed with the simulation until M halts. Erase all strings of M except for the last one and halt M October 26,
30 Multi-tape vs. single-tape - proof (continued) How long does M work on input x? recall that M halts within f( x ) steps and so, none of its tapes can become larger than f( x ) hence, total length of the string of M is at most k(f( x )+1)+1 to account for the separators < Simulating one move takes first scan: 2k(f x )+1)+2 because of the scan left to right and back second scan: same, plus the possible shifting to the right (implemented through another double scan left-to-right-to-left), in the worst case to be done for each string of M: at most 2k(f x )+1)+2 +k(2k(f x )+1)+2 ) All in all: O(f( x ) Conclusion: M takes O(f 2 ( x )) steps October 26,
31 Multi-tape vs. single-tape Turing machines Conclusion: strong evidence of the power and stability of Turing machines as a model of computation adding a finite number of tapes does not increase their computational capabilities and only improves their efficiency polynomially We will see later that other additions to the model of basic Turing machines also fail to significantly alter their computing power Thesis: there are no realistic improvements on the Turing machine that will increase the domain of the languages such machines decide, or will affect their speed more than polynomially October 26,
32 Learning objectives An understanding of why (non-halting) Turing machines make up a good model of computing Decision problems, optimization problems as Turing machines Time-complexity Equivalence of multi-tape and single-tape TMs October 26,
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 informationComputability 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 informationCS154. 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 informationCSE 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 informationComputational 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 informationNotes 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 informationThe 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 informationTuring 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 informationLecture 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 information24 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 informationFormal 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 information3515ICT 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 information1 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 informationDiagonalization. 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(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 informationCS 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 informationCAs 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 informationTuring 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 informationAutomata 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 informationAutomata 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 informationProperties 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 informationChapter 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 informationRegular 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 informationPushdown 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 informationHow 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 information4.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 informationReading 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 informationHow 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 informationRegular 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 information6.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 informationNP-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 informationCSC4510 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 informationUniversality 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 information6.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 information6.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 informationRegular 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 informationThe 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 informationNotes 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 informationC 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 informationComplexity 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 informationDeterministic 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 informationTheoretical 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 informationTHE 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 informationIntroduction to NP-Completeness Written and copyright c by Jie Wang 1
91.502 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of
More informationThe 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 informationArithmetic 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 informationUniversal 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 informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More informationImplementation 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 informationFinite 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 informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationGENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY
GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY CARL G. JOCKUSCH, JR. AND PAUL E. SCHUPP Abstract. Generic decidability has been extensively studied in group theory, and we now study it in
More informationIntroduction 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 informationMathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
More informationWelcome 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 informationFinite 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 information2110711 THEORY of COMPUTATION
2110711 THEORY of COMPUTATION ATHASIT SURARERKS ELITE Athasit Surarerks ELITE Engineering Laboratory in Theoretical Enumerable System Computer Engineering, Faculty of Engineering Chulalongkorn University
More informationChapter 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 information1. 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 informationSimulation-Based Security with Inexhaustible Interactive Turing Machines
Simulation-Based Security with Inexhaustible Interactive Turing Machines Ralf Küsters Institut für Informatik Christian-Albrechts-Universität zu Kiel 24098 Kiel, Germany kuesters@ti.informatik.uni-kiel.de
More informationAutomata 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 informationTwo-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 informationIntroduction 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 informationWE write string to mean a finite binary string. Other. Information Distance
IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 44, NO. 4, JULY 1998 1407 Information Distance Charles H. Bennett, Péter Gács, Senior Member, IEEE, Ming Li, Paul M. B. Vitányi, and Wojciech H. Zurek Abstract
More informationHonors 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 information2.1 Complexity Classes
15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look
More informationSYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison
SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections
More informationMatrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.
Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that
More informationAn 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 informationCHAPTER 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 informationQuantum and Non-deterministic computers facing NP-completeness
Quantum and Non-deterministic computers facing NP-completeness Thibaut University of Vienna Dept. of Business Administration Austria Vienna January 29th, 2013 Some pictures come from Wikipedia Introduction
More informationComplexity Theory. Jörg Kreiker. Summer term 2010. Chair for Theoretical Computer Science Prof. Esparza TU München
Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 8 PSPACE 3 Intro Agenda Wrap-up Ladner proof and time vs. space succinctness QBF
More informationCS5236 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 informationAlgebraic 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 information8 Divisibility and prime numbers
8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express
More informationComplexity 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 informationThe Characteristic Polynomial
Physics 116A Winter 2011 The Characteristic Polynomial 1 Coefficients of the characteristic polynomial Consider the eigenvalue problem for an n n matrix A, A v = λ v, v 0 (1) The solution to this problem
More informationFactoring & Primality
Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount
More informationLecture 13 - Basic Number Theory.
Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted
More informationInformatique 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 informationAutomata 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 informationOracle 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 informationNondeterministic polynomial time factoring in the tile assembly model
Theoretical Computer Science 395 2008) 3 23 www.elsevier.com/locate/tcs Nondeterministic polynomial time factoring in the tile assembly model Yuriy Brun Department of Computer Science, University of Southern
More information1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:
Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of
More information1 Sets and Set Notation.
LINEAR ALGEBRA MATH 27.6 SPRING 23 (COHEN) LECTURE NOTES Sets and Set Notation. Definition (Naive Definition of a Set). A set is any collection of objects, called the elements of that set. We will most
More information26 Integers: Multiplication, Division, and Order
26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue
More informationMathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson
Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement
More informationCardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.
Section 2.5 Cardinality (another) Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted A = B, if and only if there is a bijection from A to B. If there is an injection
More information9.2 Summation Notation
9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a
More informationProperties of Real Numbers
16 Chapter P Prerequisites P.2 Properties of Real Numbers What you should learn: Identify and use the basic properties of real numbers Develop and use additional properties of real numbers Why you should
More informationa 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.
MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column
More informationArkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 3 Binary Operations We are used to addition and multiplication of real numbers. These operations combine two real numbers
More informationModels 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 information11 Multivariate Polynomials
CS 487: Intro. to Symbolic Computation Winter 2009: M. Giesbrecht Script 11 Page 1 (These lecture notes were prepared and presented by Dan Roche.) 11 Multivariate Polynomials References: MC: Section 16.6
More informationOHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012
276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the
More informationMATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis
LOGIC AND COMPUTER SCIENCE Phokion G. Kolaitis Computer Science Department, University of California, Santa Cruz, CA 95064, USA Keywords: algorithm, Armstrong s axioms, complete problem, complexity class,
More information3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
More informationLocal periods and binary partial words: An algorithm
Local periods and binary partial words: An algorithm F. Blanchet-Sadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA E-mail:
More informationNotes on NP Completeness
Notes on NP Completeness Rich Schwartz November 10, 2013 1 Overview Here are some notes which I wrote to try to understand what NP completeness means. Most of these notes are taken from Appendix B in Douglas
More information