Computability and Complexity

Size: px
Start display at page:

Download "Computability and Complexity"

Transcription

1 Computability and Complexity Turing Machines CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada Ryszard Janicki Computability and Complexity 1 / 56

2 Introduction It is named after Alan Turing, who invented them in 1936 Turing machines can compute any function normally considered computable Turing Machines were invented long before real computers appeared They came at a time when mathematicians were trying to come to grips with the notion of eective computation Several alternative formalisms evolved in the attempt to nail down eectively computable Ryszard Janicki Computability and Complexity 2 / 56

3 Introduction The three most popular alternative formalisms are: Turing machines (Alan Turing) machines approach Post systems (Emil Post) rewriting systems approach Recursive functions (Kurt Gödel, Alonzo Church) calculation with numbers approach Ryszard Janicki Computability and Complexity 3 / 56

4 Introduction The one that is the more popular, as some claim (falsely) it most closely resembles a modern computer is the Turing machine Besides the most know model, there are also many variations nondeterministic multitape multidimensional tape two-way innite tapes They can all simulate one another Ryszard Janicki Computability and Complexity 4 / 56

5 Introduction Church's thesis (or the Church-Turing thesis) It is not a theorem, but rather a declaration All these (including Turing Machines) formalisms capture precisely our intuition about what it means to be eectively computable in principle, no more and no less Very likely that the most compelling development leading to the acceptance of Church's thesis was the Turing machine (model considered readily programmable) Ryszard Janicki Computability and Complexity 5 / 56

6 Informal Description of Turing Machines We will be considering a deterministic, one-tape Turing machine This is the standard model There are many variations, apparently more powerful or less powerful but in reality not TM has a nite set of states Q a semi-innite tape that is delimited on the left end by an endmarker and is innite to the right a head that can move left and right over the tape, reading and writing symbols Ryszard Janicki Computability and Complexity 6 / 56

7 Informal Description of Turing Machines a b b a b a.... Q Two way, read/write Turing Machine (TM) can both write on the tape and read from it. The read-write head can move both to the left and to the right. The special states for rejecting and accepting take eect immediately. There are many slightly dierent denitions of Turing Machines. Ryszard Janicki Computability and Complexity 7 / 56

8 Formal Description of Turing Machines Denition (One of many) A deterministic one-tape Turing machine is a 7-tuple M = (Q, Σ, Γ, δ, s, t, r), where Q is a nite set (the states); Σ is a nite set (the input alphabet); Γ is a nite set (the tape alphabet) containing Σ as a subset; [ Γ \ Σ, the blank symbol ( [ ε); often we assume, the left endmarker, belongs to Γ \ Σ; δ : Q Γ Q Γ {L, R}, the transition function; Sometimes δ is dened as δ : Q Γ Q Γ {L, S, R}. Sometimes δ is dened as δ : Q Γ Q Γ {L, R}, where Q = Q \ {r, t}. s Q, the start state; t Q, the accept state; and r Q, the reject state, r t. Ryszard Janicki Computability and Complexity 8 / 56

9 Formal Description of Turing Machines Intuitively, δ (p, a) = (q, b, d) means, When in state p scanning symbol a, write b on that tape cell, move the head in direction d, and enter state q. The symbols L and R stand for left and right, respectively (and S means `stay in the same place') Often we assume that p Q. q Q. δ (p, ) = (q,, R) We refer to the state set and transition function collectively as the nite control Ryszard Janicki Computability and Complexity 9 / 56

10 Formal Description of Turing Machines Example (with ) We are considering a TM that accepts the non-context-free set {a n b n c n n 0} Q = {s, q 1,, q 10, t, r} Σ = {a, b, c} Γ = Σ {, [, } is just an extra useful symbol in the tape alphabet (NOT a special symbol) Ryszard Janicki Computability and Complexity 10 / 56

11 Formal Description of Turing Machines Ryszard Janicki Computability and Complexity 11 / 56

12 Congurations Formally: Γ Q Γ uaq i bv uq j acv δ(q i, b) = (q j, c, L) uaq i bv uacq j v δ(q i, b) = (q j, c, R) means `yields'. Special cases: Left-hand end: q i bv q j cv for L (if no ) Right-hand end: uaq i uaq i [ Ryszard Janicki Computability and Complexity 12 / 56

13 Special Congurations start conguration: sw or sw accepting conguration: utv rejecting conguration: ur v halting conguration: accepting or rejecting Turing Machine may not halt at all! It may run forever. Ryszard Janicki Computability and Complexity 13 / 56

14 Acceptance, Looping, Deciding A Turing machine M accepts input w if there is a sequence of congurations c 1, c 2,..., c k such that: 1 c 1 = sw 2 c i c i+1 for i = 1,..., k 1 3 c k is an accepting conguration. L(M) = {w M accepts w} L(M) is the language recognized by M. Turing machine loops if it neither accepts nor rejects some input. Turing machine decides if it does not loop. Ryszard Janicki Computability and Complexity 14 / 56

15 Turing Machines and Languages Denition A language L is Turing-recognizable if some Turing machine recognizes it. In this case, if x L, M accepts it (and stops), if x / L, M either rejects it or loops, so we do not really know if x L or not. Turing-recognizable recursively enumerable. Denition A language L is Turing-decidable if some Turing machine decides it. In this case, if x L, M accepts it (and stops), if x / L, M either rejects it (and stops). Turing-decidable recursive. Ryszard Janicki Computability and Complexity 15 / 56

16 Example The Turing machine described below decides L = {0 2n n 0} Idea: On input string w: 1 Sweep left to right across the tape, crossing o every other 0. 2 if in stage 1, the tape contained a single 0, accept. 3 If in stage 1 the tape contained more than a single 0 and the number of 0's was odd, reject. 4 Return the head to the left-hand end of the tape. 5 Go to stage 1. Ryszard Janicki Computability and Complexity 16 / 56

17 Example (M decides L = {0 2n n 0}, graphical) Ryszard Janicki Computability and Complexity 17 / 56

18 Functions vs Languages Turing Machines dened as in this Lecture Notes can at best accept languages, i.e. sets of sequences, so how one can say that they can compute anything? God made the natural numbers; all else is the work of man - Leopold Kronecker We can really eectively process only natural numbers! Unary notation: 0 = ε, 1 = 0, 2 = 00, 3 = 000,..., n = 0 n, etc. Note that for every function f : IN IN, we can write : f (k) = n 0 k #0 n. Similarly for every function g : IN IN IN, we can write : g(i, j) = n 0 i 10 j #0 n, etc. Each function f : IN IN can uniquely be represented by a language L f = {0 k #0 f (k) k IN}. Similarly each function g : IN IN IN can uniquely be represented by a language L g = {0 i 10 j #0 g(i,j) i, j IN}. Ryszard Janicki Computability and Complexity 18 / 56

19 Turing Machines that dene functions explicitly There is no real dierence between computing functions and recognizing languages. Languages are more general and often easier to handle. Nevertheless, we Turing machines can also dene functions explicitly, without using the concept of a language. Consider a standard deterministic single tape Turing Machine M = (Q, Σ, Γ, δ, s, t, r) with Σ = {0} or Σ = {0, 1}. We say that M computes the function f : IN IN if for each input 0 k on the tape, it reach the accept state t, when the tape contains the string 0 f (k). We say that M computes the function g : IN IN IN if for each input 0 i 10 j on the tape, it reach the accept state t, when the tape contains the string 0 g(i,j), etc. Ryszard Janicki Computability and Complexity 19 / 56

20 Multitape Turing Machines Several tapes instead of just one Each tape has its own head for reading and writing Initially the input appears on tape 1, and others start out blank The transition function is changed to allow for reading, writing and moving the heads on all tapes simultaneously, i.e. δ : Q Γ k A (Γ {L, R}) k where k is the number of tapes. Example: δ(q, a 1, a 2, a 3 ) = (p, (b 1, R), (b 2, L), (b 3, R)). Conguration and the `yields' relation have to be changed accordingly. Two Turing machines are equivalent if they recognize/decide the same language (compute the same function). Ryszard Janicki Computability and Complexity 20 / 56

21 Theorem Every multitape Turing machine has an equivalent single tape Turing Machine. Proof. (sketch). Ryszard Janicki Computability and Complexity 21 / 56

22 Idea of an algorithm is the following: say input is x = a 1... a k, and a single tape machine is S 1 S puts its tape into: # a 1 a 2... a k # # #... # }{{} [ [ k 1 2 To simulate a single move, S scans its tape from rst #, to (k + 1) th #, in order to determine the symbol under the virtual heads. Then S make a second pass to update the tapes according to M's transition function. 3 If S moves one of the virtual heads to the right onto a #, M has moved the corresponding head to next unused blank. So S writes blank and shifts the tape from this cell until the last #, one unit to the right. Theorem The simulation from the previous theorem is polynomial time. [ Ryszard Janicki Computability and Complexity 22 / 56

23 Nondeterministic Turing Machines - Denition The only dierence is that the transition function δ is of the following form: δ : Q Γ 2 Q Γ {L,R} Ryszard Janicki Computability and Complexity 23 / 56

24 Nondeterministic vs Deterministic Turing Machines Theorem Every non-deterministic Turing machine has an equivalent deterministic Turing machine. Proof. (idea). Depth-rst search does not work for innite trees. In this case the simulation time is exponential. Ryszard Janicki Computability and Complexity 24 / 56

25 Denition A non-deterministic Turing machine S is said to accept/recognize a language L, if for all w L, at least one of the possible congurations accepts w. There may be branches that lead to non accepting congurations, some may put the machine into an innite loop. But these are irrelevant for acceptance. Angelic non-determinism/semantics. Denition A non-deterministic Turing machine S is said to decide a language L, if for all w L, there is a path that leads to either acceptance or rejection. Angelic non-determinism/semantics again. However it can be replaced by `demonic' in this case. Ryszard Janicki Computability and Complexity 25 / 56

26 Enumerators Consider a multitape Turing machine M that uses one tape as an output tape, on which a symbol, once written, can never be changed, and whose tape symbol never moves left. On the input tape, M writes strings over Σ, separated by # / Σ. E(M), the language enumerated by M, is the set of w Σ such that w is eventually printed between a pair of #'s on the output tape. Note that unless M runs forever, E(M) is nite. No particular order is required on the output tape, and repetitions are allowed. Theorem The language L is Turing-recognizable (or recursively-enumerable) some enumerator enumerates it. Ryszard Janicki Computability and Complexity 26 / 56

27 Random Access Machines - Motivation How can one claim that Turing machines can simulate any program in any programming language, including those that have not been invented yet? Every existing hardware (except quantum computers) is a version of von Neumann machine, so it the input must an executable programs (or plain data). Hence it suces to have a mathematical model of executable programs (they all have similar structures) and next to show that Turing machines can simulate models of all executable programs. This mathematical model of executable programs is called Random Access Machine Programs or RAM-programs. It was proved about ten years ago that quantum computers also can be simulated by Turing machines, however some say that this proof used wrong assumptions. We will argue that RAM-programs can be simulated by Turing machines (and vice versa). Formal proofs of this can be found in some older textbooks or scientic literature (from fties and sixties). Ryszard Janicki Computability and Complexity 27 / 56

28 Von Neumann Machine (1) Ryszard Janicki Computability and Complexity 28 / 56

29 Von Neumann Machine (2) Ryszard Janicki Computability and Complexity 29 / 56

30 Random Access Machines Denition A random access machine (RAM) model is a one-accumulator computer in which instructions are not permitted to modify themselves. Each register can hold an integer of arbitrary size. Memory is innite. IMPORTANT: One random machine denes only one specic program. Ryszard Janicki Computability and Complexity 30 / 56

31 RAM - Denition x 1 x 2 x n Read-Only Input Tape Accumulator - r 0 r 1 Location Counter Program r 2 Memory (infinite) y 1 y 2 Ryszard Janicki Fig. 48 Computability and Complexity 31 / 56

32 Assumptions (can be changed) The size of the problem is small enough to t in the main memory of a computer. The integers used in the computation are small enough to t in one computer word. The program for a RAM is not stored in the memory, therefore program does not modify itself. All computation takes place in the rst register r 0 called accumulator. Ryszard Janicki Computability and Complexity 32 / 56

33 Sample of Instructions RAM instructions correspond to the instructions used in executable Sample of instructions: programs and resemble Assembler instructions. Operation Code LOAD STORE ADD SUB MULT DIV READ WRITE JUMP JGTZ JZERO Address OPERAND OPERAND OPERAND OPERAND OPERAND OPERAND OPERAND OPERAND LABEL LABEL LABEL HALT Notation for Operands: Ryszard Janicki Computability and Complexity 33 / 56

34 Operands and Memory Maps An operand can be one of the following 1 = i indicates i itself. 2 A non-negative integer i, indicating the content of register i. 3 i, indicating indirect addressing. That is the contents of register j, where j is the integer found in register i. If j < 0, the machine halts. A memory map is a function c : {0, 1, 2,...} Integers, where c(i) is the integer stored in register i. Ryszard Janicki Computability and Complexity 34 / 56

35 Program Execution and Values Operands The program is executed as follows: A memory map is a function c : {0, 1, 2,...} Integers, where c(i) is the integer stored in register i. Initially, c(i) = 0, i 0, location counter is set to the rst instruction in P, the output tape is blank. After execution of the k th instruction in P, the location counter is automatically set to k + 1, unless the k th instruction is JUMP, HALT, JGTZ, or JZERO. To specify the meaning of an instruction we dene v(a), the value of operand a, as follows: v(= i) = i, v(i) = c(i), v(i) = c(c(i)) Instructions not dened, such as for example STORE= i are usually considered as equivalent to HALT. Likewise, division by zero halts the machine. Ryszard Janicki Computability and Complexity 35 / 56

36 Meaning of RAM Instructions The operand a is either = i, i, or i. x (or oor) denotes the greatest integer equal to or less than x. Ryszard Janicki Computability and Complexity 36 / 56

37 What RAM Program Does? 1 If x 1,..., x n are inputs, y is the rst output when RAM halts, then RAM computes: f RAM (x 1,..., x n ) = y 2 If a sequence a 1... a n # in on rst n + 1 cells of the input tape (# is just an end-marker), then a RAM program accepts a 1... a n it it reads a 1... a n #, writes 'YES' in the rst cell of the output tape, end halts. Ryszard Janicki Computability and Complexity 37 / 56

38 Example { n n n 0, n Integers Consider the function: f (n) = 0 otherwise possible pseudocode is: A The loop for is more convenient but while is easier to translate into RAM. Ryszard Janicki Computability and Complexity 38 / 56

39 RAM program Corresponding pseudocode program Ryszard Janicki Computability and Complexity 39 / 56

40 Example Consider the language {w w {1, 2} # 1 (w) = # b (w)}, and assume that 0 is endmarker. A possible pseudocode is: Ryszard Janicki Computability and Complexity 40 / 56

41 RAM program Corresponding pseudocode program Ryszard Janicki Computability and Complexity 41 / 56

42 Turing Machines and RAM Programs Theorem Every Turing machine can be simulated by a RAM program. Proof. (sketch). Registers of RAM simulate tape. Ryszard Janicki Computability and Complexity 42 / 56

43 RAM Programs and Turing Machines Theorem Let L be a language accepted by a RAM program. There is a Turing machine that accepts L. Proof. (sketch). We represent all the RAM registers not holding 0 as below: The tape consists of a sequence of pairs (i j, c j ) written in binary with no leading 0's and separated by marker symbols. For each j, c j is the content of RAM register j, i.e. c j = c(j). The contents of the RAM accumulator is stored in binary on a second tape, and the third tape is used for a scratch memory. Two other tapes serve to hold the input and the output of the RAM. Each step of the RAM program is represented by a nite set of states of the Turing machine. Ryszard Janicki Computability and Complexity 43 / 56

44 We shall not describe the simulation of an arbitrary RAM instruction, but shall consider only the instructions ADD 20 and STORE 30, which should make the ideas clear. For ADD 20, we can design the Turing machine to do the following: 1 Seach tape 1 for any entry for RAM register 20, i.e., a sequence ##10100#. If found, place the integer following, which will be the contents of register 20, on tape 3. If not found, then halt. The contents of register 20 is 0 and thus the indirect addressing cannot be done. 2 Look on tape 1 for an entry for The RAM register whose number is stored on tape 3. If found, copy the content of that register onto tape 3. If not found, place 0 there. 3 Add the number placed on tape 3 in step 2 to the content of the accumulator, which is held on tape 2. We assume Turing machines can do additions. Ryszard Janicki Computability and Complexity 44 / 56

45 To simulate the instruction STORE 30, we can design the Turing machine to do the following: 1 Search for an entry fro RAM register 30, i.e., ##11110#. 2 If found, copy everything to the right of ##11110#, except for the integer immediately following (the old contents of register 30), onto tape 3. Then copy the contents of the accumulator (tape 2) immediately to the right of ##11110# and follow it by the string copied onto tape 3. If no entry for register 30 was found on tape 1, instead go to the leftmost blank, print 11110#, followed by the contents of the accumulator, followed by ##. Ryszard Janicki Computability and Complexity 45 / 56

46 Computational Complexity of RAM Programs Uniform Cost Criterion: Each instruction requires one unit of time and each register requires one unit of space. Logarithmic Cost Criterion: { FLOOR(log2 i ) + 1 i 0 l(i) = 1 i = 0 Logarithmic Cost of RAM Operands: t(a) - time cost of a Ryszard Janicki Computability and Complexity 46 / 56

47 Computational Complexity of RAM Programs Logarithmic Cost of RAM Instructions: t(a) - time cost of operand a, b denotes a label Ryszard Janicki Computability and Complexity 47 / 56

48 Complexity of our program for n n. Time: it is dominated by the loop with MULT instruction, so under uniform cost time is O(n) (MULT is executed n 1 times). Under the logarithmic cost, the cost of executing the i th MULT is: l(n i ) + l(n) (i + 1) log 2 n, so the total cost is n 1 (i + 1) log n = O(n 2 log n). i=1 Space: Uniform cost is O(1). Logarithmic cost: the largest integer stored is l(n n ) n log n, so it is O(n log n). Ryszard Janicki Computability and Complexity 48 / 56

49 Random Access Stored Program Machine (RASP) 1 The instruction set for a RASP is identical to that for a RAM, except indirect accessing is not permitted since it is not needed. 2 A RASP can simulate indirect addressing by the modication of instructions during program execution. 3 The program of a RASP is assumed to be in the registers of the memory. 4 Each RASP instruction occupies 2 consecutive memory registers. The 1 st register holds an encoding; the 2 nd register holds the address. Ryszard Janicki Computability and Complexity 49 / 56

50 Possible code for RASP instructions For example, the instruction LOAD =32 would be stored with 2 in one register and 32 in the following register. Ryszard Janicki Computability and Complexity 50 / 56

51 The state of a RASP can be represented by: 1 The memory map c, where c(i), i 0, is the content of register. 2 The location counter, which indicates the rst of the two consecutive memory registers from which the current instruction is to be taken. Initially, the location counter is set at some specied register. The initial content of the memory registers are not all 0, since the program has been loaded into the memory at the start. All but a nite number of the registers contain 0 at the start and the accumulator contains 0. Location counter is set at some species register. After each instruction is executed, the location counter is increased by 2, except in the case of JUMP i, JGTZ i, or JZERO i, in which case the location counter is set to i. The time and/or space complexity can by dened in much the same manner as that of a RAM program. In the case of logarithmic cost we must also change for accessing the instruction itself, which costs l(lc). Ryszard Janicki Computability and Complexity 51 / 56

52 RAM vs RASP Theorem If costs of instructions are either uniform or logarithmic, for every RAM program of time complexity T (n) there is a constant C such that there is an equivalent RASP program of time complexity CT (n). Theorem If costs of instructions are either uniform or logarithmic, for every RASP program of time complexity T (n) there is a constant C such that there is an equivalent RAM program of time complexity at most CT (n). The similar theorems hold for space complexity. RAM and RASP can be considered as completely equivalent. Ryszard Janicki Computability and Complexity 52 / 56

53 RAM, RASP and Turing Machines again Theorem Every TM can be simulated by RAM in O(T (n)) time under uniform cost or in O(T (n) log T (n)) under logarithmic cost. Proof. Registers of RAM simulate tape. Theorem RAM's cannot be simulated by TM in polynomial time under uniform cost, they can be simulated in exponential time. Proof. Under the uniform cost an n-step RAM program can compute number as high as 2 2n, which requires 2 n TM cells just to store and read. Ryszard Janicki Computability and Complexity 53 / 56

54 RAM, RASP and Turing Machines again Theorem The RAM and RASP under logarithmic cost and Turing machines are all polynomially related. Theorem RAM and high level programming languages are related by constants. Ryszard Janicki Computability and Complexity 54 / 56

55 Programs, RAM Programs and Turing Machines - Final Comment It can be shown that programs is high level programming languages that use standard programming constructions are linearly related. It can be shown that RAM programs and Turing machines are polynomially related. Hence the programs is high level programming languages that use standard programming constructions and Turing machines are polynomially related. Ryszard Janicki Computability and Complexity 55 / 56

56 This is almost the end of TURING MACHINES THEORY Ryszard Janicki Computability and Complexity 56 / 56

Theory of Languages and Automata

Theory of Languages and Automata Theory of Languages and Automata Chapter 3- The Church-Turing Thesis Sharif University of Technology Turing Machine O Several models of computing devices Finite automata Pushdown automata O Tasks that

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation CISC 4090 Theory of Computation Turing machines Professor Daniel Leeds dleeds@fordham.edu JMH 332 Alan Turing (1912-1954) Father of Theoretical Computer Science Key figure in Artificial Intelligence Codebreaker

More information

TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function

TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function TAFL 1 (ECS-403) Unit- V 5.1 Turing Machine 5.2 TM as computer of Integer Function 5.2.1 Simulating Turing Machine by Computer 5.2.2 Simulating Computer by Turing Machine 5.3 Universal Turing Machine 5.4

More information

Variants of Turing Machines

Variants of Turing Machines November 4, 2013 Robustness Robustness Robustness of a mathematical object (such as proof, definition, algorithm, method, etc.) is measured by its invariance to certain changes Robustness Robustness of

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 9 January 26, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis decidable, RE, co-re languages Deciding and Recognizing

More information

ECS 120 Lesson 16 Turing Machines, Pt. 2

ECS 120 Lesson 16 Turing Machines, Pt. 2 ECS 120 Lesson 16 Turing Machines, Pt. 2 Oliver Kreylos Friday, May 4th, 2001 In the last lesson, we looked at Turing Machines, their differences to finite state machines and pushdown automata, and their

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Today's learning goals Sipser sec 3.2 Describe several variants of Turing machines and informally explain why they

More information

COMP 382: Reasoning about algorithms

COMP 382: Reasoning about algorithms Spring 2015 Unit 2: Models of computation What is an algorithm? So far... An inductively defined function Limitation Doesn t capture mutation of data Imperative models of computation Computation = sequence

More information

Outline. Language Hierarchy

Outline. Language Hierarchy Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Language Hierarchy Regular: finite memory CFG/PDA: infinite memory but in stack space TM: infinite

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 2, 3.1 State and use the Church-Turing thesis. Describe several variants of Turing

More information

pp Variants of Turing Machines (Sec. 3.2)

pp Variants of Turing Machines (Sec. 3.2) pp. 176-176-182. Variants of Turing Machines (Sec. 3.2) Remember: a language is Turing recognizable if some TM accepts it. Adding features may simplify programmability but DO NOT affect what a TM can compute.

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.2, 3.3 Define variants of TMs Enumerators Multi-tape TMs Nondeterministic TMs

More information

Turing Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject.

Turing Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject. Turing Machines Transducers: A transducer is a finite state machine (FST) whose output is a string and not just accept or reject. Each transition of an FST is labeled with two symbols, one designating

More information

Introduction to Computers & Programming

Introduction to Computers & Programming 16.070 Introduction to Computers & Programming Theory of computation 5: Reducibility, Turing machines Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT States and transition function State control A finite

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? A Turing machine can do everything that any computing

Theory of Computation p.1/?? Theory of Computation p.2/?? A Turing machine can do everything that any computing Turing Machines A Turing machine is similar to a finite automaton with supply of unlimited memory. A Turing machine can do everything that any computing device can do. There exist problems that even a

More information

CSCI 3130: Formal Languages and Automata Theory Lecture 16 The Chinese University of Hong Kong, Fall 2010

CSCI 3130: Formal Languages and Automata Theory Lecture 16 The Chinese University of Hong Kong, Fall 2010 CSCI 3130: Formal Languages and Automata Theory Lecture 16 The Chinese University of Hong Kong, Fall 2010 Andrej Bogdanov The Church-Turing thesis states that the Turing Machine is as capable as any realistic

More information

14.1 Encoding for different models of computation

14.1 Encoding for different models of computation Lecture 14 Decidable languages In the previous lecture we discussed some examples of encoding schemes, through which various objects can be represented by strings over a given alphabet. We will begin this

More information

CS 125 Section #4 RAMs and TMs 9/27/16

CS 125 Section #4 RAMs and TMs 9/27/16 CS 125 Section #4 RAMs and TMs 9/27/16 1 RAM A word-ram consists of: A fixed set of instructions P 1,..., P q. Allowed instructions are: Modular arithmetic and integer division on registers; the standard

More information

Computer Sciences Department

Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 D E C I D A B I L I T Y 4 Objectives 5 Objectives investigate the power of algorithms to solve problems.

More information

Enumerations and Turing Machines

Enumerations and Turing Machines Enumerations and Turing Machines Mridul Aanjaneya Stanford University August 07, 2012 Mridul Aanjaneya Automata Theory 1/ 35 Finite Sets Intuitively, a finite set is a set for which there is a particular

More information

Turing Machines, continued

Turing Machines, continued Previously: Turing Machines, continued CMPU 240 Language Theory and Computation Fall 2018 Introduce Turing machines Today: Assignment 5 back TM variants, relation to algorithms, history Later Exam 2 due

More information

Closure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.

Closure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007. Closure Properties of CFLs; Introducing TMs CS154 Chris Pollett Apr 9, 2007. Outline Closure Properties of Context Free Languages Algorithms for CFLs Introducing Turing Machines Closure Properties of CFL

More information

Actually talking about Turing machines this time

Actually talking about Turing machines this time Actually talking about Turing machines this time 10/25/17 (Using slides adapted from the book) Administrivia HW due now (Pumping lemma for context-free languages) HW due Friday (Building TMs) Exam 2 out

More information

Theory of Computations Spring 2016 Practice Final Exam Solutions

Theory of Computations Spring 2016 Practice Final Exam Solutions 1 of 8 Theory of Computations Spring 2016 Practice Final Exam Solutions Name: Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

Turing Machine Languages

Turing Machine Languages Turing Machine Languages Based on Chapters 23-24-25 of (Cohen 1997) Introduction A language L over alphabet is called recursively enumerable (r.e.) if there is a Turing Machine T that accepts every word

More information

Does this program exist? Limits of computability. Does this program exist? A helper function. For example, if the string program is

Does this program exist? Limits of computability. Does this program exist? A helper function. For example, if the string program is Does this program exist? For example, if the string program is Limits of computability public void abc(string s) { if( s == "abc" ) { print "Hello world!"; } else { print "Whatever"; }} then test called

More information

Equivalence of NTMs and TMs

Equivalence of NTMs and TMs Equivalence of NTMs and TMs What is a Turing Machine? Similar to a finite automaton, but with unlimited and unrestricted memory. It uses an infinitely long tape as its memory which can be read from and

More information

perform. If more storage is required, more can be added without having to modify the processor (provided that the extra memory is still addressable).

perform. If more storage is required, more can be added without having to modify the processor (provided that the extra memory is still addressable). How to Make Zuse's Z3 a Universal Computer Raul Rojas January 14, 1998 Abstract The computing machine Z3, built by Konrad Zuse between 1938 and 1941, could only execute xed sequences of oating-point arithmetical

More information

PDA s. and Formal Languages. Automata Theory CS 573. Outline of equivalence of PDA s and CFG s. (see Theorem 5.3)

PDA s. and Formal Languages. Automata Theory CS 573. Outline of equivalence of PDA s and CFG s. (see Theorem 5.3) CS 573 Automata Theory and Formal Languages Professor Leslie Lander Lecture # 20 November 13, 2000 Greibach Normal Form (GNF) Sheila Greibach s normal form (GNF) for a CFG is one where EVERY production

More information

CpSc 421 Final Solutions

CpSc 421 Final Solutions CpSc 421 Final Solutions Do any eight of the ten problems below. If you attempt more than eight problems, please indicate which ones to grade (otherwise we will make a random choice). This allows you to

More information

Theory of Computation, Homework 3 Sample Solution

Theory of Computation, Homework 3 Sample Solution Theory of Computation, Homework 3 Sample Solution 3.8 b.) The following machine M will do: M = "On input string : 1. Scan the tape and mark the first 1 which has not been marked. If no unmarked 1 is found,

More information

Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama

Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all of

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down

More information

arxiv: v1 [cs.cc] 9 Jan 2015

arxiv: v1 [cs.cc] 9 Jan 2015 Efficient Computation by Three Counter Machines arxiv:1501.02212v1 [cs.cc] 9 Jan 2015 Holger Petersen Reinsburgstr. 75 70197 Stuttgart Germany May 13, 2018 Abstract Weshow that multiplication can be done

More information

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability. 05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability. 1. Turing Machines A Turing machine (TM) consists of (Turing 1936): Alan Turing 1. An unbounded tape. Divided into squares,

More information

SECTION A (40 marks)

SECTION A (40 marks) OLLSCOIL NA héireann, MÁ NUAD NATIONAL UNIVERSITY OF IRELAND, MAYNOOTH THIRD COMPUTER SCIENCE AND SOFTWARE ENGINEERING EXAMINATION FEBRUARY 2002 PAPER SE307 COMPUTATION AND COMPLEXITY THEORY Dr. P. Stevens,

More information

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

More information

Turing Machines Part Two

Turing Machines Part Two Turing Machines Part Two Recap from Last Time The Turing Machine A Turing machine consists of three parts: A finite-state control that issues commands, an infinite tape for input and scratch space, and

More information

2.8 Universal Turing Machines and the Halting Problem

2.8 Universal Turing Machines and the Halting Problem 2.8 Universal Turing Machines and the Halting Problem Through the hierarchy of Slide 74 we indirectly get a sense that Turing Machines are at least as computationally powerful as any other known model

More information

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems The Turing Machine Unsolvable Problems Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical machine

More information

In this section we will study problems for which we can prove that there is no algorithm solving them.

In this section we will study problems for which we can prove that there is no algorithm solving them. 8 Uncomputability In this section we will study problems for which we can prove that there is no algorithm solving them. 8.1 What is an algorithm? The notion of algorithm is usually defined as Turing machines

More information

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora Administrivia In class midterm in midterms week; Thurs Mar 13 (closed book;? No lab in midterms week; review session instead. What computers

More information

More Simulations. CS154 Chris Pollett Apr 25, 2007.

More Simulations. CS154 Chris Pollett Apr 25, 2007. More Simulations CS154 Chris Pollett Apr 25, 2007. Outline Multi-tape Turing Machines RAMS k-tape Turing Machine One way you might try to improve the power of a TM is to allow multiple tapes. Definition

More information

Lecture 5: The Halting Problem. Michael Beeson

Lecture 5: The Halting Problem. Michael Beeson Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it

More information

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: P R O B L E M S Finite Autom ata. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: a) Are a multiple of three in length. b) End with the string

More information

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if

More information

Introduction to Functional Programming: Lecture 7 2 Functions as innite data structures Ordinary ML data structures are always nite. We can, however,

Introduction to Functional Programming: Lecture 7 2 Functions as innite data structures Ordinary ML data structures are always nite. We can, however, Introduction to Functional Programming: Lecture 7 1 Introduction to Functional Programming John Harrison University of Cambridge Lecture 7 Innite data structures Topics covered: Functions as innite data

More information

Theory of Programming Languages COMP360

Theory of Programming Languages COMP360 Theory of Programming Languages COMP360 Sometimes it is the people no one imagines anything of, who do the things that no one can imagine Alan Turing What can be computed? Before people even built computers,

More information

Limited Automata and Unary Languages

Limited Automata and Unary Languages Limited Automata and Unary Languages Giovanni Pighizzini and Luca Prigioniero Dipartimento di Informatica, Università degli Studi di Milano, Italy {pighizzini,prigioniero}@di.unimi.it Abstract. Limited

More information

p x i 1 i n x, y, z = 2 x 3 y 5 z

p x i 1 i n x, y, z = 2 x 3 y 5 z 3 Pairing and encoding functions Our aim in this part of the course is to show that register machines can compute everything that can be computed, and to show that there are things that can t be computed.

More information

Math Circle Beginners Group October 18, 2015 Solutions

Math Circle Beginners Group October 18, 2015 Solutions Math Circle Beginners Group October 18, 2015 Solutions Warm-up problem 1. Let n be a (positive) integer. Prove that if n 2 is odd, then n is also odd. (Hint: Use a proof by contradiction.) Suppose that

More information

Lecture 7: Primitive Recursion is Turing Computable. Michael Beeson

Lecture 7: Primitive Recursion is Turing Computable. Michael Beeson Lecture 7: Primitive Recursion is Turing Computable Michael Beeson Closure under composition Let f and g be Turing computable. Let h(x) = f(g(x)). Then h is Turing computable. Similarly if h(x) = f(g 1

More information

Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Lecture 01 Introduction to Finite Automata Welcome everybody. This is

More information

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. Other Automata We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. From all of this information we decide what state

More information

CS 531: Notes II. January 31, 2014

CS 531: Notes II. January 31, 2014 CS 531: Notes II January 31, 2014 1 Acceptable and Decidable Languages Let P be a program and x be a string. What happens when we run P on on input x. There are there possibilities. i) The program runs

More information

Material from Recitation 1

Material from Recitation 1 Material from Recitation 1 Darcey Riley Frank Ferraro January 18, 2011 1 Introduction In CSC 280 we will be formalizing computation, i.e. we will be creating precise mathematical models for describing

More information

Finite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur

Finite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur Finite Automata Dr. Nadeem Akhtar Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur PhD Laboratory IRISA-UBS University of South Brittany European University

More information

Formal verication of programs for abstract register machines

Formal verication of programs for abstract register machines Bull. Nov. Comp. Center, Comp. Science, 35 (2013), 3956 c 2013 NCC Publisher Formal verication of programs for abstract register machines D. A. Chkliaev, V. A. Nepomniaschy Abstract. Abstract register

More information

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar Code No: R05310501 Set No. 1 III B.Tech I Semester Regular Examinations, November 2008 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science & Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE

More information

Lec-5-HW-1, TM basics

Lec-5-HW-1, TM basics Lec-5-HW-1, TM basics (Problem 0)-------------------- Design a Turing Machine (TM), T_sub, that does unary decrement by one. Assume a legal, initial tape consists of a contiguous set of cells, each containing

More information

Nondeterministic Finite Automata (NFA): Nondeterministic Finite Automata (NFA) states of an automaton of this kind may or may not have a transition for each symbol in the alphabet, or can even have multiple

More information

I have read and understand all of the instructions below, and I will obey the Academic Honor Code.

I have read and understand all of the instructions below, and I will obey the Academic Honor Code. Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2014, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all

More information

Turing Machine as Transducer. Turing Machines. Computation with Turing Machines. Computation with Turing Machines. Computation with Turing Machines

Turing Machine as Transducer. Turing Machines. Computation with Turing Machines. Computation with Turing Machines. Computation with Turing Machines Turing Machine as Transducer Turing Computation and programming Transducer -- any device that converts a signal from one form to another Turning machine Converts input to output Start with string on the

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C. 219 Lemma J For all languages A, B, C the following hold i. A m A, (reflexive) ii. if A m B and B m C, then A m C, (transitive) iii. if A m B and B is Turing-recognizable, then so is A, and iv. if A m

More information

CT32 COMPUTER NETWORKS DEC 2015

CT32 COMPUTER NETWORKS DEC 2015 Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10

More information

CSC-461 Exam #2 April 16, 2014

CSC-461 Exam #2 April 16, 2014 Pledge: On my honor, I pledge that I have not discussed any of the questions on this exam with fellow students, nor will I until after 7 p.m. tonight. Signed: CSC-461 Exam #2 April 16, 2014 Name Time Started:

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

Chapter 4 Turing Machines

Chapter 4 Turing Machines Chapter 4 Turing Machines Alan Turing completed the invention of what became known as Turing Machines in 1936. He was seeking to describe in a precise way what it means to systematically calculate or compute.

More information

Chapter 14: Pushdown Automata

Chapter 14: Pushdown Automata Chapter 14: Pushdown Automata Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu The corresponding textbook chapter should

More information

Lecture 18: Turing Machines

Lecture 18: Turing Machines Lecture 18: Turing Machines Some Languages are not Context-Free At the end of the last section, we used the Pumping Lemma for Context Free Languages to prove that there are languages that are not context

More information

Parallel Rewriting of Graphs through the. Pullback Approach. Michel Bauderon 1. Laboratoire Bordelais de Recherche en Informatique

Parallel Rewriting of Graphs through the. Pullback Approach. Michel Bauderon 1. Laboratoire Bordelais de Recherche en Informatique URL: http://www.elsevier.nl/locate/entcs/volume.html 8 pages Parallel Rewriting of Graphs through the Pullback Approach Michel Bauderon Laboratoire Bordelais de Recherche en Informatique Universite Bordeaux

More information

Elementary Recursive Function Theory

Elementary Recursive Function Theory Chapter 6 Elementary Recursive Function Theory 6.1 Acceptable Indexings In a previous Section, we have exhibited a specific indexing of the partial recursive functions by encoding the RAM programs. Using

More information

Denotational semantics

Denotational semantics 1 Denotational semantics 2 What we're doing today We're looking at how to reason about the effect of a program by mapping it into mathematical objects Specifically, answering the question which function

More information

Languages and Models of Computation

Languages and Models of Computation Computer Science 52 Languages and Models of Computation Spring Semester, 2018 Computer scientists use languages in (at least) two ways. They design and use programming languages, and they study formal

More information

A Characterization of the Chomsky Hierarchy by String Turing Machines

A Characterization of the Chomsky Hierarchy by String Turing Machines A Characterization of the Chomsky Hierarchy by String Turing Machines Hans W. Lang University of Applied Sciences, Flensburg, Germany Abstract A string Turing machine is a variant of a Turing machine designed

More information

Finding a winning strategy in variations of Kayles

Finding a winning strategy in variations of Kayles Finding a winning strategy in variations of Kayles Simon Prins ICA-3582809 Utrecht University, The Netherlands July 15, 2015 Abstract Kayles is a two player game played on a graph. The game can be dened

More information

Theory of Computations Spring 2016 Practice Final

Theory of Computations Spring 2016 Practice Final 1 of 6 Theory of Computations Spring 2016 Practice Final 1. True/False questions: For each part, circle either True or False. (23 points: 1 points each) a. A TM can compute anything a desktop PC can, although

More information

Theory Bridge Exam Example Questions Version of June 6, 2008

Theory Bridge Exam Example Questions Version of June 6, 2008 Theory Bridge Exam Example Questions Version of June 6, 2008 This is a collection of sample theory bridge exam questions. This is just to get some idea of the format of the bridge exam and the level of

More information

Name: CS 341 Practice Final Exam. 1 a 20 b 20 c 20 d 20 e 20 f 20 g Total 207

Name: CS 341 Practice Final Exam. 1 a 20 b 20 c 20 d 20 e 20 f 20 g Total 207 Name: 1 a 20 b 20 c 20 d 20 e 20 f 20 g 20 2 10 3 30 4 12 5 15 Total 207 CS 341 Practice Final Exam 1. Please write neatly. You will lose points if we cannot figure out what you are saying. 2. Whenever

More information

CPSC 320 Sample Solution, Playing with Graphs!

CPSC 320 Sample Solution, Playing with Graphs! CPSC 320 Sample Solution, Playing with Graphs! September 23, 2017 Today we practice reasoning about graphs by playing with two new terms. These terms/concepts are useful in themselves but not tremendously

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

More information

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005 Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005 Peter Bro Miltersen September 29, 2005 Version 2.0 1 Kolmogorov Complexity In this section, we present the concept of Kolmogorov Complexity

More information

SORT INFERENCE \coregular" signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp

SORT INFERENCE \coregular signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp Haskell Overloading is DEXPTIME{complete Helmut Seidl Fachbereich Informatik Universitat des Saarlandes Postfach 151150 D{66041 Saarbrucken Germany seidl@cs.uni-sb.de Febr., 1994 Keywords: Haskell type

More information

Multiple Choice Questions

Multiple Choice Questions Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM

More information

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy International Journal Information Theories and Applications, Vol. 20, Number 2, 2013 131 ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES Nikolay Kosovskiy Abstract: A mathematical

More information

Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of C

Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of C Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of California, San Diego CA 92093{0114, USA Abstract. We

More information

Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D.

Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction to Languages and The by J. C. Martin Basic Mathematical

More information

Lecture T4: Computability

Lecture T4: Computability Puzzle ("Post s Correspondence Problem") Lecture T4: Computability Given a set of cards: N card types (can use as many of each type as possible) Each card has a top string and bottom string Example : N

More information

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen

More information

Halting misconceived?

Halting misconceived? Halting misconceived? Bill Stoddart August 25, 2017 Abstract The halting problem is considered to be an essential part of the theoretical background to computing. That halting is not in general computable

More information

Functional Languages. Hwansoo Han

Functional Languages. Hwansoo Han Functional Languages Hwansoo Han Historical Origins Imperative and functional models Alan Turing, Alonzo Church, Stephen Kleene, Emil Post, etc. ~1930s Different formalizations of the notion of an algorithm

More information

A3 Computer Architecture

A3 Computer Architecture A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 2: Introduction to the CPU 3A3 Michaelmas

More information

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207. MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/ Computability http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/l7-computability.pdf

More information

Solutions to Homework 10

Solutions to Homework 10 CS/Math 240: Intro to Discrete Math 5/3/20 Instructor: Dieter van Melkebeek Solutions to Homework 0 Problem There were five different languages in Problem 4 of Homework 9. The Language D 0 Recall that

More information

Introduction to the λ-calculus

Introduction to the λ-calculus Announcements Prelim #2 issues: o Problem 5 grading guide out shortly o Problem 3 (hashing) issues Will be on final! Friday RDZ office hours are 11-12 not 1:30-2:30 1 Introduction to the λ-calculus Today

More information

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG) CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG) Objectives Introduce Pushdown Automaton (PDA) Show that PDA = CFG In terms of descriptive power Pushdown Automaton (PDA) Roughly

More information

THEORY OF COMPUTATION

THEORY OF COMPUTATION THEORY OF COMPUTATION UNIT-1 INTRODUCTION Overview This chapter begins with an overview of those areas in the theory of computation that are basic foundation of learning TOC. This unit covers the introduction

More information

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np Chapter 1: Introduction Introduction Purpose of the Theory of Computation: Develop formal mathematical models of computation that reflect real-world computers. Nowadays, the Theory of Computation can be

More information